List:Commits« Previous MessageNext Message »
From:bar Date:June 22 2006 4:10pm
Subject:bk commit into 5.0 tree (bar:1.2174)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of bar. When bar does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.2174 06/06/22 19:10:11 bar@stripped +3 -0
  Bugs#20392: INSERT_ID session variable has weird value
  sys_var_insert_id returned LAST_INSERT_ID instead of INSERT_ID.

  sql/set_var.cc
    1.156 06/06/22 19:10:00 bar@stripped +1 -1
    Fixed that sys_var_insert_id returned last_indert_id instead of insert_id.

  mysql-test/t/variables.test
    1.61 06/06/22 19:10:00 bar@stripped +10 -0
    Adding test case

  mysql-test/r/variables.result
    1.85 06/06/22 19:10:00 bar@stripped +12 -0
    Adding test case

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	bar
# Host:	bar.intranet.mysql.r18.ru
# Root:	/usr/home/bar/mysql-5.0-kt.b20392

--- 1.84/mysql-test/r/variables.result	2006-05-20 04:17:19 +05:00
+++ 1.85/mysql-test/r/variables.result	2006-06-22 19:10:00 +05:00
@@ -421,6 +421,18 @@ set tmp_table_size=100;
 set tx_isolation="READ-COMMITTED";
 set wait_timeout=100;
 set log_warnings=1;
+select @@session.insert_id;
+@@session.insert_id
+1
+set @save_insert_id=@@session.insert_id;
+set session insert_id=20;
+select @@session.insert_id;
+@@session.insert_id
+20
+set @@session.insert_id=@save_insert_id;
+select @@session.insert_id;
+@@session.insert_id
+1
 create table t1 (a int not null auto_increment, primary key(a));
 create table t2 (a int not null auto_increment, primary key(a));
 insert into t1 values(null),(null),(null);

--- 1.60/mysql-test/t/variables.test	2006-05-20 04:17:19 +05:00
+++ 1.61/mysql-test/t/variables.test	2006-06-22 19:10:00 +05:00
@@ -302,6 +302,16 @@ set wait_timeout=100;
 set log_warnings=1;
 
 #
+# Bugs: #20392: INSERT_ID session variable has weird value
+#
+select @@session.insert_id;
+set @save_insert_id=@@session.insert_id;
+set session insert_id=20;
+select @@session.insert_id;
+set @@session.insert_id=@save_insert_id;
+select @@session.insert_id;
+
+#
 # key buffer
 #
 

--- 1.155/sql/set_var.cc	2006-05-09 04:38:42 +05:00
+++ 1.156/sql/set_var.cc	2006-06-22 19:10:00 +05:00
@@ -2578,7 +2578,7 @@ bool sys_var_insert_id::update(THD *thd,
 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;
 }
 
 
Thread
bk commit into 5.0 tree (bar:1.2174)bar22 Jun