diff options
| author | Konstantin Osipov <kostja@sun.com> | 2010-10-14 20:56:56 +0400 |
|---|---|---|
| committer | Konstantin Osipov <kostja@sun.com> | 2010-10-14 20:56:56 +0400 |
| commit | efcb38e71e75800b4bf3bd0e2952511b3252bd98 (patch) | |
| tree | 0fc6d2e2e0a5ca88ee00db254cf90e3a5260206a /sql/sql_base.cc | |
| parent | 7774a0048a78dc4c5e9a641ef5547aac270f697f (diff) | |
| download | mariadb-git-efcb38e71e75800b4bf3bd0e2952511b3252bd98.tar.gz | |
A fix and a test case for Bug#56540 "Exception (crash) in
sql_show.cc during rqg_info_schema test on Windows".
Ensure we do not access freed memory when filling
information_schema.views when one of the views
could not be properly opened.
Diffstat (limited to 'sql/sql_base.cc')
| -rw-r--r-- | sql/sql_base.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc index fe7ec83b845..8caae3ee406 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -2902,8 +2902,12 @@ retry_share: */ if (check_and_update_table_version(thd, table_list, share)) goto err_unlock; - if (table_list->i_s_requested_object & OPEN_TABLE_ONLY) + if (table_list->i_s_requested_object & OPEN_TABLE_ONLY) + { + my_error(ER_NO_SUCH_TABLE, MYF(0), table_list->db, + table_list->table_name); goto err_unlock; + } /* Open view */ if (open_new_frm(thd, share, alias, @@ -2931,7 +2935,11 @@ retry_share: */ if (table_list->i_s_requested_object & OPEN_VIEW_ONLY) + { + my_error(ER_NO_SUCH_TABLE, MYF(0), table_list->db, + table_list->table_name); goto err_unlock; + } if (!(flags & MYSQL_OPEN_IGNORE_FLUSH)) { |
