summaryrefslogtreecommitdiff
path: root/sql/sql_statistics.cc
diff options
context:
space:
mode:
authorVarun Gupta <varun.gupta@mariadb.com>2019-05-15 01:38:28 +0530
committerVarun Gupta <varun.gupta@mariadb.com>2019-05-16 08:33:06 +0530
commit6ab9d1627a16b79429036f0ef10e05639bbcf46b (patch)
treed869e26604beb8a2ca6d825c256b2d1c38cbb519 /sql/sql_statistics.cc
parenta941e58fb8a1911b1dabcd85c8f906e88466318d (diff)
downloadmariadb-git-6ab9d1627a16b79429036f0ef10e05639bbcf46b.tar.gz
MDEV-19407: Assertion `field->table->stats_is_read' failed in is_eits_usable
Statistics were not read for a table when we had a CREATE TABLE query. Enforce reading statistics for commands CREATE TABLE, SET and DO.
Diffstat (limited to 'sql/sql_statistics.cc')
-rw-r--r--sql/sql_statistics.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/sql_statistics.cc b/sql/sql_statistics.cc
index 81ab599ed64..37f73adccb3 100644
--- a/sql/sql_statistics.cc
+++ b/sql/sql_statistics.cc
@@ -2191,6 +2191,9 @@ inline bool statistics_for_command_is_needed(THD *thd)
case SQLCOM_DELETE_MULTI:
case SQLCOM_REPLACE:
case SQLCOM_REPLACE_SELECT:
+ case SQLCOM_CREATE_TABLE:
+ case SQLCOM_SET_OPTION:
+ case SQLCOM_DO:
break;
default:
return FALSE;