Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
9538acf5
Commit
9538acf5
authored
Sep 21, 2006
by
lars/lthalmann@mysql.com/dl145h.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding proper setup phase for test case rpl_insert_id
parent
fe782f92
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
13 deletions
+55
-13
mysql-test/r/rpl_insert_id.result
mysql-test/r/rpl_insert_id.result
+24
-0
mysql-test/t/rpl_insert_id.test
mysql-test/t/rpl_insert_id.test
+31
-13
No files found.
mysql-test/r/rpl_insert_id.result
View file @
9538acf5
#
# Setup
#
stop slave;
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset master;
reset slave;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
start slave;
use test;
drop table if exists t1, t2, t3;
#
# See if queries that use both auto_increment and LAST_INSERT_ID()
# are replicated well
#
# We also check how the foreign_key_check variable is replicated
#
create table t1(a int auto_increment, key(a));
create table t1(a int auto_increment, key(a));
create table t2(b int auto_increment, c int, key(b));
create table t2(b int auto_increment, c int, key(b));
insert into t1 values (1),(2),(3);
insert into t1 values (1),(2),(3);
...
@@ -38,6 +49,9 @@ select * from t2;
...
@@ -38,6 +49,9 @@ select * from t2;
b c
b c
5 0
5 0
6 11
6 11
#
# check if INSERT SELECT in auto_increment is well replicated (bug #490)
#
drop table t2;
drop table t2;
drop table t1;
drop table t1;
create table t1(a int auto_increment, key(a));
create table t1(a int auto_increment, key(a));
...
@@ -68,11 +82,18 @@ b c
...
@@ -68,11 +82,18 @@ b c
9 13
9 13
drop table t1;
drop table t1;
drop table t2;
drop table t2;
#
# Bug#8412: Error codes reported in binary log for CHARACTER SET,
# FOREIGN_KEY_CHECKS
#
SET TIMESTAMP=1000000000;
SET TIMESTAMP=1000000000;
CREATE TABLE t1 ( a INT UNIQUE );
CREATE TABLE t1 ( a INT UNIQUE );
SET FOREIGN_KEY_CHECKS=0;
SET FOREIGN_KEY_CHECKS=0;
INSERT INTO t1 VALUES (1),(1);
INSERT INTO t1 VALUES (1),(1);
ERROR 23000: Duplicate entry '1' for key 1
ERROR 23000: Duplicate entry '1' for key 1
#
# Bug#14553: NULL in WHERE resets LAST_INSERT_ID
#
drop table t1;
drop table t1;
create table t1(a int auto_increment, key(a));
create table t1(a int auto_increment, key(a));
create table t2(a int);
create table t2(a int);
...
@@ -87,3 +108,6 @@ a
...
@@ -87,3 +108,6 @@ a
1
1
drop table t1;
drop table t1;
drop table t2;
drop table t2;
#
# End of 4.1 tests
#
mysql-test/t/rpl_insert_id.test
View file @
9538acf5
# See if queries that use both auto_increment and LAST_INSERT_ID()
--
echo
#
# are replicated well
--
echo
# Setup
--
echo
#
# We also check how the foreign_key_check variable is replicated
source
include
/
master
-
slave
.
inc
;
source
include
/
master
-
slave
.
inc
;
source
include
/
have_innodb
.
inc
;
source
include
/
have_innodb
.
inc
;
use
test
;
--
disable_warnings
drop
table
if
exists
t1
,
t2
,
t3
;
--
enable_warnings
--
echo
#
--
echo
# See if queries that use both auto_increment and LAST_INSERT_ID()
--
echo
# are replicated well
--
echo
#
--
echo
# We also check how the foreign_key_check variable is replicated
--
echo
#
connection
master
;
connection
master
;
create
table
t1
(
a
int
auto_increment
,
key
(
a
));
create
table
t1
(
a
int
auto_increment
,
key
(
a
));
create
table
t2
(
b
int
auto_increment
,
c
int
,
key
(
b
));
create
table
t2
(
b
int
auto_increment
,
c
int
,
key
(
b
));
...
@@ -39,7 +50,9 @@ select * from t1;
...
@@ -39,7 +50,9 @@ select * from t1;
select
*
from
t2
;
select
*
from
t2
;
connection
master
;
connection
master
;
# check if INSERT SELECT in auto_increment is well replicated (bug #490)
--
echo
#
--
echo
# check if INSERT SELECT in auto_increment is well replicated (bug #490)
--
echo
#
drop
table
t2
;
drop
table
t2
;
drop
table
t1
;
drop
table
t1
;
...
@@ -62,10 +75,11 @@ save_master_pos;
...
@@ -62,10 +75,11 @@ save_master_pos;
connection
slave
;
connection
slave
;
sync_with_master
;
sync_with_master
;
#
--
echo
#
# Bug#8412: Error codes reported in binary log for CHARACTER SET,
--
echo
# Bug#8412: Error codes reported in binary log for CHARACTER SET,
# FOREIGN_KEY_CHECKS
--
echo
# FOREIGN_KEY_CHECKS
#
--
echo
#
connection
master
;
connection
master
;
SET
TIMESTAMP
=
1000000000
;
SET
TIMESTAMP
=
1000000000
;
CREATE
TABLE
t1
(
a
INT
UNIQUE
);
CREATE
TABLE
t1
(
a
INT
UNIQUE
);
...
@@ -74,9 +88,10 @@ SET FOREIGN_KEY_CHECKS=0;
...
@@ -74,9 +88,10 @@ SET FOREIGN_KEY_CHECKS=0;
INSERT
INTO
t1
VALUES
(
1
),(
1
);
INSERT
INTO
t1
VALUES
(
1
),(
1
);
sync_slave_with_master
;
sync_slave_with_master
;
#
--
echo
#
# Bug#14553: NULL in WHERE resets LAST_INSERT_ID
--
echo
# Bug#14553: NULL in WHERE resets LAST_INSERT_ID
#
--
echo
#
connection
master
;
connection
master
;
drop
table
t1
;
drop
table
t1
;
create
table
t1
(
a
int
auto_increment
,
key
(
a
));
create
table
t1
(
a
int
auto_increment
,
key
(
a
));
...
@@ -92,4 +107,7 @@ connection master;
...
@@ -92,4 +107,7 @@ connection master;
drop
table
t1
;
drop
table
t1
;
drop
table
t2
;
drop
table
t2
;
sync_slave_with_master
;
sync_slave_with_master
;
# End of 4.1 tests
--
echo
#
--
echo
# End of 4.1 tests
--
echo
#
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment