summaryrefslogtreecommitdiff
path: root/sql/lock.cc
diff options
context:
space:
mode:
authorunknown <tomas@poseidon.ndb.mysql.com>2005-01-20 13:45:42 +0100
committerunknown <tomas@poseidon.ndb.mysql.com>2005-01-20 13:45:42 +0100
commit12d1ee5473faecc14137a00b73f8606244cf43d9 (patch)
treec518f3c3554eaf727ca41dc821925d2a09e57531 /sql/lock.cc
parent0c20ad6c1529a9efe9dcc84cc84039bb36471216 (diff)
downloadmariadb-git-12d1ee5473faecc14137a00b73f8606244cf43d9.tar.gz
added variable NDB_MGM to be able to run the management client in tests
added testcase for Bug#8035 added option to wait for not-started Bug#8035 mysql-test/mysql-test-run.sh: added variable NDB_MGM to be able to run the management client in tests mysql-test/r/ndb_autodiscover.result: added testcase for Bug#8035 mysql-test/t/ndb_autodiscover.test: added testcase for Bug#8035 ndb/tools/waiter.cpp: added option to wait for not-started sql/lock.cc: Bug#8035
Diffstat (limited to 'sql/lock.cc')
-rw-r--r--sql/lock.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/sql/lock.cc b/sql/lock.cc
index fffd48d5305..2dd12fce802 100644
--- a/sql/lock.cc
+++ b/sql/lock.cc
@@ -182,12 +182,12 @@ static int lock_external(THD *thd, TABLE **tables, uint count)
if ((error=(*tables)->file->external_lock(thd,lock_type)))
{
+ print_lock_error(error, (*tables)->file->table_type());
for (; i-- ; tables--)
{
(*tables)->file->external_lock(thd, F_UNLCK);
(*tables)->current_lock=F_UNLCK;
}
- print_lock_error(error, (*tables)->file->table_type());
DBUG_RETURN(error);
}
else
@@ -375,12 +375,13 @@ static int unlock_external(THD *thd, TABLE **table,uint count)
{
(*table)->current_lock = F_UNLCK;
if ((error=(*table)->file->external_lock(thd, F_UNLCK)))
+ {
error_code=error;
+ print_lock_error(error_code, (*table)->file->table_type());
+ }
}
table++;
} while (--count);
- if (error_code)
- print_lock_error(error_code, (*table)->file->table_type());
DBUG_RETURN(error_code);
}