Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-25808

PREPARE/EXECUTE makes signed integer out of unsigned

Details

    Description

      how to repeat:

      On Spider:

      CREATE TABLE t1 (
        `c1` bigint(20) UNSIGNED DEFAULT NULL
      )ENGINE=SPIDER PARTITION BY LIST (`c1` MOD 4)
      (PARTITION `pt0` VALUES IN (0)....);
       
      insert into t1(c1) values (6800281190650363904), (17864960750176564435);
       
      mysql> PREPARE p1 FROM 'select * FROM t1 WHERE c1 = ?';
      Query OK, 0 rows affected (0.05 sec)
      Statement prepared
       
      mysql> EXECUTE p1 USING 17864960750176564435; # BUG HERE
      Empty set (0.11 sec)
       
      mysql> SELECT * FROM t1 WHERE c1 = 17864960750176564435; # CORRECT HERE
      +----------------------+
      | c1                   |
      +----------------------+
      | 17864960750176564435 |
      +----------------------+
      1 row in set (0.01 sec)
      
      

      Attachments

        Activity

          yongxinxu Yongxin Xu created issue -
          serg Sergei Golubchik made changes -
          Field Original Value New Value
          Assignee Kentoku Shiba [ kentoku ]
          serg Sergei Golubchik made changes -
          Fix Version/s 10.3 [ 22126 ]
          Fix Version/s 10.4 [ 22408 ]
          Fix Version/s 10.5 [ 23123 ]
          Fix Version/s 10.6 [ 24028 ]
          serg Sergei Golubchik made changes -
          Status Open [ 1 ] Confirmed [ 10101 ]
          serg Sergei Golubchik made changes -
          Assignee Kentoku Shiba [ kentoku ] Sergei Golubchik [ serg ]
          serg Sergei Golubchik made changes -
          Priority Minor [ 4 ] Major [ 3 ]
          serg Sergei Golubchik made changes -
          Status Confirmed [ 10101 ] In Review [ 10002 ]
          serg Sergei Golubchik made changes -
          Summary Integer overflow when using PREPARE/EXECUTE on Spider PREPARE/EXECUTE makes signed integer out of unsigned
          serg Sergei Golubchik made changes -
          Component/s Prepared Statements [ 10804 ]
          serg Sergei Golubchik made changes -
          Status In Review [ 10002 ] Stalled [ 10000 ]
          serg Sergei Golubchik made changes -
          Fix Version/s 10.3.31 [ 26028 ]
          Fix Version/s 10.4.21 [ 26030 ]
          Fix Version/s 10.5.12 [ 26025 ]
          Fix Version/s 10.6.4 [ 26033 ]
          Fix Version/s 10.3 [ 22126 ]
          Fix Version/s 10.4 [ 22408 ]
          Fix Version/s 10.5 [ 23123 ]
          Fix Version/s 10.6 [ 24028 ]
          Resolution Fixed [ 1 ]
          Status Stalled [ 10000 ] Closed [ 6 ]
          serg Sergei Golubchik made changes -
          Workflow MariaDB v3 [ 122303 ] MariaDB v4 [ 159349 ]

          People

            serg Sergei Golubchik
            yongxinxu Yongxin Xu
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.