Commit 0d85c905 authored by Julius Goryavsky's avatar Julius Goryavsky

MDEV-34269: post-fix code simplification

The code is slightly simplified taking into account
the fact that partition_ht() always returns a normal
hton when there is no partitioning.
parent 01728879
...@@ -117,10 +117,8 @@ class Wsrep_load_data_split ...@@ -117,10 +117,8 @@ class Wsrep_load_data_split
*/ */
if (WSREP(thd) && wsrep_load_data_splitting) if (WSREP(thd) && wsrep_load_data_splitting)
{ {
handlerton *ht= table->s->db_type();
// For partitioned tables find underlying hton // For partitioned tables find underlying hton
if (table->file->partition_ht()) handlerton *ht= table->file->partition_ht();
ht= table->file->partition_ht();
if (ht->db_type != DB_TYPE_INNODB) if (ht->db_type != DB_TYPE_INNODB)
{ {
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
......
...@@ -4747,9 +4747,7 @@ mysql_execute_command(THD *thd) ...@@ -4747,9 +4747,7 @@ mysql_execute_command(THD *thd)
#ifdef WITH_WSREP #ifdef WITH_WSREP
if (wsrep && !first_table->view) if (wsrep && !first_table->view)
{ {
const handlerton *hton = first_table->table->file->partition_ht() ? bool is_innodb= first_table->table->file->partition_ht()->db_type == DB_TYPE_INNODB;
first_table->table->file->partition_ht() : first_table->table->file->ht;
bool is_innodb= (hton->db_type == DB_TYPE_INNODB);
// 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 (!is_innodb && thd->wsrep_consistency_check != NO_CONSISTENCY_CHECK)
......
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