diff options
author | Sergei Golubchik <serg@mariadb.org> | 2015-12-16 12:12:01 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2015-12-21 21:30:46 +0100 |
commit | ad5db17e882fea36dcae6f6e61996b5f9bf28962 (patch) | |
tree | 06fa978199bd8fb09874de989984381e28bb4715 /sql/sql_insert.cc | |
parent | de7636e1470848bb5d92437b7c6c7b9c4d6caedc (diff) | |
download | mariadb-git-ad5db17e882fea36dcae6f6e61996b5f9bf28962.tar.gz |
cleanup
* move common code to a new set_bad_null_error() function
* move repeated comparison out of the loop
* remove unused code
* unused method Table_triggers_list::set_table
* redundant condition (if (table) after table was dereferenced)
* add an assert
Diffstat (limited to 'sql/sql_insert.cc')
-rw-r--r-- | sql/sql_insert.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index a04cbb573e1..04e18403f78 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -113,9 +113,9 @@ static bool check_view_insertability(THD *thd, TABLE_LIST *view); @returns false if success. */ -bool check_view_single_update(List<Item> &fields, List<Item> *values, - TABLE_LIST *view, table_map *map, - bool insert) +static bool check_view_single_update(List<Item> &fields, List<Item> *values, + TABLE_LIST *view, table_map *map, + bool insert) { /* it is join view => we need to find the table for update */ List_iterator_fast<Item> it(fields); @@ -1476,8 +1476,8 @@ bool mysql_prepare_insert(THD *thd, TABLE_LIST *table_list, thd->abort_on_warning= saved_abort_on_warning; } - if (!res) - res= setup_fields(thd, 0, update_values, MARK_COLUMNS_READ, 0, 0); + if (!res) + res= setup_fields(thd, 0, update_values, MARK_COLUMNS_READ, 0, 0); if (!res && duplic == DUP_UPDATE) { |