List:Commits« Previous MessageNext Message »
From:msvensson Date:September 1 2006 12:59pm
Subject:bk commit into 5.1 tree (msvensson:1.2299)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of msvensson. When msvensson 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@stripped, 2006-09-01 12:59:21+02:00, msvensson@neptunus.(none) +4 -0
  Move test that requires innodb to "mysql_innodb"

  mysql-test/r/auto_increment.result@stripped, 2006-09-01 12:59:19+02:00,
msvensson@neptunus.(none) +0 -46
    Move test that requires innodb to "mysql_innodb"

  mysql-test/r/innodb_mysql.result@stripped, 2006-09-01 12:59:19+02:00,
msvensson@neptunus.(none) +46 -0
    Move test that requires innodb to "mysql_innodb"

  mysql-test/t/auto_increment.test@stripped, 2006-09-01 12:59:19+02:00,
msvensson@neptunus.(none) +0 -36
    Move test that requires innodb to "mysql_innodb"

  mysql-test/t/innodb_mysql.test@stripped, 2006-09-01 12:59:19+02:00, msvensson@neptunus.(none)
+37 -0
    Move test that requires innodb to "mysql_innodb"

# 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:	msvensson
# Host:	neptunus.(none)
# Root:	/home/msvensson/mysql/mysql-5.1-new-maint

--- 1.7/mysql-test/r/innodb_mysql.result	2006-09-01 12:59:27 +02:00
+++ 1.8/mysql-test/r/innodb_mysql.result	2006-09-01 12:59:27 +02:00
@@ -367,3 +367,49 @@ Warnings:
 Warning	1071	Specified key was too long; max key length is 765 bytes
 insert into t1 values('aaa');
 drop table t1;
+CREATE TABLE `t2` (
+`k` int(11) NOT NULL auto_increment,
+`a` int(11) default NULL,
+`c` int(11) default NULL,
+PRIMARY KEY  (`k`),
+UNIQUE KEY `idx_1` (`a`)
+) ENGINE=InnoDB;
+insert into t2 ( a ) values ( 6 ) on duplicate key update c =
+ifnull( c,
+0 ) + 1;
+insert into t2 ( a ) values ( 7 ) on duplicate key update c =
+ifnull( c,
+0 ) + 1;
+select last_insert_id();
+last_insert_id()
+2
+select * from t2;
+k	a	c
+1	6	NULL
+2	7	NULL
+insert into t2 ( a ) values ( 6 ) on duplicate key update c =
+ifnull( c,
+0 ) + 1;
+select last_insert_id();
+last_insert_id()
+1
+select * from t2;
+k	a	c
+1	6	1
+2	7	NULL
+insert ignore into t2 values (null,6,1),(10,8,1);
+select last_insert_id();
+last_insert_id()
+1
+insert ignore into t2 values (null,6,1),(null,8,1),(null,15,1),(null,20,1);
+select last_insert_id();
+last_insert_id()
+11
+select * from t2;
+k	a	c
+1	6	1
+2	7	NULL
+10	8	1
+11	15	1
+12	20	1
+drop table t2;

