1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00
* 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
This commit is contained in:
Sergei Golubchik
2015-12-16 12:12:01 +01:00
parent de7636e147
commit ad5db17e88
8 changed files with 43 additions and 67 deletions

View File

@ -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)
{