From c7150fd814603bb12a686ea0857296b92282de1b Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 26 Jul 2007 18:33:05 +0300 Subject: [PATCH] Bug #30036: SHOW TABLE TYPES causes the debug client to crash SHOW TABLE TYPES is a (to be deprecated) synonym for SHOW STORAGE ENGINES. Fixed to use the right schema table in addition to issuing a warning. mysql-test/r/show_check.result: Bug #30036: test case mysql-test/t/show_check.test: Bug #30036: test case sql/sql_yacc.yy: Bug #30036: use the right schema table --- mysql-test/r/show_check.result | 1 + mysql-test/t/show_check.test | 8 ++++++++ sql/sql_yacc.yy | 2 ++ 3 files changed, 11 insertions(+) diff --git a/mysql-test/r/show_check.result b/mysql-test/r/show_check.result index 2bdd29602fb..83881be8ad4 100644 --- a/mysql-test/r/show_check.result +++ b/mysql-test/r/show_check.result @@ -1351,4 +1351,5 @@ DROP PROCEDURE p1; DROP FUNCTION f1; DROP TABLE t1; DROP EVENT ev1; +SHOW TABLE TYPES; End of 5.1 tests diff --git a/mysql-test/t/show_check.test b/mysql-test/t/show_check.test index 09c0b08a3cd..f2dba49f455 100644 --- a/mysql-test/t/show_check.test +++ b/mysql-test/t/show_check.test @@ -977,4 +977,12 @@ DROP FUNCTION f1; DROP TABLE t1; DROP EVENT ev1; +# +# Bug #30036: SHOW TABLE TYPES causes the debug client to crash +# +--disable_result_log +SHOW TABLE TYPES; +--enable_result_log + + --echo End of 5.1 tests diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index d9a808bf8f7..468c3305c57 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -8729,6 +8729,8 @@ show_param: LEX *lex=Lex; lex->sql_command= SQLCOM_SHOW_STORAGE_ENGINES; WARN_DEPRECATED(yythd, "5.2", "SHOW TABLE TYPES", "'SHOW [STORAGE] ENGINES'"); + if (prepare_schema_table(YYTHD, lex, 0, SCH_ENGINES)) + MYSQL_YYABORT; } | opt_storage ENGINES_SYM {