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

Unsupported syntax used for auto-generation of CREATE TABLE

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 5.5, 10.1, 10.2, 10.3, 10.4
    • 10.4
    • Replication

    Description

      --source include/have_binlog_format_row.inc
      --source include/master-slave.inc
       
      SET sql_mode='MYSQL40';
       
      CREATE TEMPORARY TABLE tmp (a INT);
      CREATE TABLE t1 LIKE tmp;
       
      SHOW BINLOG EVENTS;
       
      --sync_slave_with_master
       
      # Cleanup
      --connection master
      DROP TABLE t1;
      --source include/rpl_end.inc
      

      CREATE TABLE is written into the binary log as

      master-bin.000001	329	Gtid	1	371	GTID 0-1-1
      master-bin.000001	371	Query	1	498	use `test`; CREATE TABLE `t1` (
        `a` int(11) DEFAULT NULL
      ) TYPE=MyISAM
      

      – note the TYPE= clause instead of ENGINE=, even though TYPE is not supported anymore, even with sql_mode=MYSQL40. Expectedly, it causes further replication abort.

      Last_Errno	1064
      Last_Error	Error '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 'TYPE=MyISAM' at line 3' on query. Default database: 'test'. Query: 'CREATE TABLE `t1` (
        `a` int(11) DEFAULT NULL
      ) TYPE=MyISAM'
      

      Reproducible on all current versions of MariaDB and MySQL 5.7, 8.0 (didn't try the latest, though).

      Attachments

        Activity

          People

            bnestere Brandon Nesterenko
            elenst Elena Stepanova
            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.