fix overactive assert

git-svn-id: file:///svn/mysql/tokudb-engine/src@4767 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
Zardosht Kasheff 2008-06-26 19:39:19 +00:00 committed by Yoni Fogel
parent 4d300a2348
commit 661e8854f8

View file

@ -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