From 4af5e597ef8c22fdf8c4b88ba7d12d113e56e81f Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 22 Jun 2006 19:10:11 +0500 Subject: Bugs#20392: INSERT_ID session variable has weird value sys_var_insert_id returned LAST_INSERT_ID instead of INSERT_ID. mysql-test/r/variables.result: Adding test case mysql-test/t/variables.test: Adding test case sql/set_var.cc: Fixed that sys_var_insert_id returned last_indert_id instead of insert_id. --- sql/set_var.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/set_var.cc') diff --git a/sql/set_var.cc b/sql/set_var.cc index 003dd4a8ab3..51317dec50d 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -2578,7 +2578,7 @@ bool sys_var_insert_id::update(THD *thd, set_var *var) byte *sys_var_insert_id::value_ptr(THD *thd, enum_var_type type, LEX_STRING *base) { - return (byte*) &thd->current_insert_id; + return (byte*) &thd->next_insert_id; } -- cgit v1.2.1