diff --git a/mysql-test/main/sp-ucs2.result b/mysql-test/main/sp-ucs2.result index 0f5624314d7..389fa946ad5 100644 --- a/mysql-test/main/sp-ucs2.result +++ b/mysql-test/main/sp-ucs2.result @@ -142,7 +142,10 @@ DROP FUNCTION bug48766; call mtr.add_suppression('invalid value in column mysql.proc.'); set collation_connection=ucs2_general_ci; insert into mysql.proc (db, name, type, specific_name, language, sql_data_access, is_deterministic, security_type, param_list, returns, body, definer, created, modified, sql_mode, comment, character_set_client, collation_connection, db_collation, body_utf8 ) values ( 'a', 'a', 'function', 'bug14233_1', 'sql', 'reads_sql_data', 'no', 'definer', '', 'int(10)', 'select * from mysql.user', 'root@localhost', now(), '0000-00-00 00:00:00', '', '', '', '', '', 'select * from mysql.user' ); -select * from information_schema.routines where routine_name='a'; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1 +select routine_name from information_schema.routines where routine_name='a'; +routine_name +a +Warnings: +Warning 1601 Creation context of stored routine `a`.`a` is invalid set collation_connection=default; delete from mysql.proc where name='a'; diff --git a/mysql-test/main/sp-ucs2.test b/mysql-test/main/sp-ucs2.test index 004d62f4cc5..3276da3e257 100644 --- a/mysql-test/main/sp-ucs2.test +++ b/mysql-test/main/sp-ucs2.test @@ -179,7 +179,6 @@ DROP FUNCTION bug48766; call mtr.add_suppression('invalid value in column mysql.proc.'); set collation_connection=ucs2_general_ci; insert into mysql.proc (db, name, type, specific_name, language, sql_data_access, is_deterministic, security_type, param_list, returns, body, definer, created, modified, sql_mode, comment, character_set_client, collation_connection, db_collation, body_utf8 ) values ( 'a', 'a', 'function', 'bug14233_1', 'sql', 'reads_sql_data', 'no', 'definer', '', 'int(10)', 'select * from mysql.user', 'root@localhost', now(), '0000-00-00 00:00:00', '', '', '', '', '', 'select * from mysql.user' ); ---error ER_PARSE_ERROR -select * from information_schema.routines where routine_name='a'; +select routine_name from information_schema.routines where routine_name='a'; set collation_connection=default; delete from mysql.proc where name='a'; diff --git a/sql/sql_show.cc b/sql/sql_show.cc index aef07fa4425..f25a8861bc1 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -5059,7 +5059,8 @@ public: Sql_condition::enum_warning_level *level, const char* msg, Sql_condition ** cond_hdl) { - if (sql_errno == ER_TRG_NO_DEFINER || sql_errno == ER_TRG_NO_CREATION_CTX) + if (sql_errno == ER_TRG_NO_DEFINER || sql_errno == ER_TRG_NO_CREATION_CTX + || sql_errno == ER_PARSE_ERROR) return true; if (*level != Sql_condition::WARN_LEVEL_ERROR)