summaryrefslogtreecommitdiff
path: root/sql/sql_statistics.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-11-01 15:23:18 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2019-11-01 15:23:18 +0200
commitec40980ddd921a3a765c23cc430c9c219e48ea85 (patch)
tree6553832d3d3fb4b2cb39aea6a1d69e54275f6eb2 /sql/sql_statistics.cc
parent6801f80aface011811d2978f86c03a25ca7b9165 (diff)
parent9c72963d2aef783cae652b5b8ac01f7aa2bcb43a (diff)
downloadmariadb-git-ec40980ddd921a3a765c23cc430c9c219e48ea85.tar.gz
Merge 10.3 into 10.4
Diffstat (limited to 'sql/sql_statistics.cc')
-rw-r--r--sql/sql_statistics.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/sql/sql_statistics.cc b/sql/sql_statistics.cc
index abf6a8a3cad..a94fb1196b4 100644
--- a/sql/sql_statistics.cc
+++ b/sql/sql_statistics.cc
@@ -230,10 +230,8 @@ index_stat_def= {INDEX_STAT_N_FIELDS, index_stat_fields, 4, index_stat_pk_col};
Open all statistical tables and lock them
*/
-static
-inline int open_stat_tables(THD *thd, TABLE_LIST *tables,
- Open_tables_backup *backup,
- bool for_write)
+static int open_stat_tables(THD *thd, TABLE_LIST *tables,
+ Open_tables_backup *backup, bool for_write)
{
int rc;
@@ -241,12 +239,14 @@ inline int open_stat_tables(THD *thd, TABLE_LIST *tables,
thd->push_internal_handler(&deh);
init_table_list_for_stat_tables(tables, for_write);
init_mdl_requests(tables);
+ thd->in_sub_stmt|= SUB_STMT_STAT_TABLES;
rc= open_system_tables_for_read(thd, tables, backup);
+ thd->in_sub_stmt&= ~SUB_STMT_STAT_TABLES;
thd->pop_internal_handler();
/* If the number of tables changes, we should revise the check below. */
- DBUG_ASSERT(STATISTICS_TABLES == 3);
+ compile_time_assert(STATISTICS_TABLES == 3);
if (!rc &&
(stat_table_intact.check(tables[TABLE_STAT].table, &table_stat_def) ||