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

mariadnb_stmt_execute_direct in combination with mysql_real_query cause "out of sync"

    XMLWordPrintable

Details

    • Bug
    • Status: Stalled (View Workflow)
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None
    • server from 10.2 branch, Connector/C from master branch

    Description

      Here is minimal testcase I have come up with

      stmt = mysql_stmt_init(ma);

      mariadb_stmt_execute_direct(stmt, "SELECT 1,2", strlen("SELECT 1,2"));
      mysql_stmt_store_result(stmt);
      mysql_stmt_free_result(stmt);
      mysql_stmt_reset(stmt);

      mariadb_stmt_execute_direct(stmt, "SELECT 1,2", strlen("SELECT 1,2"));
      mysql_stmt_store_result(stmt);
      mysql_stmt_free_result(stmt);

      mysql_real_query(ma, "drop table if exists t_count", strlen("drop table if exists t_count"));

      mysql_real_query(ma, "create table t_count (a int)", strlen("create table t_count (a int)"));

      mysql_stmt_close(stmt);

      The error occurs on 2nd mysql_real_query. Moving mysql_stmt_close(stmt); above them changes nothing. Removing one of mariadb_stmt_execute_direct eliminates error.
      Lowered priority - closing, instead of resetting stmt between two mariadb_stmt_execute_direct calls eliminates bug. And closing is the right thing to do.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.