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

Unsigned BIGINT out of range on bulk insert only

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 1.1.10
    • 1.1.11
    • DBAPI 2.0
    • 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

          aleksa2396 Aleks created issue -
          anderbytes Anderson added a comment - - edited

          I have been experiencing this as well, and not with BIGINT, but INT (signed), too.

          edited
          The ONLY thing I could debug was that, if a value of -1 (int in Python) is trying to be inserted in a field where other high int number are, the error shows up.

          anderbytes Anderson added a comment - - edited I have been experiencing this as well, and not with BIGINT, but INT (signed), too. edited The ONLY thing I could debug was that, if a value of -1 (int in Python) is trying to be inserted in a field where other high int number are, the error shows up.
          anderbytes Anderson added a comment -

          Nevermind, mine was an different issue (I guess).

          Created it here: https://jira.mariadb.org/browse/CONPY-295

          Just disconsider my previous comment earlier.

          anderbytes Anderson added a comment - Nevermind, mine was an different issue (I guess). Created it here : https://jira.mariadb.org/browse/CONPY-295 Just disconsider my previous comment earlier.
          aleksa2396 Aleks added a comment -

          I had a look at the commit linked to this ticket and I suspect that the code owner accepted that there is an issue regarding unsigned integer.

          Again, from the very brief look on your ticket, it seems like a slightly different case.

          aleksa2396 Aleks added a comment - I had a look at the commit linked to this ticket and I suspect that the code owner accepted that there is an issue regarding unsigned integer. Again, from the very brief look on your ticket, it seems like a slightly different case.
          georg Georg Richter made changes -
          Field Original Value New Value
          Fix Version/s 1.1.11 [ 29806 ]
          georg Georg Richter added a comment -

          This issue was already fixed in 1.1.11

          georg Georg Richter added a comment - This issue was already fixed in 1.1.11
          georg Georg Richter made changes -
          Component/s DBAPI 2.0 [ 14516 ]
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Closed [ 6 ]

          People

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