Commit 661e8854 authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

addresses #922

fix overactive assert

git-svn-id: file:///svn/mysql/tokudb-engine/src@4767 c7de825b-a66e-492c-adef-691d508d4ae1
parent 4d300a23
......@@ -3091,11 +3091,10 @@ int ha_tokudb::external_lock(THD * thd, int lock_type) {
// foo. The locks for bar will be grabbed when
// trx->tokudb_lock_count has been initialized
//
assert(lock.type == TL_WRITE || lock.type == TL_READ_NO_INSERT);
if (lock.type == TL_READ_NO_INSERT) {
if (lock.type <= TL_READ_NO_INSERT) {
error = acquire_table_lock(trx->all,lock_read);
}
else if (lock.type == TL_WRITE) {
else {
error = acquire_table_lock(trx->all,lock_write);
}
// Don't create stmt trans
......
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