summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2016-09-23 20:27:58 +0200
committerSergei Golubchik <serg@mariadb.org>2016-09-23 20:27:58 +0200
commit677c44f0c37973ad70550d9b807781e688764fae (patch)
tree348951761ef4ec0afb2b6ec5f97dc44c5384e6e7 /sql
parente56a53920b0075f9a534610032ee05f2e249e3ae (diff)
downloadmariadb-git-677c44f0c37973ad70550d9b807781e688764fae.tar.gz
MDEV-10775 System table in InnoDB format allowed in MariaDB could lead to crash
when opening a system table for a SELECT-like read, pretend (for the sake of engines) it's SQLCOM_SELECT
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_base.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index 6ec94016366..b9cc4e5d69a 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -9223,6 +9223,7 @@ open_system_tables_for_read(THD *thd, TABLE_LIST *table_list,
*/
lex->reset_n_backup_query_tables_list(&query_tables_list_backup);
thd->reset_n_backup_open_tables_state(backup);
+ thd->lex->sql_command= SQLCOM_SELECT;
if (open_and_lock_tables(thd, table_list, FALSE,
MYSQL_OPEN_IGNORE_FLUSH |