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

Unexpected error when UPDATE a NULL

    XMLWordPrintable

Details

    Description

      /* init */ CREATE TABLE t(c1 BLOB NOT NULL, c2 TEXT);
      /* init */ INSERT IGNORE INTO t VALUES (NULL, NULL), (NULL, 'abc');
       
      mariadb> UPDATE t SET c2 = 'test' WHERE c1;
      ERROR 1292 (22007): Truncated incorrect DOUBLE value: ''
       
      mariadb> SELECT * FROM t WHERE c1;
      Empty set, 2 warnings (0.00 sec)
       
      mariadb> DELETE FROM t WHERE c1;
      Query OK, 0 rows affected, 2 warnings (0.00 sec)
      

      Only UPDATE statement reports an error, while SELECT and DELETE do not report the error.

      Attachments

        Issue Links

          Activity

            People

              sanja Oleksandr Byelkin
              John Jove John Jove
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.