MySQL command "Check Table" generates error "Commands out of sync" Error
Original Reporter info from Mantis: didi
-
Reporter name:
Original Reporter info from Mantis: didi
- Reporter name:
Description:
I use the FCL-DB (SQLDB) package. It is the one that installs by default with Lazarus/FPC. I use TMySQL50Connection, TSQLTransaction and TSQLQuery to commit quries to the MySQL Server. Everything wotks fine EXCEPT the following:
when I try to issue a "Check Table" command two consecuitive times, using the TSQLQuery's ExecSQL method, then I get an error the SECOND time.
The error says: Commands out of sync; you can't run this command now
so the following
SQLQuery1.SQL.Text:= 'Check Table T1 EXTENDED';
SQLQuery1.ExecSQL;
SQLQuery1.SQL.Text:= 'Check Table T2 EXTENDED';
SQLQuery1.ExecSQL;
Generates the error on the second call to ExecSQL;
OS: WinXP
FPC: 2.2.2
Laz: 0.9.26
MySQL: 5.4
Additional information:
For some weird reason however, if i put a "select" infront of it all, and it works fine !!
SQLQuery1.SQL.Text:= 'select * from T1';
SQLQuery1.ExecSQL;
SQLQuery1.SQL.Text:= 'Check Table T1 EXTENDED';
SQLQuery1.ExecSQL;
SQLQuery1.SQL.Text:= 'Check Table T2 EXTENDED';
SQLQuery1.ExecSQL;
works withput error
Mantis conversion info:
- Mantis ID: 14519
- Fixed in version: 3.0.0
- Fixed in revision: 20917 (#304db436)