Commit 739bf32e authored by unknown's avatar unknown

bulk_insert feature can be turned off

parent ac02b727
......@@ -18370,7 +18370,8 @@ After this many write locks, allow some read locks to run in between.
MySQL uses special tree-like cache to make bulk inserts (that is,
@code{INSERT ... SELECT}, @code{INSERT ... VALUES (...), (...), ...}, and
@code{LOAD DATA INFILE}) faster. This variable limits
the size of the cache tree in bytes per thread.
the size of the cache tree in bytes per thread. Setting it to 0
will disable this optimization.
@strong{Note:} This cache is only used when adding data to non-empty table.
Default value is 8 MB.
......@@ -809,7 +809,7 @@ int _mi_init_bulk_insert(MI_INFO *info)
}
}
if (!num_keys)
if (num_keys==0 || num_keys>myisam_bulk_insert_tree_size)
return 0;
info->bulk_insert=(TREE *)
......
......@@ -2930,7 +2930,7 @@ CHANGEABLE_VAR changeable_vars[] = {
{ "max_write_lock_count", (long*) &max_write_lock_count,
~0L, 1, ~0L, 0, 1 },
{ "myisam_bulk_insert_tree_size", (long*) &myisam_bulk_insert_tree_size,
8192*1024, 4, ~0L, 0, 1 },
8192*1024, 0, ~0L, 0, 1 },
{ "myisam_block_size", (long*) &opt_myisam_block_size,
MI_KEY_BLOCK_LENGTH, MI_MIN_KEY_BLOCK_LENGTH, MI_MAX_KEY_BLOCK_LENGTH,
0, MI_MIN_KEY_BLOCK_LENGTH },
......
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