--- 1.7/mysql-test/t/innodb_mysql.test	2006-09-01 12:59:27 +02:00
+++ 1.8/mysql-test/t/innodb_mysql.test	2006-09-01 12:59:27 +02:00
@@ -320,3 +320,40 @@ create table t1(f1 varchar(800) binary n
   character set utf8 collate utf8_general_ci;
 insert into t1 values('aaa');
 drop table t1;
+
+# Fix for BUG#19243 "wrong LAST_INSERT_ID() after ON DUPLICATE KEY
+# UPDATE": now LAST_INSERT_ID() will return the id of the updated
+# row.
+CREATE TABLE `t2` (
+  `k` int(11) NOT NULL auto_increment,
+  `a` int(11) default NULL,
+  `c` int(11) default NULL,
+  PRIMARY KEY  (`k`),
+  UNIQUE KEY `idx_1` (`a`)
+) ENGINE=InnoDB;
+ insert into t2 ( a ) values ( 6 ) on duplicate key update c =
+ifnull( c,
+0 ) + 1;
+insert into t2 ( a ) values ( 7 ) on duplicate key update c =
+ifnull( c,
+0 ) + 1;
+select last_insert_id();
+select * from t2;
+insert into t2 ( a ) values ( 6 ) on duplicate key update c =
+ifnull( c,
+0 ) + 1;
+select last_insert_id();
+select * from t2;
+
+# Test of LAST_INSERT_ID() when autogenerated will fail:
+# last_insert_id() should not change
+insert ignore into t2 values (null,6,1),(10,8,1);
+select last_insert_id();
+# First and second autogenerated will fail, last_insert_id() should
+# point to third
+insert ignore into t2 values (null,6,1),(null,8,1),(null,15,1),(null,20,1);
+select last_insert_id();
+select * from t2;
+
+drop table t2;
+

--- 1.46/mysql-test/r/auto_increment.result	2006-09-01 12:59:27 +02:00
+++ 1.47/mysql-test/r/auto_increment.result	2006-09-01 12:59:27 +02:00
@@ -446,52 +446,6 @@ INSERT INTO t1 VALUES(1, 1);
 ALTER TABLE t1 CHANGE t1 t1 INT(10) auto_increment;
 ERROR 23000: ALTER TABLE causes auto_increment resequencing, resulting in duplicate entry
'1' for key 'PRIMARY'
 DROP TABLE t1;
-CREATE TABLE `t2` (
-`k` int(11) NOT NULL auto_increment,
-`a` int(11) default NULL,
-`c` int(11) default NULL,
-PRIMARY KEY  (`k`),
-UNIQUE KEY `idx_1` (`a`)
-) ENGINE=InnoDB;
-insert into t2 ( a ) values ( 6 ) on duplicate key update c =
-ifnull( c,
-0 ) + 1;
-insert into t2 ( a ) values ( 7 ) on duplicate key update c =
-ifnull( c,
-0 ) + 1;
-select last_insert_id();
-last_insert_id()
-2
-select * from t2;
-k	a	c
-1	6	NULL
-2	7	NULL
-insert into t2 ( a ) values ( 6 ) on duplicate key update c =
-ifnull( c,
-0 ) + 1;
-select last_insert_id();
-last_insert_id()
-1
-select * from t2;
-k	a	c
-1	6	1
-2	7	NULL
-insert ignore into t2 values (null,6,1),(10,8,1);
-select last_insert_id();
-last_insert_id()
-1
-insert ignore into t2 values (null,6,1),(null,8,1),(null,15,1),(null,20,1);
-select last_insert_id();
-last_insert_id()
-11
-select * from t2;
-k	a	c
-1	6	1
-2	7	NULL
-10	8	1
-11	15	1
-12	20	1
-drop table t2;
 create table t1 (a int primary key auto_increment, b int, c int, d timestamp default
current_timestamp, unique(b),unique(c));
 insert into t1 values(null,1,1,now());
 insert into t1 values(null,0,0,null);

--- 1.28/mysql-test/t/auto_increment.test	2006-09-01 12:59:27 +02:00
+++ 1.29/mysql-test/t/auto_increment.test	2006-09-01 12:59:27 +02:00
@@ -304,42 +304,6 @@ INSERT INTO t1 VALUES(1, 1);
 ALTER TABLE t1 CHANGE t1 t1 INT(10) auto_increment;
 DROP TABLE t1;
 
-# Fix for BUG#19243 "wrong LAST_INSERT_ID() after ON DUPLICATE KEY
-# UPDATE": now LAST_INSERT_ID() will return the id of the updated
-# row.
-CREATE TABLE `t2` (
-  `k` int(11) NOT NULL auto_increment,
-  `a` int(11) default NULL,
-  `c` int(11) default NULL,
-  PRIMARY KEY  (`k`),
-  UNIQUE KEY `idx_1` (`a`)
-) ENGINE=InnoDB;
- insert into t2 ( a ) values ( 6 ) on duplicate key update c =
-ifnull( c,
-0 ) + 1;
-insert into t2 ( a ) values ( 7 ) on duplicate key update c =
-ifnull( c,
-0 ) + 1;
-select last_insert_id();
-select * from t2;
-insert into t2 ( a ) values ( 6 ) on duplicate key update c =
-ifnull( c,
-0 ) + 1;
-select last_insert_id();
-select * from t2;
-
-# Test of LAST_INSERT_ID() when autogenerated will fail:
-# last_insert_id() should not change
-insert ignore into t2 values (null,6,1),(10,8,1);
-select last_insert_id();
-# First and second autogenerated will fail, last_insert_id() should
-# point to third
-insert ignore into t2 values (null,6,1),(null,8,1),(null,15,1),(null,20,1);
-select last_insert_id();
-select * from t2;
-
-drop table t2;
-
 # Test of REPLACE when it does INSERT+DELETE and not UPDATE:
 # see if it sets LAST_INSERT_ID() ok
 create table t1 (a int primary key auto_increment, b int, c int, d timestamp default
current_timestamp, unique(b),unique(c));
Thread
bk commit into 5.1 tree (msvensson:1.2299)msvensson1 Sep