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

SQL mode EMPTY_STRING_IS_NULL breaks RBR upon CREATE TABLE .. SELECT

    XMLWordPrintable

Details

    Description

      --source include/master-slave.inc
      --source include/have_binlog_format_row.inc
       
      SET SQL_MODE= 'EMPTY_STRING_IS_NULL';
       
      CREATE TABLE t1 AS SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE 1 = 0;
       
      --sync_slave_with_master
       
      SHOW CREATE TABLE t1;
       
      # Cleanup
      --connection master
      DROP TABLE t1;
      --source include/rpl_end.inc
      

      10.3 f010c908

      Last_Errno	1067
      Last_Error	Error 'Invalid default value for 'TABLE_NAME'' on query. Default database: 'test'. Query: 'CREATE TABLE `t1` (
        `TABLE_NAME` varchar(64) CHARACTER SET utf8 NOT NULL DEFAULT ''
      )'
      

      Technically the error isn't wrong, so I have no idea what should be done about it; but I guess it shouldn't just be allowed to fail.

      Attachments

        Issue Links

          Activity

            People

              bar Alexander Barkov
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              8 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.