diff options
author | Nirbhay Choubey <nirbhay@mariadb.com> | 2016-10-05 04:24:07 -0400 |
---|---|---|
committer | Nirbhay Choubey <nirbhay@mariadb.com> | 2016-11-02 09:45:43 -0400 |
commit | 3daf89ced99b41ad6144cd1d4236959e641f5592 (patch) | |
tree | 0f333f4ef121ee453757271ae77319b7e4737563 /sql/sql_statistics.cc | |
parent | 6dbfe7f399d121dc2a040b21c96777c0a47141fb (diff) | |
download | mariadb-git-3daf89ced99b41ad6144cd1d4236959e641f5592.tar.gz |
MDEV-10957: Assertion failure when dropping a myisam table with wsrep_replicate_myisam enabled
Internal updates to system statistical tables could wrongly
trigger an additional total-order replication if wsrep_repli
-cate_myisam is enabled.
Fixed by adding a check to skip total-order replication for
stat tables.
Test: galera.galera_var_replicate_myisam_on
Diffstat (limited to 'sql/sql_statistics.cc')
-rw-r--r-- | sql/sql_statistics.cc | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/sql/sql_statistics.cc b/sql/sql_statistics.cc index 311263c39b1..27bc0fb4cd3 100644 --- a/sql/sql_statistics.cc +++ b/sql/sql_statistics.cc @@ -3840,3 +3840,21 @@ double Histogram::point_selectivity(double pos, double avg_sel) return sel; } +/* + Check whether the table is one of the persistent statistical tables. +*/ +bool is_stat_table(const char *db, const char *table) +{ + DBUG_ASSERT(db && table); + + if (!memcmp(db, stat_tables_db_name.str, stat_tables_db_name.length)) + { + for (uint i= 0; i < STATISTICS_TABLES; i ++) + { + if (!memcmp(table, stat_table_name[i].str, stat_table_name[i].length)) + return true; + } + } + return false; +} + |