diff options
author | mikael@c-0409e253.1238-1-64736c10.cust.bredbandsbolaget.se <> | 2006-06-12 17:30:32 -0400 |
---|---|---|
committer | mikael@c-0409e253.1238-1-64736c10.cust.bredbandsbolaget.se <> | 2006-06-12 17:30:32 -0400 |
commit | 30817b8900dfbc8d6db730d9314b259e73285600 (patch) | |
tree | 81efea84f25fb7793496f32545aea40d703a199b /sql/lock.cc | |
parent | 1068ab153cb673eb1332b2db377aa327e7c3e6e8 (diff) | |
download | mariadb-git-30817b8900dfbc8d6db730d9314b259e73285600.tar.gz |
BUG#19122: Need to close all handlers before rename/drop phase in ALTER TABLE ADD/DROP/REORGANIZE partitions
After review fix
Diffstat (limited to 'sql/lock.cc')
-rw-r--r-- | sql/lock.cc | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/sql/lock.cc b/sql/lock.cc index 3a0aa99218f..efb4d696e67 100644 --- a/sql/lock.cc +++ b/sql/lock.cc @@ -924,16 +924,9 @@ int lock_table_name(THD *thd, TABLE_LIST *table_list, bool check_in_use) DBUG_RETURN(-1); } - if (!check_in_use) - { - DBUG_RETURN(0); - } - else - { - /* Return 1 if table is in use */ - DBUG_RETURN(test(remove_table_from_cache(thd, db, table_list->table_name, - RTFC_NO_FLAG))); - } + /* Return 1 if table is in use */ + DBUG_RETURN(test(remove_table_from_cache(thd, db, table_list->table_name, + check_in_use ? RTFC_NO_FLAG : RTFC_WAIT_OTHER_THREAD_FLAG))); } |