From bf21d6334dc29c4f4a1ebebfa9a33c41a86553c7 Mon Sep 17 00:00:00 2001 From: Rich Prohaska Date: Sat, 31 May 2014 11:11:36 -0400 Subject: [PATCH] #245 use row estimate parameter to start_bulk_insert to decide if a loader is used --- storage/tokudb/ha_tokudb.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/tokudb/ha_tokudb.cc b/storage/tokudb/ha_tokudb.cc index ddacb6d1382..020fa3b526d 100644 --- a/storage/tokudb/ha_tokudb.cc +++ b/storage/tokudb/ha_tokudb.cc @@ -3250,7 +3250,7 @@ void ha_tokudb::start_bulk_insert(ha_rows rows) { num_DBs_locked_in_bulk = true; lock_count = 0; - if (share->try_table_lock) { + if ((rows == 0 || rows > 1) && share->try_table_lock) { if (get_prelock_empty(thd) && may_table_be_empty(transaction)) { if (using_ignore || is_insert_ignore(thd) || thd->lex->duplicates != DUP_ERROR) { acquire_table_lock(transaction, lock_write);