Uploaded image for project: 'MariaDB Connector/node.js'
  1. MariaDB Connector/node.js
  2. CONJS-150

SQL Error 1210 in batch update

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 2.5.1
    • 2.5.2
    • batch
    • None
    • Docker, NodeJS

    Description

      I have a simple table :

      create table MYTABLE (
          id           varchar(  50) not null,
          payload      text not null default ('{}'),
          constraint MYTABLE_PK primary key (id)
      ) engine=innodb;
      

      I perform a simple update using batch mode with only two parameters, the first containing an item with a variable length (given by dataLength variable):

      await tx.batch(
        'update MYTABLE set payload=? where id=?',
        [
          [
            ''.padStart(dataLength, 'X'), // generates a string with 'dataLength' length
           '1'
          ],
          [
            'X',
            '2'
          ]
        ]
      );
      

      The update works fine with almost every dataLength values, except several discret ones :

      • if dataLength = 16365 : success
      • if dataLength = 16366 : failure (SqlError: (conn=302, no: 1210, SQLState: HY000) Incorrect arguments to mysqld_stmt_bulk_execute)
      • if dataLength = 16367 : success

      The problem also occurs with : 131053, 131055, 1048557, 1048559 & 16777194 bytes

      A ready to use testcase is avaliable here : https://gitlab.com/jean-francois.brazeau/mariadb-batch-failure/-/tree/simplifiedversion

      Attachments

        Activity

          People

            diego dupin Diego Dupin
            jbrazeau Jean-Francois Brazeau
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

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