mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 02:05:57 +01:00
MDEV-34647: small refactoring after main fix
This commit is contained in:
parent
74d7168765
commit
b65bbb2fae
1 changed files with 26 additions and 26 deletions
|
@ -4747,36 +4747,36 @@ mysql_execute_command(THD *thd)
|
||||||
#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:
|
||||||
// For consistency check inserted table needs to be InnoDB
|
if (db_type != DB_TYPE_INNODB)
|
||||||
if (!is_innodb && thd->wsrep_consistency_check != NO_CONSISTENCY_CHECK)
|
|
||||||
{
|
{
|
||||||
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
|
// For consistency check inserted table needs to be InnoDB
|
||||||
HA_ERR_UNSUPPORTED,
|
if (thd->wsrep_consistency_check != NO_CONSISTENCY_CHECK)
|
||||||
"Galera cluster does support consistency check only"
|
{
|
||||||
" for InnoDB tables.");
|
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
|
||||||
thd->wsrep_consistency_check= NO_CONSISTENCY_CHECK;
|
HA_ERR_UNSUPPORTED,
|
||||||
}
|
"Galera cluster does support consistency check only"
|
||||||
|
" for InnoDB tables.");
|
||||||
/* Only TOI allowed to !InnoDB tables */
|
thd->wsrep_consistency_check= NO_CONSISTENCY_CHECK;
|
||||||
if (!is_innodb && wsrep_OSU_method_get(thd) != WSREP_OSU_TOI)
|
}
|
||||||
{
|
/* Only TOI allowed to !InnoDB tables */
|
||||||
my_error(ER_NOT_SUPPORTED_YET, MYF(0), "RSU on this table engine");
|
if (wsrep_OSU_method_get(thd) != WSREP_OSU_TOI)
|
||||||
break;
|
{
|
||||||
}
|
my_error(ER_NOT_SUPPORTED_YET, MYF(0), "RSU on this table engine");
|
||||||
|
break;
|
||||||
// For !InnoDB we start TOI if it is not yet started and hope for the best
|
}
|
||||||
if (!is_innodb && !wsrep_toi)
|
// For !InnoDB we start TOI if it is not yet started and hope for the best
|
||||||
{
|
if (!wsrep_toi)
|
||||||
const legacy_db_type db_type= first_table->table->file->partition_ht()->db_type;
|
{
|
||||||
|
/* Currently we support TOI for MyISAM only. */
|
||||||
/* Currently we support TOI for MyISAM only. */
|
if (db_type == DB_TYPE_MYISAM && wsrep_replicate_myisam)
|
||||||
if (db_type == DB_TYPE_MYISAM && wsrep_replicate_myisam)
|
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.
|
||||||
|
|
Loading…
Add table
Reference in a new issue