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

Possible regression with STRICT MODE producing warning on WHERE Clause

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Not a Bug
    • 10.1.14
    • N/A
    • Optimizer
    • None

    Description

      Following test case was working in 10.0 and stop executing the last query after migration to 10.1
      http://pastebin.com/7MpqiBzp

      CREATE  TABLE the_flags
      (
      lot_id varchar(255) PRIMARY KEY NOT NULL DEFAULT '' ,
      flags binary(2) NOT NULL DEFAULT '\0\0'
      );
       
      INSERT INTO the_flags VALUES
      ('a', 5),
      ('b', 5),
      ('c', 5);
       
      CREATE  TABLE the_new_flags
      (
      lot_id varchar(255) PRIMARY KEY NOT NULL DEFAULT '',
      flags binary(2) NOT NULL DEFAULT '\0\0'
      );
       
      INSERT INTO the_new_flags
      (
          SELECT lot_id, 1
          FROM the_flags
          WHERE ((cast( flags as binary) & 4)=4)
      );
      

      We would like to understand if the enforcement on strict mode do propagate warnings from read queries and what is the truncation issue in this case ?,
      The inserted values looks correct in regards to the table definition.

      Attachments

        Activity

          People

            bar Alexander Barkov
            stephane@skysql.com VAROQUI Stephane
            Votes:
            0 Vote for this issue
            Watchers:
            4 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.