diff options
author | Alexander Barkov <bar@mariadb.com> | 2021-12-28 17:43:40 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.com> | 2022-01-25 10:31:03 +0400 |
commit | da37bfd8d6df4aca0476051daa321fef2787f937 (patch) | |
tree | d3563499f08bdb563adb6a90fdf742e2205d84c4 /mysql-test/suite/rpl | |
parent | 466d81709bf0d1d73dcade887bdc88ff5330739e (diff) | |
download | mariadb-git-da37bfd8d6df4aca0476051daa321fef2787f937.tar.gz |
MDEV-18918 SQL mode EMPTY_STRING_IS_NULL breaks RBR upon CREATE TABLE .. SELECT
Removing DEFAULT from INFORMATION_SCHEMA columns.
DEFAULT in read-only tables is rather meaningless.
Upgrade should go smoothly.
Also fixes:
MDEV-20254 Problems with EMPTY_STRING_IS_NULL and I_S tables
Diffstat (limited to 'mysql-test/suite/rpl')
-rw-r--r-- | mysql-test/suite/rpl/r/rpl_empty_string_is_null.result | 16 | ||||
-rw-r--r-- | mysql-test/suite/rpl/t/rpl_empty_string_is_null.test | 15 |
2 files changed, 31 insertions, 0 deletions
diff --git a/mysql-test/suite/rpl/r/rpl_empty_string_is_null.result b/mysql-test/suite/rpl/r/rpl_empty_string_is_null.result new file mode 100644 index 00000000000..5f35b56c559 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_empty_string_is_null.result @@ -0,0 +1,16 @@ +include/master-slave.inc +[connection master] +# +# MDEV-18918 SQL mode EMPTY_STRING_IS_NULL breaks RBR upon CREATE TABLE .. SELECT +# +SET SQL_MODE= 'EMPTY_STRING_IS_NULL'; +CREATE TABLE t1 AS SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE 1 = 0; +connection slave; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `TABLE_NAME` varchar(64) CHARACTER SET utf8 NOT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +connection master; +DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_empty_string_is_null.test b/mysql-test/suite/rpl/t/rpl_empty_string_is_null.test new file mode 100644 index 00000000000..a0fecbb54ac --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_empty_string_is_null.test @@ -0,0 +1,15 @@ +--source include/master-slave.inc +--source include/have_binlog_format_row.inc + +--echo # +--echo # MDEV-18918 SQL mode EMPTY_STRING_IS_NULL breaks RBR upon CREATE TABLE .. SELECT +--echo # + +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; +--connection master +DROP TABLE t1; + +--source include/rpl_end.inc |