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

Overflow / value truncated warning is not produced on a SELECT containing such a value in WHERE clause

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Not a Bug
    • 5.5.25
    • 5.5.29
    • None
    • None

    Description

      It might be a variation of MDEV-414, but since it only seems to affect 5.5, I'm filing it separately.

      CREATE TABLE t2(c2 BIGINT NULL);
      INSERT INTO t2 VALUES (1),(2);
      SELECT * FROM t2 WHERE c2 = -9223372036854775809;
      c2

      On 5.3, this SELECT produces a warning:

      Warnings:
      Error	1916	Got overflow when converting '-9223372036854775809' to INT. Value truncated.

      It might be a bit strange that it has an error inside, but it worked the same way in MySQL 5.1, only the code was different:

      Warnings:
      Error	1292	Truncated incorrect DECIMAL value: ''

      In MySQL 5.5, it's a more traditional warning:

      Warnings:
      Warning	1292	Truncated incorrect DECIMAL value: ''

      But in MariaDB 5.5, no warning at all.

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              elenst Elena Stepanova
              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.