summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/rpl/t/rpl_loaddata_charset.test
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 12:24:36 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 12:24:36 +0000
commit06eaf7232e9a920468c0f8d74dcf2fe8b555501c (patch)
treee2c7b5777f728320e5b5542b6213fd3591ba51e2 /mysql-test/suite/rpl/t/rpl_loaddata_charset.test
parentInitial commit. (diff)
downloadmariadb-06eaf7232e9a920468c0f8d74dcf2fe8b555501c.tar.xz
mariadb-06eaf7232e9a920468c0f8d74dcf2fe8b555501c.zip
Adding upstream version 1:10.11.6.upstream/1%10.11.6
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/suite/rpl/t/rpl_loaddata_charset.test')
-rw-r--r--mysql-test/suite/rpl/t/rpl_loaddata_charset.test49
1 files changed, 49 insertions, 0 deletions
diff --git a/mysql-test/suite/rpl/t/rpl_loaddata_charset.test b/mysql-test/suite/rpl/t/rpl_loaddata_charset.test
new file mode 100644
index 00000000..bb87ee95
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_loaddata_charset.test
@@ -0,0 +1,49 @@
+#
+# Check LOAD DATA + character sets + replication
+#
+source include/master-slave.inc;
+
+#
+# Bug#15126 character_set_database is not replicated
+# (LOAD DATA INFILE need it)
+#
+connection master;
+create table t1 (a varchar(10) character set utf8);
+load data infile '../../std_data/loaddata6.dat' into table t1;
+set @@character_set_database=koi8r;
+load data infile '../../std_data/loaddata6.dat' into table t1;
+set @@character_set_database=DEFAULT;
+load data infile '../../std_data/loaddata6.dat' into table t1;
+load data infile '../../std_data/loaddata6.dat' into table t1;
+load data infile '../../std_data/loaddata6.dat' into table t1;
+set @@character_set_database=koi8r;
+load data infile '../../std_data/loaddata6.dat' into table t1;
+set @@character_set_database=DEFAULT;
+load data infile '../../std_data/loaddata6.dat' into table t1 character set koi8r;
+
+select hex(a) from t1;
+
+sync_slave_with_master;
+
+select hex(a) from t1;
+connection master;
+drop table t1;
+sync_slave_with_master;
+
+#
+# Bug#45516
+# When slave SQL thread executing LOAD DATA command, the
+# thd->variables.collation_database was not set properly to the default
+# database charset
+#
+
+echo -------------test bug#45516------------------;
+
+# LOAD DATA INFILE
+let $LOAD_LOCAL=1;
+source include/rpl_loaddata_charset.inc;
+
+# LOAD DATA LOCAL INFILE
+let $LOAD_LOCAL=0;
+source include/rpl_loaddata_charset.inc;
+--source include/rpl_end.inc