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

CHECK (ISNULL(code)=ISNULL(class)) syntax error

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Duplicate
    • 10.3.27
    • N/A
    • None
    • Linux 5.4.0-53-generic #59~18.04.1-Ubuntu
      Server version: 10.3.27-MariaDB-1:10.3.27+maria~bionic-log

    Description

      It was working before until this version. The clause "CHECK (ISNULL(code)=ISNULL(class))" now causes syntax error mistakenly. Please refer to screen capture for problem explanation and replication.

      root@fusion:~# uname -a
      Linux fusion 5.4.0-53-generic #59~18.04.1-Ubuntu SMP Wed Oct 21 12:14:56 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
      root@fusion:~#
      root@fusion:~# mysql fusion
      Reading table information for completion of table and column names
      You can turn off this feature to get a quicker startup with -A

      Welcome to the MariaDB monitor. Commands end with ; or \g.
      Your MariaDB connection id is 39
      Server version: 10.3.27-MariaDB-1:10.3.27+maria~bionic-log mariadb.org binary distribution

      Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

      Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

      MariaDB [fusion]> CREATE TABLE IF NOT EXISTS `test` (
      -> `jmaster` varchar(18) COLLATE utf8_bin NOT NULL,
      -> `class` varchar(2) COLLATE utf8_bin DEFAULT NULL,
      -> `code` varchar(5) COLLATE utf8_bin DEFAULT NULL CHECK (ISNULL(code)=ISNULL(class)),
      -> `id` int(11) NOT NULL AUTO_INCREMENT,
      -> PRIMARY KEY (`id`)
      -> ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
      ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '= (`class` is null)' at line 1
      MariaDB [fusion]>

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              brooketsui Brooke Tsui
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.