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

convert(-1, unsigned) returns different result with and without aggregate functions at neighborhood select item

    XMLWordPrintable

Details

    • Bug
    • Status: Confirmed (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 5.3.13, 5.5(EOL), 10.0(EOL), 10.1(EOL), 10.2(EOL), 10.3(EOL), 10.4(EOL), 10.5(EOL), 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL), 12.1(EOL)
    • 10.6, 10.11, 11.4, 11.8
    • None
    • None

    Description

      Output:

      mysql> drop table if exists t1;
      reate tQuery OK, 0 rows affected (0.01 sec)
       
      mysql> create table t1(c1 int);
      Query OK, 0 rows affected (0.00 sec)
       
      mysql> insert into t1 values(1);
      Query OK, 1 row affected (0.01 sec)

      mysql> select convert(-1, unsigned) from t1;
      +-----------------------+
      | convert(-1, unsigned) |
      +-----------------------+
      |  18446744073709551615 |
      +-----------------------+
      1 row in set, 1 warning (0.00 sec)
       
      mysql> select convert(-1, unsigned), count(1) from t1;
      +-----------------------+----------+
      | convert(-1, unsigned) | count(1) |
      +-----------------------+----------+
      |   9223372036854775807 |        1 |
      +-----------------------+----------+
      1 row in set, 1 warning (0.00 sec)

      mysql>
      mysql> select version();
      +-----------------+
      | version()       |
      +-----------------+
      | 10.1.10-MariaDB |
      +-----------------+
      1 row in set (0.00 sec)

      Recreate:

      drop table if exists t1;
      create table t1(c1 int);
      insert into t1 values(1);
      select convert(-1, unsigned) from t1;
      select convert(-1, unsigned), count(1) from t1;

      Problem:
      ========
      convert(-1, unsigned) should return 18446744073709551615 , no matter with or without aggregate function at neighborhood.

      Attachments

        Activity

          People

            bar Alexander Barkov
            dylan Dylan Su
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.