diff options
Diffstat (limited to 'sql/sql_lex.cc')
-rw-r--r-- | sql/sql_lex.cc | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 3c8f088d196..8cabe795d21 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -6404,7 +6404,6 @@ Item *LEX::create_item_func_nextval(THD *thd, Table_ident *table_ident) MDL_SHARED_WRITE))) return NULL; return new (thd->mem_root) Item_func_nextval(thd, table); - } @@ -6442,6 +6441,21 @@ Item *LEX::create_item_func_lastval(THD *thd, } +Item *LEX::create_item_func_setval(THD *thd, Table_ident *table_ident, + longlong nextval, ulonglong round, + bool is_used) +{ + TABLE_LIST *table; + if (!(table= current_select->add_table_to_list(thd, table_ident, 0, + TL_OPTION_SEQUENCE, + TL_WRITE_ALLOW_WRITE, + MDL_SHARED_WRITE))) + return NULL; + return new (thd->mem_root) Item_func_setval(thd, table, nextval, round, + is_used); +} + + Item *LEX::create_item_ident(THD *thd, const LEX_CSTRING *a, const LEX_CSTRING *b, |