summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <pem@mysql.com>2006-01-31 09:49:54 +0100
committerunknown <pem@mysql.com>2006-01-31 09:49:54 +0100
commitb5e313f3643b6ff4f6277380149abe18da8e9320 (patch)
treeab604cab69ffd5efdc9b19c1dd41b7d3b30fd093 /mysql-test
parent79e09501ca8bf7aa959964389bdf21f9336f904c (diff)
parentb16c7d2a0b793597e0f4ca451934221cd8cfe889 (diff)
downloadmariadb-git-b5e313f3643b6ff4f6277380149abe18da8e9320.tar.gz
Merge mysql.com:/extern/mysql/bk/mysql-5.0
into mysql.com:/extern/mysql/work/bug15737/mysql-5.0
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/federated.result42
-rw-r--r--mysql-test/t/federated.test30
2 files changed, 72 insertions, 0 deletions
diff --git a/mysql-test/r/federated.result b/mysql-test/r/federated.result
index f9b13beb6e5..4391889fec9 100644
--- a/mysql-test/r/federated.result
+++ b/mysql-test/r/federated.result
@@ -1517,6 +1517,48 @@ bitty
drop table federated.t1;
drop table federated.t1;
DROP TABLE IF EXISTS federated.t1;
+Warnings:
+Note 1051 Unknown table 't1'
+CREATE TABLE federated.t1 (
+`id` int(20) NOT NULL auto_increment,
+PRIMARY KEY (`id`));
+DROP TABLE IF EXISTS federated.t1;
+Warnings:
+Note 1051 Unknown table 't1'
+CREATE TABLE federated.t1 (
+`id` int(20) NOT NULL auto_increment,
+PRIMARY KEY (`id`)
+)
+ENGINE="FEDERATED" DEFAULT CHARSET=latin1
+CONNECTION='mysql://root@127.0.0.1:9308/federated/t1';
+INSERT INTO federated.t1 VALUES ();
+SELECT LAST_INSERT_ID();
+LAST_INSERT_ID()
+1
+INSERT INTO federated.t1 VALUES ();
+SELECT LAST_INSERT_ID();
+LAST_INSERT_ID()
+2
+INSERT INTO federated.t1 VALUES ();
+SELECT LAST_INSERT_ID();
+LAST_INSERT_ID()
+3
+INSERT INTO federated.t1 VALUES ();
+SELECT LAST_INSERT_ID();
+LAST_INSERT_ID()
+4
+INSERT INTO federated.t1 VALUES ();
+SELECT LAST_INSERT_ID();
+LAST_INSERT_ID()
+5
+SELECT * FROM federated.t1;
+id
+1
+2
+3
+4
+5
+DROP TABLE IF EXISTS federated.t1;
DROP DATABASE IF EXISTS federated;
DROP TABLE IF EXISTS federated.t1;
DROP DATABASE IF EXISTS federated;
diff --git a/mysql-test/t/federated.test b/mysql-test/t/federated.test
index b6b3b90c083..e550c5d3ac0 100644
--- a/mysql-test/t/federated.test
+++ b/mysql-test/t/federated.test
@@ -1224,4 +1224,34 @@ drop table federated.t1;
connection slave;
drop table federated.t1;
+#
+# BUG# 14768 test auto_increment last_insert_id()
+#
+connection slave;
+DROP TABLE IF EXISTS federated.t1;
+CREATE TABLE federated.t1 (
+ `id` int(20) NOT NULL auto_increment,
+ PRIMARY KEY (`id`));
+
+connection master;
+DROP TABLE IF EXISTS federated.t1;
+eval CREATE TABLE federated.t1 (
+ `id` int(20) NOT NULL auto_increment,
+ PRIMARY KEY (`id`)
+ )
+ ENGINE="FEDERATED" DEFAULT CHARSET=latin1
+ CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1';
+
+INSERT INTO federated.t1 VALUES ();
+SELECT LAST_INSERT_ID();
+INSERT INTO federated.t1 VALUES ();
+SELECT LAST_INSERT_ID();
+INSERT INTO federated.t1 VALUES ();
+SELECT LAST_INSERT_ID();
+INSERT INTO federated.t1 VALUES ();
+SELECT LAST_INSERT_ID();
+INSERT INTO federated.t1 VALUES ();
+SELECT LAST_INSERT_ID();
+SELECT * FROM federated.t1;
+
source include/federated_cleanup.inc;