diff options
author | Jon Olav Hauglid <jon.hauglid@oracle.com> | 2013-02-28 14:52:47 +0100 |
---|---|---|
committer | Jon Olav Hauglid <jon.hauglid@oracle.com> | 2013-02-28 14:52:47 +0100 |
commit | d1c1981ba9e774106d99eba373eb79b9b5638f77 (patch) | |
tree | b508be02e2c7da90edfbb11d10170ef2354a93c6 /mysys/errors.c | |
parent | 7e0b6433955a829c2dc8ef7c1db9d203130292e9 (diff) | |
download | mariadb-git-d1c1981ba9e774106d99eba373eb79b9b5638f77.tar.gz |
Bug#16385711: HANDLER, CREATE TABLE IF NOT EXISTS,
PROBLEM AFTER MYSQL_HA_FIND
This problem occured if a prepared statement tried to create a table
for which there already existed a view with the same name while a
SQL handler was opened.
Before DDL statements are executed, mysql_ha_rm_tables() is called
to remove any matching tables from the internal list of opened SQL
handler tables. This match was done on TABLE_LIST::db and
TABLE_LIST::table_name. This is problematic for views (which use
TABLE_LIST::view_db and TABLE_LIST::view_name) and anonymous
derived tables.
This patch fixes the problem by skipping TABLE_LISTs representing
anonymous derived tables and using get_db_name()/get_table_name()
which handles views when looking for SQL handler tables to remove.
Diffstat (limited to 'mysys/errors.c')
0 files changed, 0 insertions, 0 deletions