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
d78bf67e
Commit
d78bf67e
authored
Aug 28, 2007
by
skozlov/ksm@virtop.localdomain
Browse files
Options
Browse Files
Download
Plain Diff
Merge skozlov@bk-internal.mysql.com:/home/bk/mysql-5.1-new-rpl
into mysql.com:/home/ksm/commits/mysql-5.1-new-rpl-2
parents
a7a24231
e212c6a6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
63 additions
and
50 deletions
+63
-50
mysql-test/suite/rpl/r/rpl_invoked_features.result
mysql-test/suite/rpl/r/rpl_invoked_features.result
+14
-16
mysql-test/suite/rpl/t/disabled.def
mysql-test/suite/rpl/t/disabled.def
+0
-3
mysql-test/suite/rpl/t/rpl_invoked_features.test
mysql-test/suite/rpl/t/rpl_invoked_features.test
+49
-31
No files found.
mysql-test/suite/rpl/r/rpl_invoked_features.result
View file @
d78bf67e
...
@@ -17,13 +17,13 @@ DROP EVENT IF EXISTS e11;
...
@@ -17,13 +17,13 @@ DROP EVENT IF EXISTS e11;
CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY, b INT, c VARCHAR(64)) ENGINE=myisam;
CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY, b INT, c VARCHAR(64)) ENGINE=myisam;
INSERT INTO t1 VALUES (1,1,'1');
INSERT INTO t1 VALUES (1,1,'1');
INSERT INTO t1 VALUES (2,2,UUID());
INSERT INTO t1 VALUES (2,2,UUID());
CREATE TABLE t2 (a INT, b INT, c VARCHAR(64)) ENGINE=myisam;
CREATE TABLE t2 (a INT
UNIQUE
, b INT, c VARCHAR(64)) ENGINE=myisam;
INSERT INTO t2 VALUES (1,1,'1');
INSERT INTO t2 VALUES (1,1,'1');
INSERT INTO t2 VALUES (2,2,UUID());
INSERT INTO t2 VALUES (2,2,UUID());
CREATE TABLE t11 (a INT NOT NULL PRIMARY KEY, b INT, c VARCHAR(64)) ENGINE=innodb;
CREATE TABLE t11 (a INT NOT NULL PRIMARY KEY, b INT, c VARCHAR(64)) ENGINE=innodb;
INSERT INTO t11 VALUES (1,1,'1');
INSERT INTO t11 VALUES (1,1,'1');
INSERT INTO t11 VALUES (2,2,UUID());
INSERT INTO t11 VALUES (2,2,UUID());
CREATE TABLE t12 (a INT, b INT, c VARCHAR(64)) ENGINE=innodb;
CREATE TABLE t12 (a INT
UNIQUE
, b INT, c VARCHAR(64)) ENGINE=innodb;
INSERT INTO t12 VALUES (1,1,'1');
INSERT INTO t12 VALUES (1,1,'1');
INSERT INTO t12 VALUES (2,2,UUID());
INSERT INTO t12 VALUES (2,2,UUID());
...
@@ -49,21 +49,15 @@ BEGIN
...
@@ -49,21 +49,15 @@ BEGIN
UPDATE t12 SET c = '';
UPDATE t12 SET c = '';
UPDATE t13 SET c = '';
UPDATE t13 SET c = '';
END|
END|
CREATE EVENT e1 ON SCHEDULE EVERY 1 SECOND
EN
ABLE DO
CREATE EVENT e1 ON SCHEDULE EVERY 1 SECOND
DIS
ABLE DO
BEGIN
BEGIN
DECLARE c INT;
ALTER EVENT e1 DISABLE;
SELECT a INTO c FROM t1 WHERE a < 11 ORDER BY a DESC LIMIT 1;
IF c = 7 THEN
CALL p1(10, '');
CALL p1(10, '');
END IF;
END|
END|
CREATE EVENT e11 ON SCHEDULE EVERY 1 SECOND
EN
ABLE DO
CREATE EVENT e11 ON SCHEDULE EVERY 1 SECOND
DIS
ABLE DO
BEGIN
BEGIN
DECLARE c INT;
ALTER EVENT e11 DISABLE;
SELECT a INTO c FROM t11 WHERE a < 11 ORDER BY a DESC LIMIT 1;
IF c = 7 THEN
CALL p11(10, '');
CALL p11(10, '');
END IF;
END|
END|
CREATE FUNCTION f1 (x INT) RETURNS VARCHAR(64)
CREATE FUNCTION f1 (x INT) RETURNS VARCHAR(64)
BEGIN
BEGIN
...
@@ -78,11 +72,11 @@ RETURN f1(x);
...
@@ -78,11 +72,11 @@ RETURN f1(x);
END|
END|
CREATE PROCEDURE p1 (IN x INT, IN y VARCHAR(64))
CREATE PROCEDURE p1 (IN x INT, IN y VARCHAR(64))
BEGIN
BEGIN
INSERT INTO t1 VALUES (x,x,y);
INSERT I
GNORE I
NTO t1 VALUES (x,x,y);
END|
END|
CREATE PROCEDURE p11 (IN x INT, IN y VARCHAR(64))
CREATE PROCEDURE p11 (IN x INT, IN y VARCHAR(64))
BEGIN
BEGIN
INSERT INTO t11 VALUES (x,x,y);
INSERT I
GNORE I
NTO t11 VALUES (x,x,y);
END|
END|
CREATE TABLE t3 SELECT * FROM v1;
CREATE TABLE t3 SELECT * FROM v1;
...
@@ -110,6 +104,8 @@ INSERT INTO t11 VALUES(7,7,f2(7));
...
@@ -110,6 +104,8 @@ INSERT INTO t11 VALUES(7,7,f2(7));
INSERT INTO t11 VALUES (103,103,'');
INSERT INTO t11 VALUES (103,103,'');
SET GLOBAL EVENT_SCHEDULER = on;
SET GLOBAL EVENT_SCHEDULER = on;
ALTER EVENT e1 ENABLE;
ALTER EVENT e11 ENABLE;
SET GLOBAL EVENT_SCHEDULER = off;
SET GLOBAL EVENT_SCHEDULER = off;
SHOW TABLES LIKE 't%';
SHOW TABLES LIKE 't%';
...
@@ -138,8 +134,8 @@ PROCEDURE p1
...
@@ -138,8 +134,8 @@ PROCEDURE p1
PROCEDURE p11
PROCEDURE p11
SELECT event_name, status FROM information_schema.events WHERE event_schema='test';
SELECT event_name, status FROM information_schema.events WHERE event_schema='test';
event_name status
event_name status
e1
EN
ABLED
e1
DIS
ABLED
e11
EN
ABLED
e11
DIS
ABLED
SELECT COUNT(*) FROM t1;
SELECT COUNT(*) FROM t1;
COUNT(*)
COUNT(*)
...
@@ -438,6 +434,8 @@ UPDATE t3 SET c='';
...
@@ -438,6 +434,8 @@ UPDATE t3 SET c='';
UPDATE t11 SET c='';
UPDATE t11 SET c='';
UPDATE t12 SET c='';
UPDATE t12 SET c='';
UPDATE t13 SET c='';
UPDATE t13 SET c='';
ALTER TABLE t3 ORDER BY a;
ALTER TABLE t13 ORDER BY a;
...
...
mysql-test/suite/rpl/t/disabled.def
View file @
d78bf67e
...
@@ -11,9 +11,6 @@
...
@@ -11,9 +11,6 @@
##############################################################################
##############################################################################
rpl_ddl : BUG#26418 2007-03-01 mleich Slave out of sync after CREATE/DROP TEMPORARY TABLE + ROLLBACK on master
rpl_ddl : BUG#26418 2007-03-01 mleich Slave out of sync after CREATE/DROP TEMPORARY TABLE + ROLLBACK on master
#rpl_innodb_mixed_ddl : Bug #29363 rpl.rpl_innodb_mixed_* test failures
#rpl_innodb_mixed_dml : Bug #29363 rpl.rpl_innodb_mixed_* test failures
rpl_invoked_features : BUG#29020 2007-06-21 Lars Non-deterministic test case
rpl_auto_increment_11932 : Bug#29809 2007-07-16 ingo Slave SQL errors in warnings file
rpl_auto_increment_11932 : Bug#29809 2007-07-16 ingo Slave SQL errors in warnings file
rpl_stm_extraColmaster_ndb : WL#3915 : Statement-based replication not supported in ndb. Enable test when supported.
rpl_stm_extraColmaster_ndb : WL#3915 : Statement-based replication not supported in ndb. Enable test when supported.
rpl_row_extraColmaster_ndb : BUG#29549 : Replication of BLOBs fail for NDB
rpl_row_extraColmaster_ndb : BUG#29549 : Replication of BLOBs fail for NDB
mysql-test/suite/rpl/t/rpl_invoked_features.test
View file @
d78bf67e
...
@@ -8,10 +8,9 @@
...
@@ -8,10 +8,9 @@
--
source
include
/
master
-
slave
.
inc
--
source
include
/
master
-
slave
.
inc
--
source
include
/
have_innodb
.
inc
--
source
include
/
have_innodb
.
inc
# --disable_warnings/--enable_warnings added before/after query
#
# if one uses UUID() function because we need to avoid warnings
# Define variables used by test case
# for STATEMENT binlog format
#
# Non-transactional engine
# Non-transactional engine
--
let
$engine_type
=
myisam
--
let
$engine_type
=
myisam
...
@@ -45,20 +44,24 @@ DROP EVENT IF EXISTS e11;
...
@@ -45,20 +44,24 @@ DROP EVENT IF EXISTS e11;
--
echo
--
echo
eval
CREATE
TABLE
t1
(
a
INT
NOT
NULL
PRIMARY
KEY
,
b
INT
,
c
VARCHAR
(
64
))
ENGINE
=
$engine_type
;
eval
CREATE
TABLE
t1
(
a
INT
NOT
NULL
PRIMARY
KEY
,
b
INT
,
c
VARCHAR
(
64
))
ENGINE
=
$engine_type
;
--
disable_warnings
INSERT
INTO
t1
VALUES
(
1
,
1
,
'1'
);
INSERT
INTO
t1
VALUES
(
1
,
1
,
'1'
);
--
disable_warnings
INSERT
INTO
t1
VALUES
(
2
,
2
,
UUID
());
INSERT
INTO
t1
VALUES
(
2
,
2
,
UUID
());
eval
CREATE
TABLE
t2
(
a
INT
,
b
INT
,
c
VARCHAR
(
64
))
ENGINE
=
$engine_type
;
--
enable_warnings
eval
CREATE
TABLE
t2
(
a
INT
UNIQUE
,
b
INT
,
c
VARCHAR
(
64
))
ENGINE
=
$engine_type
;
INSERT
INTO
t2
VALUES
(
1
,
1
,
'1'
);
INSERT
INTO
t2
VALUES
(
1
,
1
,
'1'
);
--
disable_warnings
INSERT
INTO
t2
VALUES
(
2
,
2
,
UUID
());
INSERT
INTO
t2
VALUES
(
2
,
2
,
UUID
());
--
enable_warnings
--
enable_warnings
eval
CREATE
TABLE
t11
(
a
INT
NOT
NULL
PRIMARY
KEY
,
b
INT
,
c
VARCHAR
(
64
))
ENGINE
=
$engine_type2
;
eval
CREATE
TABLE
t11
(
a
INT
NOT
NULL
PRIMARY
KEY
,
b
INT
,
c
VARCHAR
(
64
))
ENGINE
=
$engine_type2
;
--
disable_warnings
INSERT
INTO
t11
VALUES
(
1
,
1
,
'1'
);
INSERT
INTO
t11
VALUES
(
1
,
1
,
'1'
);
--
disable_warnings
INSERT
INTO
t11
VALUES
(
2
,
2
,
UUID
());
INSERT
INTO
t11
VALUES
(
2
,
2
,
UUID
());
eval
CREATE
TABLE
t12
(
a
INT
,
b
INT
,
c
VARCHAR
(
64
))
ENGINE
=
$engine_type2
;
--
enable_warnings
eval
CREATE
TABLE
t12
(
a
INT
UNIQUE
,
b
INT
,
c
VARCHAR
(
64
))
ENGINE
=
$engine_type2
;
INSERT
INTO
t12
VALUES
(
1
,
1
,
'1'
);
INSERT
INTO
t12
VALUES
(
1
,
1
,
'1'
);
--
disable_warnings
INSERT
INTO
t12
VALUES
(
2
,
2
,
UUID
());
INSERT
INTO
t12
VALUES
(
2
,
2
,
UUID
());
--
enable_warnings
--
enable_warnings
...
@@ -96,22 +99,16 @@ BEGIN
...
@@ -96,22 +99,16 @@ BEGIN
END
|
END
|
# Create events which will run every 1 sec
# Create events which will run every 1 sec
CREATE
EVENT
e1
ON
SCHEDULE
EVERY
1
SECOND
EN
ABLE
DO
CREATE
EVENT
e1
ON
SCHEDULE
EVERY
1
SECOND
DIS
ABLE
DO
BEGIN
BEGIN
DECLARE
c
INT
;
ALTER
EVENT
e1
DISABLE
;
SELECT
a
INTO
c
FROM
t1
WHERE
a
<
11
ORDER
BY
a
DESC
LIMIT
1
;
CALL
p1
(
10
,
''
);
IF
c
=
7
THEN
CALL
p1
(
10
,
''
);
END
IF
;
END
|
END
|
CREATE
EVENT
e11
ON
SCHEDULE
EVERY
1
SECOND
EN
ABLE
DO
CREATE
EVENT
e11
ON
SCHEDULE
EVERY
1
SECOND
DIS
ABLE
DO
BEGIN
BEGIN
DECLARE
c
INT
;
ALTER
EVENT
e11
DISABLE
;
SELECT
a
INTO
c
FROM
t11
WHERE
a
<
11
ORDER
BY
a
DESC
LIMIT
1
;
CALL
p11
(
10
,
''
);
IF
c
=
7
THEN
CALL
p11
(
10
,
''
);
END
IF
;
END
|
END
|
# Create functions and procedures used for events
# Create functions and procedures used for events
...
@@ -130,12 +127,12 @@ END|
...
@@ -130,12 +127,12 @@ END|
CREATE
PROCEDURE
p1
(
IN
x
INT
,
IN
y
VARCHAR
(
64
))
CREATE
PROCEDURE
p1
(
IN
x
INT
,
IN
y
VARCHAR
(
64
))
BEGIN
BEGIN
INSERT
INTO
t1
VALUES
(
x
,
x
,
y
);
INSERT
I
GNORE
I
NTO
t1
VALUES
(
x
,
x
,
y
);
END
|
END
|
CREATE
PROCEDURE
p11
(
IN
x
INT
,
IN
y
VARCHAR
(
64
))
CREATE
PROCEDURE
p11
(
IN
x
INT
,
IN
y
VARCHAR
(
64
))
BEGIN
BEGIN
INSERT
INTO
t11
VALUES
(
x
,
x
,
y
);
INSERT
I
GNORE
I
NTO
t11
VALUES
(
x
,
x
,
y
);
END
|
END
|
DELIMITER
;
|
DELIMITER
;
|
...
@@ -147,17 +144,24 @@ DELIMITER ;|
...
@@ -147,17 +144,24 @@ DELIMITER ;|
# Do some actions for non-transactional tables
# Do some actions for non-transactional tables
--
echo
--
echo
--
disable_warnings
CREATE
TABLE
t3
SELECT
*
FROM
v1
;
CREATE
TABLE
t3
SELECT
*
FROM
v1
;
INSERT
INTO
t1
VALUES
(
3
,
3
,
''
);
INSERT
INTO
t1
VALUES
(
3
,
3
,
''
);
UPDATE
t1
SET
c
=
'2'
WHERE
a
=
1
;
UPDATE
t1
SET
c
=
'2'
WHERE
a
=
1
;
--
disable_warnings
INSERT
INTO
t1
VALUES
(
4
,
4
,
f1
(
4
));
INSERT
INTO
t1
VALUES
(
4
,
4
,
f1
(
4
));
--
enable_warnings
INSERT
INTO
t1
VALUES
(
100
,
100
,
''
);
INSERT
INTO
t1
VALUES
(
100
,
100
,
''
);
--
disable_warnings
CALL
p1
(
5
,
UUID
());
CALL
p1
(
5
,
UUID
());
--
enable_warnings
INSERT
INTO
t1
VALUES
(
101
,
101
,
''
);
INSERT
INTO
t1
VALUES
(
101
,
101
,
''
);
--
disable_warnings
INSERT
INTO
t1
VALUES
(
6
,
6
,
f1
(
6
));
INSERT
INTO
t1
VALUES
(
6
,
6
,
f1
(
6
));
--
enable_warnings
INSERT
INTO
t1
VALUES
(
102
,
102
,
''
);
INSERT
INTO
t1
VALUES
(
102
,
102
,
''
);
--
disable_warnings
INSERT
INTO
t1
VALUES
(
7
,
7
,
f2
(
7
));
INSERT
INTO
t1
VALUES
(
7
,
7
,
f2
(
7
));
--
enable_warnings
INSERT
INTO
t1
VALUES
(
103
,
103
,
''
);
INSERT
INTO
t1
VALUES
(
103
,
103
,
''
);
# Do some actions for transactional tables
# Do some actions for transactional tables
...
@@ -165,21 +169,34 @@ INSERT INTO t1 VALUES (103,103,'');
...
@@ -165,21 +169,34 @@ INSERT INTO t1 VALUES (103,103,'');
CREATE
TABLE
t13
SELECT
*
FROM
v11
;
CREATE
TABLE
t13
SELECT
*
FROM
v11
;
INSERT
INTO
t11
VALUES
(
3
,
3
,
''
);
INSERT
INTO
t11
VALUES
(
3
,
3
,
''
);
UPDATE
t11
SET
c
=
'2'
WHERE
a
=
1
;
UPDATE
t11
SET
c
=
'2'
WHERE
a
=
1
;
--
disable_warnings
INSERT
INTO
t11
VALUES
(
4
,
4
,
f1
(
4
));
INSERT
INTO
t11
VALUES
(
4
,
4
,
f1
(
4
));
--
enable_warnings
INSERT
INTO
t11
VALUES
(
100
,
100
,
''
);
INSERT
INTO
t11
VALUES
(
100
,
100
,
''
);
--
disable_warnings
CALL
p11
(
5
,
UUID
());
CALL
p11
(
5
,
UUID
());
--
enable_warnings
INSERT
INTO
t11
VALUES
(
101
,
101
,
''
);
INSERT
INTO
t11
VALUES
(
101
,
101
,
''
);
--
disable_warnings
INSERT
INTO
t11
VALUES
(
6
,
6
,
f1
(
6
));
INSERT
INTO
t11
VALUES
(
6
,
6
,
f1
(
6
));
--
enable_warnings
INSERT
INTO
t11
VALUES
(
102
,
102
,
''
);
INSERT
INTO
t11
VALUES
(
102
,
102
,
''
);
--
disable_warnings
INSERT
INTO
t11
VALUES
(
7
,
7
,
f2
(
7
));
INSERT
INTO
t11
VALUES
(
7
,
7
,
f2
(
7
));
INSERT
INTO
t11
VALUES
(
103
,
103
,
''
);
--
enable_warnings
--
enable_warnings
INSERT
INTO
t11
VALUES
(
103
,
103
,
''
);
# Scheduler is on
# Scheduler is on
--
echo
--
echo
# Temporally events fire sequentally due Bug#29020.
SET
GLOBAL
EVENT_SCHEDULER
=
on
;
SET
GLOBAL
EVENT_SCHEDULER
=
on
;
# Wait 2 sec while events will executed
# Wait while events will executed
--
sleep
2
ALTER
EVENT
e1
ENABLE
;
let
$wait_condition
=
SELECT
COUNT
(
*
)
=
1
FROM
t1
WHERE
t1
.
a
=
10
;
--
source
include
/
wait_condition
.
inc
ALTER
EVENT
e11
ENABLE
;
let
$wait_condition
=
SELECT
COUNT
(
*
)
=
1
FROM
t11
WHERE
t11
.
a
=
10
;
--
source
include
/
wait_condition
.
inc
SET
GLOBAL
EVENT_SCHEDULER
=
off
;
SET
GLOBAL
EVENT_SCHEDULER
=
off
;
# Check original objects
# Check original objects
...
@@ -234,7 +251,7 @@ SELECT COUNT(*) FROM t13;
...
@@ -234,7 +251,7 @@ SELECT COUNT(*) FROM t13;
SELECT
a
,
b
FROM
t13
ORDER
BY
a
;
SELECT
a
,
b
FROM
t13
ORDER
BY
a
;
SELECT
a
,
b
FROM
v11
ORDER
BY
a
;
SELECT
a
,
b
FROM
v11
ORDER
BY
a
;
# Remove UUID() before comparing
# Remove UUID() before comparing
and sort tables
--
connection
master
--
connection
master
--
echo
--
echo
...
@@ -245,6 +262,9 @@ UPDATE t11 SET c='';
...
@@ -245,6 +262,9 @@ UPDATE t11 SET c='';
UPDATE
t12
SET
c
=
''
;
UPDATE
t12
SET
c
=
''
;
UPDATE
t13
SET
c
=
''
;
UPDATE
t13
SET
c
=
''
;
ALTER
TABLE
t3
ORDER
BY
a
;
ALTER
TABLE
t13
ORDER
BY
a
;
--
sync_slave_with_master
slave
--
sync_slave_with_master
slave
# Compare a data from master and slave
# Compare a data from master and slave
...
@@ -260,13 +280,12 @@ UPDATE t13 SET c='';
...
@@ -260,13 +280,12 @@ UPDATE t13 SET c='';
# Remove dumps
# Remove dumps
--
echo
--
echo
--
exec
rm
$MYSQLTEST_VARDIR
/
tmp
/
rpl_invoked_features_master
.
sql
#
--exec rm $MYSQLTEST_VARDIR/tmp/rpl_invoked_features_master.sql
--
exec
rm
$MYSQLTEST_VARDIR
/
tmp
/
rpl_invoked_features_slave
.
sql
#
--exec rm $MYSQLTEST_VARDIR/tmp/rpl_invoked_features_slave.sql
# Remove tables,views,procedures,functions
# Remove tables,views,procedures,functions
--
connection
master
--
connection
master
--
echo
--
echo
--
disable_warnings
DROP
VIEW
IF
EXISTS
v1
,
v11
;
DROP
VIEW
IF
EXISTS
v1
,
v11
;
DROP
TABLE
IF
EXISTS
t1
,
t2
,
t3
,
t11
,
t12
,
t13
;
DROP
TABLE
IF
EXISTS
t1
,
t2
,
t3
,
t11
,
t12
,
t13
;
DROP
PROCEDURE
IF
EXISTS
p1
;
DROP
PROCEDURE
IF
EXISTS
p1
;
...
@@ -275,7 +294,6 @@ DROP FUNCTION IF EXISTS f1;
...
@@ -275,7 +294,6 @@ DROP FUNCTION IF EXISTS f1;
DROP
FUNCTION
IF
EXISTS
f2
;
DROP
FUNCTION
IF
EXISTS
f2
;
DROP
EVENT
IF
EXISTS
e1
;
DROP
EVENT
IF
EXISTS
e1
;
DROP
EVENT
IF
EXISTS
e11
;
DROP
EVENT
IF
EXISTS
e11
;
--
enable_warnings
--
sync_slave_with_master
slave
--
sync_slave_with_master
slave
...
...
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