diff options
author | unknown <ramil@mysql.com> | 2006-06-15 17:37:47 +0500 |
---|---|---|
committer | unknown <ramil@mysql.com> | 2006-06-15 17:37:47 +0500 |
commit | 4a9985762e6e84889be669e071b0d3ac68a205fa (patch) | |
tree | a1942fc7093cb1e338561642dea2dccc9a9f8893 /mysql-test/t/auto_increment.test | |
parent | 689205ae947176220ef7ba7332ffa2b765c4796a (diff) | |
parent | ef02d496a07f76a830ca7e21907df65a58ddb4d7 (diff) | |
download | mariadb-git-4a9985762e6e84889be669e071b0d3ac68a205fa.tar.gz |
Merge mysql.com:/usr/home/ram/work/mysql-4.1
into mysql.com:/usr/home/ram/work/mysql-5.0
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/archive.result:
Auto merged
mysql-test/r/auto_increment.result:
Auto merged
mysql-test/r/ndb_lock.result:
Auto merged
mysql-test/r/rpl_log.result:
Auto merged
mysql-test/t/archive.test:
Auto merged
mysql-test/t/auto_increment.test:
Auto merged
mysql-test/t/ndb_lock.test:
Auto merged
mysql-test/t/rpl_log.test:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
tests/mysql_client_test.c:
Auto merged
configure.in:
ul
sql/ha_archive.cc:
ul
sql/item_func.cc:
ul
Diffstat (limited to 'mysql-test/t/auto_increment.test')
-rw-r--r-- | mysql-test/t/auto_increment.test | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/mysql-test/t/auto_increment.test b/mysql-test/t/auto_increment.test index 26b103b0107..5d22bdd46a0 100644 --- a/mysql-test/t/auto_increment.test +++ b/mysql-test/t/auto_increment.test @@ -238,6 +238,23 @@ SHOW CREATE TABLE `t1`; DROP TABLE `t1`; +# +# Bug #6880: LAST_INSERT_ID() within a statement +# + +create table t1(a int not null auto_increment primary key); +create table t2(a int not null auto_increment primary key, t1a int); +insert into t1 values(NULL); +insert into t2 values (NULL, LAST_INSERT_ID()), (NULL, LAST_INSERT_ID()); +insert into t1 values (NULL); +insert into t2 values (NULL, LAST_INSERT_ID()), (NULL, LAST_INSERT_ID()), +(NULL, LAST_INSERT_ID()); +insert into t1 values (NULL); +insert into t2 values (NULL, LAST_INSERT_ID()), (NULL, LAST_INSERT_ID()), +(NULL, LAST_INSERT_ID()), (NULL, LAST_INSERT_ID()); +select * from t2; +drop table t1, t2; + --echo End of 4.1 tests # |