diff options
author | unknown <acurtis@pcgem.rdg.cyberkinetica.com> | 2004-12-13 12:26:28 +0000 |
---|---|---|
committer | unknown <acurtis@pcgem.rdg.cyberkinetica.com> | 2004-12-13 12:26:28 +0000 |
commit | 46364ddb1978802ad9bf5418738b03d0cfe8bd61 (patch) | |
tree | 74dc7fe4fb76d0fd7e5bf58eca907c162b9d3b30 /sql/sql_prepare.cc | |
parent | 0a3590f6d08342512deecfe15e91424eb01c0be4 (diff) | |
download | mariadb-git-46364ddb1978802ad9bf5418738b03d0cfe8bd61.tar.gz |
WL#2274 - INSERT..SELECT..UPDATE
UPDATE clause conflicts with SELECT for use of item_list field.
Alter UPDATE clause to use new lex field update_list
Tests included
mysql-test/r/insert_update.result:
WL#2274
New tests for INSERT..SELECT..UPDATE
mysql-test/t/insert_update.test:
WL#2274
New tests for INSERT..SELECT..UPDATE
sql/mysql_priv.h:
Remove function - insert_select_precheck()
sql/sql_class.h:
WL#2274
New constructor for class select_insert
sql/sql_insert.cc:
WL#2274
Move code into mysql_prepare_insert
Add checks as param values may be NULL
sql/sql_lex.cc:
WL#2274
initialize lex->update_list
sql/sql_lex.h:
WL#2274
New field in LEX: update_list
sql/sql_parse.cc:
WL#2274
INSERT..UPDATE clause now populates lex->update_list
Remove redundant function: insert_select_precheck()
sql/sql_prepare.cc:
WL#2274
invoke insert_precheck() instead of insert_select_precheck()
sql/sql_yacc.yy:
WL#2274
Enable INSERT..SELECT..UPDATE syntax
New rule - insert_update_list, to populate lex->update_list
Diffstat (limited to 'sql/sql_prepare.cc')
-rw-r--r-- | sql/sql_prepare.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index bcb9d18d827..f4a96d751cd 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -1343,7 +1343,7 @@ static int mysql_test_insert_select(Prepared_statement *stmt, { int res; LEX *lex= stmt->lex; - if ((res= insert_select_precheck(stmt->thd, tables))) + if ((res= insert_precheck(stmt->thd, tables))) return res; TABLE_LIST *first_local_table= (TABLE_LIST *)lex->select_lex.table_list.first; |