Skip to content

Commit

Permalink
Use exact text data types instead of their whole category for detecti…
Browse files Browse the repository at this point in the history
…ng special binary columns. Fixes unquoted JSON content in SQL exports. See http://www.heidisql.com/forum.php?t=20655
  • Loading branch information
ansgarbecker committed Jul 19, 2016
1 parent 064d4e2 commit c230156
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/dbconnection.pas
Expand Up @@ -5427,7 +5427,7 @@ procedure TMySQLQuery.Execute(AddResult: Boolean=False; UseRawResult: Integer=-1
IsBinary := (Field.charsetnr = COLLATION_BINARY) and (Field.org_table <> '')
else
IsBinary := (Field.flags and BINARY_FLAG) = BINARY_FLAG;
if IsBinary and (FConnection.Datatypes[j].Category = dtcText) then
if IsBinary and (FConnection.Datatypes[j].Index in [dtTinytext..dtLongtext]) then
continue;
FColumnTypes[i] := FConnection.Datatypes[j];
break;
Expand Down

0 comments on commit c230156

Please sign in to comment.