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

Check-Constraint works on Windows 10 Pro x64 with MariaDB 10.4.12, but not on Debian 9 (backports kernel) on version 10.1.48-MariaDB-0+deb9u2

    XMLWordPrintable

Details

    Description

      Code here:

      SET SQL_NOTES = 0;
       
      CREATE DATABASE IF NOT EXISTS `pf_server`;
      USE `pf_server`;
      DROP TABLE IF EXISTS `clientdb_mapping`;
       
      CREATE TABLE IF NOT EXISTS `clientdb_mapping` (
        `id` int(11) NOT NULL AUTO_INCREMENT,
        `expected_hash` varchar(60) DEFAULT NULL,
        `identify_hash` varchar(60) DEFAULT NULL,
        CHECK (
          CASE
            WHEN expected_hash IS NULL THEN identify_hash IS NULL
          END
        ),
        CHECK (
          CASE
            WHEN expected_hash IS NOT NULL
              AND identify_hash IS NOT NULL THEN expected_hash = identify_hash
          END
        ),
        `db_name` varchar(100) NOT NULL,
        `db_version` varchar(25) NOT NULL DEFAULT '1.1.1',
        `allnodes` int(11) NOT NULL DEFAULT '9999',
        `licensedate` date NOT NULL DEFAULT '2099-01-01',
        `licensedatenodes` date NOT NULL DEFAULT '2099-01-01',
        `timestamp` datetime DEFAULT CURRENT_TIMESTAMP,
        PRIMARY KEY (`id`),
        UNIQUE KEY `identify_hash` (`identify_hash`)
      ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;
       
      SET SQL_NOTES = 1;
      

      Attachments

        Activity

          People

            serg Sergei Golubchik
            Müller Hans
            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.