Uploaded image for project: 'MariaDB Connector/C'
  1. MariaDB Connector/C
  2. CONC-331

"Out of sync" error on 2nd batch query

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Not a Bug
    • Affects Version/s: 3.0.4
    • Fix Version/s: N/A
    • 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.

        Attachments

          Activity

            People

            Assignee:
            georg Georg Richter
            Reporter:
            Lawrin Lawrin Novitsky
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: