diff options
author | konstantin@mysql.com <> | 2004-11-11 22:37:48 +0300 |
---|---|---|
committer | konstantin@mysql.com <> | 2004-11-11 22:37:48 +0300 |
commit | 1d32e06be9ad52e8aa2e5460f5b8c97dd0d65b70 (patch) | |
tree | 5260df8c6255368da9e18b772afbb5eaa3ca8101 /sql/sql_update.cc | |
parent | 6ccdd6c454f864a344b90dd851eee7e98b84bf64 (diff) | |
download | mariadb-git-1d32e06be9ad52e8aa2e5460f5b8c97dd0d65b70.tar.gz |
Few more places with thd->lex replaced with lex (mysql_update,
check_simple_select). This change was inspired by Monty in December 2003
when thd->lex became a pointer in 4.1.
Diffstat (limited to 'sql/sql_update.cc')
-rw-r--r-- | sql/sql_update.cc | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc index 561480bd289..9d382baf155 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -111,6 +111,7 @@ int mysql_update(THD *thd, TABLE *table; SQL_SELECT *select; READ_RECORD info; + SELECT_LEX *select_lex= &thd->lex->select_lex; DBUG_ENTER("mysql_update"); LINT_INIT(used_index); @@ -151,9 +152,9 @@ int mysql_update(THD *thd, table_list->grant.want_privilege= table->grant.want_privilege= want_privilege; #endif { - thd->lex->select_lex.no_wrap_view_item= 1; + select_lex->no_wrap_view_item= 1; res= setup_fields(thd, 0, table_list, fields, 1, 0, 0); - thd->lex->select_lex.no_wrap_view_item= 0; + select_lex->no_wrap_view_item= 0; if (res) DBUG_RETURN(-1); /* purecov: inspected */ } @@ -182,7 +183,7 @@ int mysql_update(THD *thd, #endif if (setup_fields(thd, 0, table_list, values, 0, 0, 0)) { - free_underlaid_joins(thd, &thd->lex->select_lex); + free_underlaid_joins(thd, select_lex); DBUG_RETURN(-1); /* purecov: inspected */ } @@ -193,7 +194,7 @@ int mysql_update(THD *thd, (select && select->check_quick(thd, safe_update, limit)) || !limit) { delete select; - free_underlaid_joins(thd, &thd->lex->select_lex); + free_underlaid_joins(thd, select_lex); if (error) { DBUG_RETURN(-1); // Error in where @@ -212,7 +213,7 @@ int mysql_update(THD *thd, goto err; } } - init_ftfuncs(thd, &thd->lex->select_lex, 1); + init_ftfuncs(thd, select_lex, 1); /* Check if we are modifying a key that we are used to search with */ if (select && select->quick) @@ -455,7 +456,7 @@ int mysql_update(THD *thd, thd->lock=0; } - free_underlaid_joins(thd, &thd->lex->select_lex); + free_underlaid_joins(thd, select_lex); if (error >= 0) send_error(thd,thd->killed_errno()); /* purecov: inspected */ else @@ -476,7 +477,7 @@ int mysql_update(THD *thd, err: delete select; - free_underlaid_joins(thd, &thd->lex->select_lex); + free_underlaid_joins(thd, select_lex); if (table->key_read) { table->key_read=0; |