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

Xmltype with math operators should end up with Error:Illegal parameter data types

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 12.3
    • 12.3
    • XML
    • None

    Description

      MariaDB [test]> create table t ( a xmltype);
      Query OK, 0 rows affected (0,051 sec)
       
      MariaDB [test]> INSERT INTO t VALUES ('<a><b>1</b></a>'),('<x><y/></x>'),(NULL);
      Query OK, 3 rows affected (0,018 sec)
      Records: 3  Duplicates: 0  Warnings: 0
       
      MariaDB [test]> select a+1 from t;
      ERROR 4078 (HY000): Illegal parameter data types xmltype and int for operation '+'
       
      MariaDB [test]> select -a from t;
      +------+
      | -a   |
      +------+
      |   -0 |
      |   -0 |
      | NULL |
      +------+
      3 rows in set, 2 warnings (0,002 sec)
       
      Warning (Code 1292): Truncated incorrect DOUBLE value: '<a><b>1</b></a>'
      Warning (Code 1292): Truncated incorrect DOUBLE value: '<x><y/></x>'
      MariaDB [test]> select +a from t;
      +-----------------+
      | a               |
      +-----------------+
      | <a><b>1</b></a> |
      | <x><y/></x>     |
      | NULL            |
      +-----------------+
      3 rows in set (0,002 sec)
      

      Attachments

        Issue Links

          Activity

            People

              holyfoot Alexey Botchkov
              alice Alice Sherepa
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.