summaryrefslogtreecommitdiff
path: root/mysql-test/r/auto_increment.result
diff options
context:
space:
mode:
authorunknown <ramil@mysql.com>2006-06-07 14:01:10 +0500
committerunknown <ramil@mysql.com>2006-06-07 14:01:10 +0500
commitfebe7eb64a7472823294ae7295194af2be1b3497 (patch)
treed8d09c3be3884fca5eaa05199a9a076fb7b2ca13 /mysql-test/r/auto_increment.result
parentb29e052dbfe5021fefb5d312860a4980c851c24b (diff)
downloadmariadb-git-febe7eb64a7472823294ae7295194af2be1b3497.tar.gz
Fix for bug #6880: LAST_INSERT_ID() within a statement
mysql-test/r/auto_increment.result: Fix for bug #6880: LAST_INSERT_ID() within a statement - test result mysql-test/r/rpl_log.result: Fix for bug #6880: LAST_INSERT_ID() within a statement - test result mysql-test/t/auto_increment.test: Fix for bug #6880: LAST_INSERT_ID() within a statement - test case mysql-test/t/rpl_log.test: Fix for bug #6880: LAST_INSERT_ID() within a statement - test case sql/item_func.cc: Fix for bug #6880: LAST_INSERT_ID() within a statement - return the first thd->last_insert_id set (within a query)
Diffstat (limited to 'mysql-test/r/auto_increment.result')
-rw-r--r--mysql-test/r/auto_increment.result22
1 files changed, 22 insertions, 0 deletions
diff --git a/mysql-test/r/auto_increment.result b/mysql-test/r/auto_increment.result
index 426f20212c3..c1b7b753bd4 100644
--- a/mysql-test/r/auto_increment.result
+++ b/mysql-test/r/auto_increment.result
@@ -378,4 +378,26 @@ t1 CREATE TABLE `t1` (
KEY `t1_name` (`t1_name`)
) ENGINE=MyISAM AUTO_INCREMENT=1003 DEFAULT CHARSET=latin1
DROP TABLE `t1`;
+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;
+a t1a
+1 1
+2 1
+3 2
+4 2
+5 2
+6 3
+7 3
+8 3
+9 3
+drop table t1, t2;
End of 4.1 tests