← Back to team overview

maria-developers team mailing list archive

MariaDB / Galera BUG

 

Environment:
MariaDB-10.0.16
Galera-3-25.3.9

This statement does nasty things to a MariaDB+Galera cluster:

CREATE TABLE u91rw_zoo_version (`version` varchar(255) NOT NULL) 
                               ENGINE=innoDB DEFAULT CHARSET=utf8
                               SELECT '3.3.3' as version;

Statement fails to replicate to the other nodes because the target
table doesn't exist. Cluster then disassembles itself.

This patch makes the problem disappear. Please evaluate?
(note: patch based against github.com/MariaDB/server.git)

=============

diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index be57be9b223a..d0521ed896b8 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -3325,6 +3325,11 @@ mysql_execute_command(THD *thd)
         /* Store reference to table in case of LOCK TABLES */
         create_info.table= create_table->table;
 
+        if (WSREP(thd) && (!thd->is_current_stmt_binlog_format_row() ||
+            !create_info.tmp_table()))
+        {
+         WSREP_TO_ISOLATION_BEGIN(create_table->db, create_table->table_name, NULL)
+        }
         /*
           select_create is currently not re-execution friendly and
           needs to be created for every execution of a PS/SP.

=============


We have a full environment setup in which to test. debug/trace available
on request. Will open bug if required for your workflow.

Thanks,

Andy


-- 
Andrew W. Elble
aweits@xxxxxxxxxxxxxxxxxx
Infrastructure Engineer, Communications Technical Lead
Rochester Institute of Technology
PGP: BFAD 8461 4CCF DC95 DA2C B0EB 965B 082E 863E C912


Follow ups