Commit 676c38a8 authored by Rich Prohaska's avatar Rich Prohaska

#245 use row estimate parameter to start_bulk_insert to decide if a loader is used

parent e7496641
......@@ -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);
......
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