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

Very specific weird bug on Executemany

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 1.1.11
    • None
    • Build, Generic, Parser
    • Development with Windows 11
      MariaDB server 11.5.2 in Debian 12
    • 3.12.7

    Description

      Depending on the data payload to be inserted in the executemany command, the error
      mariadb.DataError: Out of range value for column 'xxxxxx' at row yy
      shows up

      using as examples the tuples below:

      [(1408531143, 'Amazon', '2021-04-16', True, -1, 1, 1, True, 434956, 135795468, '[]', '', 0, 434956, 253, None, None, None, None, '2021-03-18 19:40:23', '2024-05-24 13:30:51', False, False, False),
           (1442076847, 'Uber', '2021-04-15', True, -100000, 1, 1, True, 3263807, 59518995, '[]', '', 0, None, None, None, None, 1942076848, 6086428, '2021-04-15 17:26:41', '2024-03-18 09:47:03', False, False, False)]
      

      Trying to insert the tuples above in the same 'executemany' generates the error.
      Let's call A for the first value (above as -1 on the 5th column), and call B for the second value (above as -100000 on the 5th column)

      The 5th column is an INT (SIGNED), but the error also shows up with BIGINT. If needed, I can share my DDL to help debugging. Just ask me.

      For some weird reason, when A or B is specificly -1 , the bug is possible.
      The following combinations were tested:

      A B Result
      -1 -100000 Error
      0 -100000 OK
      1 -100000 OK
      3123121 -100000 OK
      -1 -100 OK
      -1 -65535 OK
      -1 -65536 Error
      -1 65535 OK
      -1 65536 Error
      1 65535 OK
      1 65536 OK
      90000 -1 Error
      30000 -1 OK
      -65535 -1 OK
      -65536 -1 Error

      Having in the same executemany, on the same field, -1 for one of the values and more than -65535 or more than 65535 on the second insert, calls the bug.

      Seems to have some kind of logic, it's not witchcraft.

      Attachments

        Activity

          People

            georg Georg Richter
            anderbytes Anderson
            Votes:
            0 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.