summaryrefslogtreecommitdiff
path: root/sql/sql_insert.cc
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2005-06-01 16:35:09 +0300
committerunknown <monty@mysql.com>2005-06-01 16:35:09 +0300
commit906b210a4a51a91416d553cb744bc9c22d0bd942 (patch)
treead666c13b9844b04a96005aa6c422f8542efce7c /sql/sql_insert.cc
parent87805b682d483611a6685afcc103f83944734c12 (diff)
downloadmariadb-git-906b210a4a51a91416d553cb744bc9c22d0bd942.tar.gz
Code cleanups during code reviews
Ensure we get error if INSERT IGNORE ... SELECT fails Fixed wrong key_part->key_length usage in index_merge client/mysql.cc: Code cleanups & simply optimizations mysql-test/r/information_schema.result: Safety mysql-test/t/information_schema.test: Safety sql/ha_ndbcluster.cc: Code cleanups sql/item.cc: Code cleanups sql/item_subselect.cc: Code cleanups sql/item_sum.cc: Code cleanups sql/opt_range.cc: Made get_index_only_read_time() static (instad of inline) to increase portability (function was not declared before use) Simple optimization Fixed wrong key_part->key_length usage in index_merge Removed not used variable n_used_covered Indentation fixes & comment cleanups sql/parse_file.cc: Code cleanups sql/sql_base.cc: Code cleanups sql/sql_bitmap.h: Added missing return sql/sql_insert.cc: Ensure we get error if INSERT IGNORE ... SELECT fails sql/sql_select.cc: Code cleanups sql/sql_show.cc: Safety fix if a LOT of errors are ignored sql/sql_update.cc: Code cleanups sql/table.cc: Code cleanups sql/table.h: Code cleanups sql/uniques.cc: Code cleanups strings/decimal.c: Simple optimization Code cleanups
Diffstat (limited to 'sql/sql_insert.cc')
-rw-r--r--sql/sql_insert.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index 5d87a4ca30b..3665699ae07 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -128,7 +128,7 @@ static int check_insert_fields(THD *thd, TABLE_LIST *table_list,
/* it is join view => we need to find table for update */
List_iterator_fast<Item> it(fields);
Item *item;
- TABLE_LIST *tbl= 0;
+ TABLE_LIST *tbl= 0; // reset for call to check_single_table()
table_map map= 0;
while ((item= it++))
@@ -1012,6 +1012,7 @@ ok_or_after_trg_err:
err:
info->last_errno= error;
+ thd->lex->current_select->no_error= 0; // Give error
table->file->print_error(error,MYF(0));
before_trg_err: