Uploaded image for project: 'MariaDB Connector/Python'
  1. MariaDB Connector/Python
  2. CONPY-289

Unsigned BIGINT out of range on bulk insert only

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 1.1.10
    • None
    • None
    • None
    • Raspbian 11
    • 3.11

    Description

      I am running a MariaDB server and operating data via python connector.
      The setup is stable and many other operations are running with no issues.

      There is a table with 3 columns defined as `bigint(20) unsigned` and one int.
      Bigint columns used to store values that come close to (2^64)-1.

      Just to be specific, the value in question is `13837380911034793984` which is above signed limit, and requires the unsigned type.

      Simply speaking, `cursor.execute` works, but `cursor.executemany` fails with
      ` self._execute_bulk()
      mariadb.DataError: Out of range value for column 'fen2' at row 1`

      To narrow the issue I tried 3 ways to insert the same data and ony one is failing range validation

      1. *works *- manual insertion without any python code - `INSERT INTO `evaluations_binary` VALUES (0, 9232974212090577672, 11529232914765115761, 58), (0, 13837380911034793984, 11529233872889843812, 0), (0, 0, 2351636844950589488, 9999);`
      1. *works *- `cursor.execute` being called in a loop 3 times with each of the tuples above
      1. *fails * - `cursor.executemany` with a list consisting of 3 tuples above

      Attachments

        Activity

          People

            georg Georg Richter
            aleksa2396 Aleks
            Votes:
            1 Vote for this issue
            Watchers:
            2 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.