diff options
| author | Konstantin Osipov <kostja@sun.com> | 2009-12-10 11:41:03 +0300 |
|---|---|---|
| committer | Konstantin Osipov <kostja@sun.com> | 2009-12-10 11:41:03 +0300 |
| commit | db6864b2a712cb9320bdf23c38482da65949a753 (patch) | |
| tree | 1af99bc4bb290dd6389f05386dda02b151f85ece /sql/sql_trigger.cc | |
| parent | 2e73ea7ea8a56765982ba5c8642ed5b14ef39fde (diff) | |
| parent | 1b5f2b9030e0dc19eaac22de7db429b6a7ba31ae (diff) | |
| download | mariadb-git-db6864b2a712cb9320bdf23c38482da65949a753.tar.gz | |
Merge with next-4284.
Diffstat (limited to 'sql/sql_trigger.cc')
| -rw-r--r-- | sql/sql_trigger.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sql/sql_trigger.cc b/sql/sql_trigger.cc index 08d0dacd8e8..823dca5d93f 100644 --- a/sql/sql_trigger.cc +++ b/sql/sql_trigger.cc @@ -328,7 +328,6 @@ bool mysql_create_or_drop_trigger(THD *thd, TABLE_LIST *tables, bool create) TABLE *table; bool result= TRUE; String stmt_query; - bool need_start_waiting= FALSE; bool lock_upgrade_done= FALSE; MDL_ticket *mdl_ticket= NULL; @@ -386,8 +385,7 @@ bool mysql_create_or_drop_trigger(THD *thd, TABLE_LIST *tables, bool create) LOCK_open is not enough because global read lock is held without holding LOCK_open). */ - if (!thd->locked_tables_mode && - !(need_start_waiting= !wait_if_global_read_lock(thd, 0, 1))) + if (!thd->locked_tables_mode && wait_if_global_read_lock(thd, 0, 1)) DBUG_RETURN(TRUE); if (!create) @@ -521,7 +519,7 @@ end: if (thd->locked_tables_mode && tables && lock_upgrade_done) mdl_ticket->downgrade_exclusive_lock(); - if (need_start_waiting) + if (thd->global_read_lock_protection > 0) start_waiting_global_read_lock(thd); if (!result) |
