Commit 5b35f753 authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

addresses #1178

made table locks occur only when explicit lock tables is done

git-svn-id: file:///svn/mysql/tokudb-engine/src@6910 c7de825b-a66e-492c-adef-691d508d4ae1
parent a376a28e
......@@ -3835,7 +3835,7 @@ int ha_tokudb::external_lock(THD * thd, int lock_type) {
}
trx->sp_level = trx->all;
trans_register_ha(thd, TRUE, tokudb_hton);
if (thd->in_lock_tables) {
if (thd->in_lock_tables && thd_sql_command(thd) == SQLCOM_LOCK_TABLES) {
//
// grab table locks
// For the command "Lock tables foo read, bar read"
......@@ -3878,7 +3878,7 @@ int ha_tokudb::external_lock(THD * thd, int lock_type) {
trans_register_ha(thd, FALSE, tokudb_hton);
}
else {
if (thd->in_lock_tables) {
if (thd->in_lock_tables && thd_sql_command(thd) == SQLCOM_LOCK_TABLES) {
assert(trx->all != NULL);
//
// For the command "Lock tables foo read, bar read"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment