summaryrefslogtreecommitdiff
path: root/sql/lock.cc
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2004-10-20 16:24:28 +0300
committerunknown <monty@mysql.com>2004-10-20 16:24:28 +0300
commit560d7bcdd0c80551b7844b3669be503113c91ddf (patch)
treef3f6e81dac72352598beb9c21f116d2ef7f9c3ef /sql/lock.cc
parent7bdb93aa7e8b2c4d003f68635af8e1cbe757f6e6 (diff)
parentec8779e95a46b3dfff492196ad004cb2716df3c3 (diff)
downloadmariadb-git-560d7bcdd0c80551b7844b3669be503113c91ddf.tar.gz
Merge with 4.0
BitKeeper/etc/logging_ok: auto-union Docs/Support/texi2html: Auto merged innobase/trx/trx0rec.c: Auto merged libmysql/libmysql.c: Auto merged myisam/myisampack.c: Auto merged mysql-test/t/innodb-lock.test: Auto merged mysys/thr_lock.c: Auto merged sql/ha_innodb.cc: Auto merged sql/lock.cc: Auto merged sql/sql_acl.cc: Keep old code
Diffstat (limited to 'sql/lock.cc')
-rw-r--r--sql/lock.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/sql/lock.cc b/sql/lock.cc
index 215059b8a46..646babea6a1 100644
--- a/sql/lock.cc
+++ b/sql/lock.cc
@@ -792,9 +792,15 @@ bool wait_if_global_read_lock(THD *thd, bool abort_on_refresh,
{
if (thd->global_read_lock) // This thread had the read locks
{
- my_error(ER_CANT_UPDATE_WITH_READLOCK,MYF(0));
+ if (is_not_commit)
+ my_error(ER_CANT_UPDATE_WITH_READLOCK,MYF(0));
(void) pthread_mutex_unlock(&LOCK_open);
- DBUG_RETURN(1);
+ /*
+ We allow FLUSHer to COMMIT; we assume FLUSHer knows what it does.
+ This allowance is needed to not break existing versions of innobackup
+ which do a BEGIN; INSERT; FLUSH TABLES WITH READ LOCK; COMMIT.
+ */
+ DBUG_RETURN(is_not_commit);
}
old_message=thd->enter_cond(&COND_refresh, &LOCK_open,
"Waiting for release of readlock");