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

make IGNORE affect GEOMETRY and XMLTYPE errors

    XMLWordPrintable

Details

    Description

      MariaDB [test]> CREATE TABLE t (x XMLTYPE);
      Query OK, 0 rows affected (0,036 sec)
       
      MariaDB [test]> insert ignore into t values ('a');
      ERROR 1525 (HY000): Incorrect XMLTYPE value: 'a'
       
      MariaDB [test]> create table t1 (b geometry);
      Query OK, 0 rows affected (0.015 sec)
       
      MariaDB [test]> insert ignore t1 values ('a');
      ERROR 1416 (22003): Cannot get geometry object from data you send to the GEOMETRY field
      

      There are two kinds of data types. Some have a natural "zero value" others don't. Integers and strings do have it, GEOMETRY, XMLTYPE and UUID don't. Types that have it can replace an invalid value with a natural "zero" value. Types that don't throw an error.

      The latter behavior is somewhat unexpected if IGNORE is specified. Could be changed by inserting NULL (if the column is nullable) or skipping the whole row.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              alice Alice Sherepa
              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.