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

PREPARE/EXECUTE makes signed integer out of unsigned

    XMLWordPrintable

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

          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.