Uploaded image for project: 'MariaDB Connector/ODBC'
  1. MariaDB Connector/ODBC
  2. ODBC-140

Query which inserts multiple rows fails.



    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 3.0.3
    • 2.0.17, 3.0.5
    • General
    • None
    • MariaDB 10.2.13 on FreeBSD 11.1, Client Windows 10 with ODBC Connector 3.0.3


      We are inserting about 1200 rows in batches of 50 into a table called "Positionen" . The create table statement is inside createTable.txt , the query that fails is inside Query50.txt .

      To reproduce, create a schema TESTDB and a table "Positionen" with the attached create statement. Then use the Code below to send the query through the ODBC Connector.

      System.Data.Odbc.OdbcConnection dbConnection = new System.Data.Odbc.OdbcConnection();
      System.Data.Odbc.OdbcCommand dbCommand;
      dbConnection.ConnectionString = "Driver={MariaDB ODBC 3.0 Driver};Server=mariadb-dev;Database=TESTDB;User=TEST;Password=TEST";
      dbCommand = dbConnection.CreateCommand();
      dbCommand.CommandText = "$INSERT"; 
      int result = dbCommand.ExecuteNonQuery();

      Inside the general query log two prepare statements are logged, but no execute is logged for the query from the file Query50.txt. The query does not return an exception. It returns 0 affected rows.

      If we change the row batchsize to 49, 51, 100 or anything else, all 1200 rows are successful.
      The file Query51.txt contains one extra row and is successful including all previous and subsequent batches on the table (does include the rows from Query50.txt).

      The insert batch size of 50 rows does work for MariaDB 10.1.31.

      Both queries are successful, if you use mysqlclient on MariaDB 10.2.13 .

      Does the syntax check fail without notice during the prepare on 10.2.13 for the query in the file Query50.txt?


        1. Query51.txt
          16 kB
        2. Query50.txt
          16 kB
        3. maodbc.dll
          2.32 MB
        4. createTable.txt
          0.6 kB



            Lawrin Lawrin Novitsky
            Patrick Dudziak Patrick Dudziak
            0 Vote for this issue
            3 Start watching this issue



              Git Integration

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