From 6ab9d1627a16b79429036f0ef10e05639bbcf46b Mon Sep 17 00:00:00 2001 From: Varun Gupta Date: Wed, 15 May 2019 01:38:28 +0530 Subject: 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. --- sql/sql_statistics.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sql/sql_statistics.cc') 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; -- cgit v1.2.1