summaryrefslogtreecommitdiff
path: root/sql/lock.cc
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2005-08-11 15:58:15 +0300
committerunknown <monty@mysql.com>2005-08-11 15:58:15 +0300
commitd83f690851498c33f63a825ecd41dc73f3a8e73d (patch)
tree7d0b6e81295c86daf6c699dd29e763b6858d3b29 /sql/lock.cc
parentc4228519a663869ab3ab3d969890e4c6f5831e0f (diff)
downloadmariadb-git-d83f690851498c33f63a825ecd41dc73f3a8e73d.tar.gz
Cleanups during review of new code
mysql-test/t/sp.test: Use --disable_parsing instead of comments sql/lock.cc: Remove compiler warning sql/mysqld.cc: Always send valid flag argument to reload_acl_and_cache() sql/sp_cache.cc: Simple optimization Don't use mutex to read 'long' variable Indentation fixes sql/sp_head.cc: Fix comments to use /* */ Set proc_info to 0 after close_thread_tables() sql/sql_base.cc: remove not needed test sql/sql_parse.cc: Always send valid flag argument to reload_acl_and_cache() Fixed indentation Ensure we get an error if reset_master() fails.
Diffstat (limited to 'sql/lock.cc')
-rw-r--r--sql/lock.cc6
1 files changed, 1 insertions, 5 deletions
diff --git a/sql/lock.cc b/sql/lock.cc
index 568ca2b68af..941d7baa76e 100644
--- a/sql/lock.cc
+++ b/sql/lock.cc
@@ -849,10 +849,6 @@ static void print_lock_error(int error, const char *table)
So in this exceptional case the COMMIT should not be blocked by the FLUSH
TABLES WITH READ LOCK.
- TODO in MySQL 5.x: make_global_read_lock_block_commit() should be
- killable. Normally CPU does not spend a long time in this function (COMMITs
- are quite fast), but it would still be nice.
-
****************************************************************************/
volatile uint global_read_lock=0;
@@ -1003,7 +999,7 @@ bool make_global_read_lock_block_commit(THD *thd)
pthread_cond_wait(&COND_refresh, &LOCK_global_read_lock);
DBUG_EXECUTE_IF("make_global_read_lock_block_commit_loop",
protect_against_global_read_lock--;);
- if (error= thd->killed)
+ if ((error= test(thd->killed)))
global_read_lock_blocks_commit--; // undo what we did
else
thd->global_read_lock= MADE_GLOBAL_READ_LOCK_BLOCK_COMMIT;