summaryrefslogtreecommitdiff
path: root/sql/sql_insert.cc
diff options
context:
space:
mode:
authorunknown <monty@mashka.mysql.fi>2002-09-18 21:04:49 +0300
committerunknown <monty@mashka.mysql.fi>2002-09-18 21:04:49 +0300
commit202679d48775587f04a9d3e21861e05aafd52dfe (patch)
tree83f34b98c4e43e4f23f9b941d93676b65ef1b657 /sql/sql_insert.cc
parent857363166c94eb7b2138d4f195ada007fa849aa9 (diff)
downloadmariadb-git-202679d48775587f04a9d3e21861e05aafd52dfe.tar.gz
Added code to flush a bulk_insert index.
This fixes a bug when doing multi-row inserts on table with an auto_increment key that is not in the first key segment. Docs/manual.texi: Changelog include/my_base.h: Added code to flush a bulk_insert index myisam/mi_extra.c: Added code to flush a bulk_insert index mysql-test/r/insert.result: test of auto_increment and bulk_insert mysql-test/t/insert.test: test of auto_increment and bulk_insert sql/ha_myisam.cc: Added code to flush a bulk_insert index sql/sql_insert.cc: Mark that bulk_insert is used sql/sql_load.cc: Mark that bulk_insert is used Remove duplicated call to initialize bulk insert sql/table.h: Mark that bulk_insert is used vio/viosslfactories.c: Remove compiler warning
Diffstat (limited to 'sql/sql_insert.cc')
-rw-r--r--sql/sql_insert.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index 9b6e6a549c9..de2e15cd29d 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -202,6 +202,7 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list, List<Item> &fields,
thd->variables.read_buff_size);
table->file->extra_opt(HA_EXTRA_BULK_INSERT_BEGIN,
thd->variables.bulk_insert_buff_size);
+ table->bulk_insert= 1;
}
while ((values= its++))
@@ -290,6 +291,7 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list, List<Item> &fields,
error=1;
}
}
+ table->bulk_insert= 0;
}
if (id && values_list.elements != 1)
thd->insert_id(id); // For update log