1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

always call start_bulk_insert, clarify this behaviour in comment block

change 10 to a #define'd constant


myisam/myisamdef.h:
  use a constant with a difficult-to-type name instead of two-digit number :)
sql/ha_myisam.cc:
  use a constant with a difficult-to-type name instead of two-digit number :)
sql/sql_insert.cc:
  always call start_bulk_insert (it performs all checks itself)
  removed spurious semicolon at the end of the "if" :)
  added a clarifying comment
This commit is contained in:
unknown
2004-04-08 20:41:00 +02:00
parent 10e15762b8
commit e51447b143
3 changed files with 11 additions and 2 deletions

View File

@@ -260,7 +260,15 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list,
thd->proc_info="update";
if (duplic != DUP_ERROR)
table->file->extra(HA_EXTRA_IGNORE_DUP_KEY);
if (lock_type != TL_WRITE_DELAYED && values_list.elements != 1);
/*
let's *try* to start bulk inserts. It won't necessary
start them as values_list.elements should be greater than
some - handler dependent - threshold.
So we call start_bulk_insert to perform nesessary checks on
values_list.elements, and - if nothing else - to initialize
the code to make the call of end_bulk_insert() below safe.
*/
if (lock_type != TL_WRITE_DELAYED)
table->file->start_bulk_insert(values_list.elements);
while ((values= its++))