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

MDEV-34647: experimental fix

parent 3359ac09
connection node_2;
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
CREATE SEQUENCE s ENGINE=InnoDB;
ERROR 42000: This version of MariaDB doesn't yet support 'CACHE without INCREMENT BY 0 in Galera cluster'
......@@ -239,3 +243,5 @@ pk
DROP TABLE t1;
DROP VIEW view_t1;
SET GLOBAL wsrep_mode=DEFAULT;
connection node_2;
SET GLOBAL wsrep_mode=DEFAULT;
......@@ -4,6 +4,11 @@
--source include/have_sequence.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
--error ER_NOT_SUPPORTED_YET
CREATE SEQUENCE s ENGINE=InnoDB;
......@@ -182,3 +187,5 @@ SELECT * FROM t1;
DROP TABLE t1;
DROP VIEW view_t1;
SET GLOBAL wsrep_mode=DEFAULT;
--connection node_2
SET GLOBAL wsrep_mode=DEFAULT;
......@@ -4705,23 +4705,32 @@ mysql_execute_command(THD *thd, bool is_called_from_prepared_stmt)
#ifdef WITH_WSREP
if (wsrep && !first_table->view)
{
bool is_innodb= first_table->table->file->partition_ht()->db_type == DB_TYPE_INNODB;
// For consistency check inserted table needs to be InnoDB
if (!is_innodb && thd->wsrep_consistency_check != NO_CONSISTENCY_CHECK)
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)
{
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
HA_ERR_UNSUPPORTED,
"Galera cluster does support consistency check only"
" for InnoDB tables.");
thd->wsrep_consistency_check= NO_CONSISTENCY_CHECK;
// 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
if (thd->wsrep_consistency_check != NO_CONSISTENCY_CHECK)
{
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
HA_ERR_UNSUPPORTED,
"Galera cluster does support consistency check only"
" for InnoDB tables.");
thd->wsrep_consistency_check= NO_CONSISTENCY_CHECK;
}
// We start TOI if it is not yet started and hope for the best
if (!wsrep_toi)
WSREP_TO_ISOLATION_BEGIN(first_table->db.str, first_table->table_name.str, NULL);
}
}
// For !InnoDB we start TOI if it is not yet started and hope for the best
if (!is_innodb && !wsrep_toi)
WSREP_TO_ISOLATION_BEGIN(first_table->db.str, first_table->table_name.str, NULL);
}
#endif /* WITH_WSREP */
/*
Only the INSERT table should be merged. Other will be handled by
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