diff options
author | unknown <monty@mysql.com> | 2004-08-24 18:00:45 +0300 |
---|---|---|
committer | unknown <monty@mysql.com> | 2004-08-24 18:00:45 +0300 |
commit | 20f24a422bd8ff8747c2e75c03b9f207875ad880 (patch) | |
tree | 0889ac56857787d5328320949bb6d8339acf6407 /sql/lock.cc | |
parent | 4e7cb1ce4892a025de932fe969676a1131e004b4 (diff) | |
download | mariadb-git-20f24a422bd8ff8747c2e75c03b9f207875ad880.tar.gz |
Portablity fixes & simple optimizations
sql/ha_ndbcluster.cc:
Added missing cast
sql/item.cc:
Portability fix (for windows)
sql/lock.cc:
Cleanup + more comments
sql/sql_class.cc:
Portability fix + more comments
sql/sql_select.cc:
Portability fix
sql/sql_table.cc:
Simpler handling of auto_increment in ALTER TABLE
Diffstat (limited to 'sql/lock.cc')
-rw-r--r-- | sql/lock.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sql/lock.cc b/sql/lock.cc index fa199ce7454..fab0a61e506 100644 --- a/sql/lock.cc +++ b/sql/lock.cc @@ -787,7 +787,7 @@ bool wait_if_global_read_lock(THD *thd, bool abort_on_refresh, bool is_not_commi LINT_INIT(old_message); (void) pthread_mutex_lock(&LOCK_open); - if (need_exit_cond= must_wait) + if ((need_exit_cond= must_wait)) { if (thd->global_read_lock) // This thread had the read locks { @@ -805,7 +805,11 @@ bool wait_if_global_read_lock(THD *thd, bool abort_on_refresh, bool is_not_commi } if (!abort_on_refresh && !result) protect_against_global_read_lock++; - if (unlikely(need_exit_cond)) // global read locks are rare + /* + The following is only true in case of a global read locks (which is rare) + and if old_message is set + */ + if (unlikely(need_exit_cond)) thd->exit_cond(old_message); else pthread_mutex_unlock(&LOCK_open); |