diff options
author | unknown <serg@serg.mylan> | 2004-04-08 20:41:00 +0200 |
---|---|---|
committer | unknown <serg@serg.mylan> | 2004-04-08 20:41:00 +0200 |
commit | e51447b1430e854fa0df1f37821e722cdb65d2bb (patch) | |
tree | 39dfdb44a3e709e59b9420faa6786345754a0ff5 /sql/sql_insert.cc | |
parent | 10e15762b8e38ae09d89e6489de6f2fe68cfd85e (diff) | |
download | mariadb-git-e51447b1430e854fa0df1f37821e722cdb65d2bb.tar.gz |
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
Diffstat (limited to 'sql/sql_insert.cc')
-rw-r--r-- | sql/sql_insert.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 6333beb5cb8..cc2ba29dbd8 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -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++)) |