[Commits] 636b0ae9600: Enable Slave

sujatha sujatha.sivakumar at mariadb.com
Thu May 30 15:16:40 EEST 2019


revision-id: 636b0ae9600a48ba4ff5b5a9f645b38c9a289fad (mariadb-10.1.39-51-g636b0ae9600)
parent(s): 78c1be8b6b427e1331bbf0e5d5a24d57dc1477e3
author: Sujatha
committer: Sujatha
timestamp: 2019-05-30 17:46:40 +0530
message:

Enable Slave

---
 mysql-test/suite/rpl/r/bug.result               | 15 +++++++++++++++
 mysql-test/suite/rpl/r/rpl_set_statement.result |  6 +++---
 mysql-test/suite/rpl/t/bug.test                 | 22 ++++++++++++++++++++++
 sql/sql_parse.cc                                |  2 +-
 4 files changed, 41 insertions(+), 4 deletions(-)

diff --git a/mysql-test/suite/rpl/r/bug.result b/mysql-test/suite/rpl/r/bug.result
new file mode 100644
index 00000000000..b89dcf7327e
--- /dev/null
+++ b/mysql-test/suite/rpl/r/bug.result
@@ -0,0 +1,15 @@
+include/master-slave.inc
+[connection master]
+SET STATEMENT storage_engine=Aria FOR CREATE TABLE t (i INT);
+SHOW CREATE TABLE t;
+Table	Create Table
+t	CREATE TABLE `t` (
+  `i` int(11) DEFAULT NULL
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+SHOW CREATE TABLE t;
+Table	Create Table
+t	CREATE TABLE `t` (
+  `i` int(11) DEFAULT NULL
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+DROP TABLE t;
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_set_statement.result b/mysql-test/suite/rpl/r/rpl_set_statement.result
index c9df74b0d3b..d2ed7fe3522 100644
--- a/mysql-test/suite/rpl/r/rpl_set_statement.result
+++ b/mysql-test/suite/rpl/r/rpl_set_statement.result
@@ -28,7 +28,7 @@ SELECT @@max_join_size;
 [connection slave]
 SELECT * FROM t1;
 a
-18446744073709551615
+2
 SELECT @@max_join_size;
 @@max_join_size
 18446744073709551615
@@ -104,7 +104,7 @@ SELECT @@sql_mode;
 [connection slave]
 SELECT * FROM t2;
 a
-
+NO_DIR_IN_CREATE
 SELECT @@sql_mode;
 @@sql_mode
 
@@ -131,7 +131,7 @@ SELECT @@max_heap_table_size;
 [connection slave]
 SELECT * FROM t1;
 a
-1048576
+16384
 SELECT @@max_heap_table_size;
 @@max_heap_table_size
 1048576
diff --git a/mysql-test/suite/rpl/t/bug.test b/mysql-test/suite/rpl/t/bug.test
new file mode 100644
index 00000000000..440d39e84c4
--- /dev/null
+++ b/mysql-test/suite/rpl/t/bug.test
@@ -0,0 +1,22 @@
+--source include/master-slave.inc
+
+ 
+
+SET STATEMENT storage_engine=Aria FOR CREATE TABLE t (i INT);
+
+SHOW CREATE TABLE t;
+
+ 
+
+--sync_slave_with_master
+
+SHOW CREATE TABLE t;
+
+ 
+
+--connection master
+
+DROP TABLE t;
+
+--source include/rpl_end.inc
+
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 9cb65e82321..e9cd869d24c 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -2733,7 +2733,7 @@ mysql_execute_command(THD *thd)
   thd->get_binlog_format(&orig_binlog_format,
                          &orig_current_stmt_binlog_format);
 
-  if (!lex->stmt_var_list.is_empty() && !thd->slave_thread)
+  if (!lex->stmt_var_list.is_empty())
   {
     Query_arena backup;
     DBUG_PRINT("info", ("SET STATEMENT %d vars", lex->stmt_var_list.elements));


More information about the commits mailing list