[CONC-331] "Out of sync" error on 2nd batch query Created: 2018-05-09  Updated: 2018-05-10  Resolved: 2018-05-10

Status: Closed
Project: MariaDB Connector/C
Component/s: None
Affects Version/s: 3.0.4
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Lawrin Novitsky Assignee: Georg Richter
Resolution: Not a Bug Votes: 0
Labels: None


 Description   

To repeat is as simple as following:

ma = mysql_init(NULL);
mysql_real_connect(ma, "localhost", "root", "", "test", 3306, NULL, CLIENT_MULTI_STATEMENTS);
mysql_query(ma, "DROP TABLE IF EXISTS t1; CREATE TABLE t1(a int)");
mysql_query(ma, "DROP TABLE IF EXISTS t2; CREATE TABLE t2(a int)");

2nd mysql_query fails with "out of sync" error because mysql->server_status is 10, that means that SERVER_MORE_RESULTS_EXIST. I did not try other statements combinations yet.
I tested with different servers, but only with latest 3.0 connector. If I skip the row, returning error in c/c, execution succeeds.
I am afraid that is even a show stopper.


Generated at Thu Feb 08 03:04:32 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.