-
unknown authored
This turned out to be a problem for prepared statements as well; the id was evaluated once, at parse time. mysql-test/r/auto_increment.result: Updated results after bugfix in last_insert_id(). mysql-test/r/query_cache.result: Updated results after bugfix in last_insert_id(). mysql-test/r/variables.result: Updated results after bugfix in last_insert_id(). sql/item_func.cc: Fixed bug in last_insert_id(); get id at each evaluation (and not in the parser). Renamed the class Item_func_set_last_insert_id too, since it's not only for setting. sql/item_func.h: Fixed bug in last_insert_id(); get id at each evaluation (and not in the parser). Renamed the class Item_func_set_last_insert_id too, since it's not only for setting. sql/sql_yacc.yy: Fixed bug in last_insert_id(); get id at each evaluation (and not in the parser). Renamed the class Item_func_set_last_insert_id too, since it's not only for setting. tests/client_test.c: Test case for last_insert_id() in prepared statements.
df064669