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

Inconsistent between normal SELECT and prepared statement

    XMLWordPrintable

Details

    Description

      Hi,

      In the following test case, the double negation of the boundary value `9223372036854775808` executes correctly in normal select, but triggers an integer overflow in the prepared statement.

      SELECT CEILING((- (-9223372036854775808)));   -- 9223372036854775808
      SET @a = -9223372036854775808;
      PREPARE prepare_query FROM 'SELECT CEILING((- (?)))';
      EXECUTE prepare_query USING @a;  -- BIGINT value is out of range in '--9223372036854775808'
      

      Attachments

        Issue Links

          Activity

            People

              bar Alexander Barkov
              ChiZhang Chi Zhang
              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.