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

Query which inserts multiple rows fails.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.3
    • Fix Version/s: 2.0.17, 3.0.5
    • Component/s: General
    • Labels:
      None
    • Environment:
      MariaDB 10.2.13 on FreeBSD 11.1, Client Windows 10 with ODBC Connector 3.0.3

      Description

      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";
               
      dbConnection.Open();
      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?

        Attachments

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

          Activity

            People

            • Assignee:
              Lawrin Lawrin Novitsky
              Reporter:
              Patrick Dudziak Patrick Dudziak
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: