summaryrefslogtreecommitdiff
path: root/sql/sql_insert.cc
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2005-08-18 03:12:42 +0300
committerunknown <monty@mysql.com>2005-08-18 03:12:42 +0300
commit514ee67a6d7c60fe3f39cc8b55121bf09cad37cd (patch)
tree539169e9b0ec85fd466c859729fb9630778435b8 /sql/sql_insert.cc
parentf5c4ce0e648c0ab89943648a2995737ac2f3bf8f (diff)
downloadmariadb-git-514ee67a6d7c60fe3f39cc8b55121bf09cad37cd.tar.gz
Cleanups and optimization during review of new code
mysql-test/t/kill.test: Moved --disable_reconnect earlier to avoid race condition sql/sql_help.cc: Cleanup during review of new code (Moved variable definitions first in function sql/sql_insert.cc: Cleanup during review of new code sql/sql_lex.cc: Cleanup during review of new code sql/sql_parse.cc: Cleanup during review of new code Changed potential problem with previous_table_ref where it dependent that TABLE_LIST first element would be next_local Rearanged code in add_table_to_list() to remove extra if Combined 2 calls to calloc() to one sql/sql_view.cc: Remove extra indentation level Combined common 'on error' exit sql/sql_yacc.yy: Fixed comment style sql/table.cc: Cleanup during review of new code - Changed while() loops to for() loop (to make code more readable) - Removed not needed initialization of variables - Removed not needed 'else' cases - Removed trivial ASSERT's that was checked by previous code - Moved comment setting last in Natural_join_column::check_grants()
Diffstat (limited to 'sql/sql_insert.cc')
-rw-r--r--sql/sql_insert.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index 62b96d567c3..93c9991418d 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -891,8 +891,9 @@ bool mysql_prepare_insert(THD *thd, TABLE_LIST *table_list,
if (select_lex->group_list.elements == 0)
{
context->table_list->next_local= save_next_local;
+ /* first_name_resolution_table was set by resolve_in_table_list_only() */
context->first_name_resolution_table->
- next_name_resolution_table= save_next_local;
+ next_name_resolution_table= save_next_local;
}
if (!res)
res= setup_fields(thd, 0, update_values, 1, 0, 0);
@@ -2199,8 +2200,9 @@ select_insert::prepare(List<Item> &values, SELECT_LEX_UNIT *u)
if (lex->select_lex.group_list.elements == 0)
{
context->table_list->next_local= save_next_local;
+ /* first_name_resolution_table was set by resolve_in_table_list_only() */
context->first_name_resolution_table->
- next_name_resolution_table= save_next_local;
+ next_name_resolution_table= save_next_local;
}
res= res || setup_fields(thd, 0, *info.update_values, 1, 0, 0);