diff options
author | unknown <serg@serg.mysql.com> | 2001-12-05 23:26:56 +0100 |
---|---|---|
committer | unknown <serg@serg.mysql.com> | 2001-12-05 23:26:56 +0100 |
commit | 739bf32e8930259a093bdcf76188f5f796efcc73 (patch) | |
tree | 122894c2dc5a4408e04a7d843ace2502acae9c1f | |
parent | ac02b727db4b805c26bf23ea1472c112cd5b098d (diff) | |
download | mariadb-git-739bf32e8930259a093bdcf76188f5f796efcc73.tar.gz |
bulk_insert feature can be turned off
-rw-r--r-- | Docs/manual.texi | 3 | ||||
-rw-r--r-- | myisam/mi_write.c | 2 | ||||
-rw-r--r-- | sql/mysqld.cc | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/Docs/manual.texi b/Docs/manual.texi index 9d3ef592382..ec7f1330377 100644 --- a/Docs/manual.texi +++ b/Docs/manual.texi @@ -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. diff --git a/myisam/mi_write.c b/myisam/mi_write.c index 5c6db053829..f8c19c40b01 100644 --- a/myisam/mi_write.c +++ b/myisam/mi_write.c @@ -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 *) diff --git a/sql/mysqld.cc b/sql/mysqld.cc index c4af3366806..b742b803628 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -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 }, |