Fix critical character in SQL on old servers which can be converted using the local codepage. Fixes issue #1569.

This commit is contained in:
Ansgar Becker
2010-01-12 22:17:54 +00:00
parent 7aaa5af2c2
commit 9b8fb4cc1f

View File

@ -363,7 +363,10 @@ begin
if not Ping then
Active := True;
Log(lcSQL, SQL);
NativeSQL := UTF8Encode(SQL);
if IsUnicode then
NativeSQL := UTF8Encode(SQL)
else
NativeSQL := AnsiString(SQL);
TimerStart := GetTickCount;
querystatus := mysql_real_query(FHandle, PAnsiChar(NativeSQL), Length(NativeSQL));
FLastQueryDuration := GetTickCount - TimerStart;