Commit 82a56c21 authored by Julius Goryavsky's avatar Julius Goryavsky

MDEV-34647: experimental fix

parent 3359ac09
connection node_2; connection node_2;
connection node_1; connection node_1;
SET GLOBAL wsrep_mode = "REPLICATE_MYISAM,REPLICATE_ARIA";
connection node_2;
SET GLOBAL wsrep_mode = "REPLICATE_MYISAM,REPLICATE_ARIA";
connection node_1;
# Case 1 CREATE SEQUENCE with no NOCACHE # Case 1 CREATE SEQUENCE with no NOCACHE
CREATE SEQUENCE s ENGINE=InnoDB; CREATE SEQUENCE s ENGINE=InnoDB;
ERROR 42000: This version of MariaDB doesn't yet support 'CACHE without INCREMENT BY 0 in Galera cluster' ERROR 42000: This version of MariaDB doesn't yet support 'CACHE without INCREMENT BY 0 in Galera cluster'
...@@ -239,3 +243,5 @@ pk ...@@ -239,3 +243,5 @@ pk
DROP TABLE t1; DROP TABLE t1;
DROP VIEW view_t1; DROP VIEW view_t1;
SET GLOBAL wsrep_mode=DEFAULT; SET GLOBAL wsrep_mode=DEFAULT;
connection node_2;
SET GLOBAL wsrep_mode=DEFAULT;
...@@ -4,6 +4,11 @@ ...@@ -4,6 +4,11 @@
--source include/have_sequence.inc --source include/have_sequence.inc
--source include/have_aria.inc --source include/have_aria.inc
SET GLOBAL wsrep_mode = "REPLICATE_MYISAM,REPLICATE_ARIA";
--connection node_2
SET GLOBAL wsrep_mode = "REPLICATE_MYISAM,REPLICATE_ARIA";
--connection node_1
--echo # Case 1 CREATE SEQUENCE with no NOCACHE --echo # Case 1 CREATE SEQUENCE with no NOCACHE
--error ER_NOT_SUPPORTED_YET --error ER_NOT_SUPPORTED_YET
CREATE SEQUENCE s ENGINE=InnoDB; CREATE SEQUENCE s ENGINE=InnoDB;
...@@ -182,3 +187,5 @@ SELECT * FROM t1; ...@@ -182,3 +187,5 @@ SELECT * FROM t1;
DROP TABLE t1; DROP TABLE t1;
DROP VIEW view_t1; DROP VIEW view_t1;
SET GLOBAL wsrep_mode=DEFAULT; SET GLOBAL wsrep_mode=DEFAULT;
--connection node_2
SET GLOBAL wsrep_mode=DEFAULT;
...@@ -4705,10 +4705,17 @@ mysql_execute_command(THD *thd, bool is_called_from_prepared_stmt) ...@@ -4705,10 +4705,17 @@ mysql_execute_command(THD *thd, bool is_called_from_prepared_stmt)
#ifdef WITH_WSREP #ifdef WITH_WSREP
if (wsrep && !first_table->view) if (wsrep && !first_table->view)
{ {
bool is_innodb= first_table->table->file->partition_ht()->db_type == DB_TYPE_INNODB; const legacy_db_type db_type= first_table->table->file->partition_ht()->db_type;
// For InnoDB we don't need to worry about anything here:
if (db_type != DB_TYPE_INNODB)
{
// If Aria or MyISAM are not replicated, then we have nothing to worry about either:
bool replicate= (db_type == DB_TYPE_MYISAM && wsrep_check_mode(WSREP_MODE_REPLICATE_MYISAM)) ||
(db_type == DB_TYPE_ARIA && wsrep_check_mode(WSREP_MODE_REPLICATE_ARIA));
if (replicate)
{
// For consistency check inserted table needs to be InnoDB // For consistency check inserted table needs to be InnoDB
if (!is_innodb && thd->wsrep_consistency_check != NO_CONSISTENCY_CHECK) if (thd->wsrep_consistency_check != NO_CONSISTENCY_CHECK)
{ {
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
HA_ERR_UNSUPPORTED, HA_ERR_UNSUPPORTED,
...@@ -4716,12 +4723,14 @@ mysql_execute_command(THD *thd, bool is_called_from_prepared_stmt) ...@@ -4716,12 +4723,14 @@ mysql_execute_command(THD *thd, bool is_called_from_prepared_stmt)
" for InnoDB tables."); " for InnoDB tables.");
thd->wsrep_consistency_check= NO_CONSISTENCY_CHECK; thd->wsrep_consistency_check= NO_CONSISTENCY_CHECK;
} }
// We start TOI if it is not yet started and hope for the best
// For !InnoDB we start TOI if it is not yet started and hope for the best if (!wsrep_toi)
if (!is_innodb && !wsrep_toi)
WSREP_TO_ISOLATION_BEGIN(first_table->db.str, first_table->table_name.str, NULL); WSREP_TO_ISOLATION_BEGIN(first_table->db.str, first_table->table_name.str, NULL);
} }
}
}
#endif /* WITH_WSREP */ #endif /* WITH_WSREP */
/* /*
Only the INSERT table should be merged. Other will be handled by Only the INSERT table should be merged. Other will be handled by
select. select.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment