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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
3e9ddf3d
Commit
3e9ddf3d
authored
Aug 03, 2009
by
Alfranio Correia
Browse files
Options
Browse Files
Download
Plain Diff
auto-merge mysql-5.0-bugteam (local) --> mysql-5.0-bugteam
parents
09877515
968ec5ea
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
997 additions
and
43 deletions
+997
-43
mysql-test/r/rpl_trigger_not_windows.result
mysql-test/r/rpl_trigger_not_windows.result
+0
-0
mysql-test/r/rpl_trigger_windows.result
mysql-test/r/rpl_trigger_windows.result
+932
-0
mysql-test/t/rpl_trigger.inc
mysql-test/t/rpl_trigger.inc
+50
-43
mysql-test/t/rpl_trigger_not_windows.test
mysql-test/t/rpl_trigger_not_windows.test
+7
-0
mysql-test/t/rpl_trigger_windows.test
mysql-test/t/rpl_trigger_windows.test
+8
-0
No files found.
mysql-test/r/rpl_trigger.result
→
mysql-test/r/rpl_trigger
_not_windows
.result
View file @
3e9ddf3d
File moved
mysql-test/r/rpl_trigger_windows.result
0 → 100644
View file @
3e9ddf3d
This diff is collapsed.
Click to expand it.
mysql-test/t/rpl_trigger.
test
→
mysql-test/t/rpl_trigger.
inc
View file @
3e9ddf3d
#
# Test of triggers with replication
#
source
include
/
master
-
slave
.
inc
;
#
# #12482: Triggers has side effects with auto_increment values
#
...
...
@@ -284,63 +278,76 @@ while ($rnd)
# 1. Check that the trigger's replication is succeeded.
# Stop the slave.
#
# This was introduced due to the following bug on windows:
# BUG#43264 Test rpl_trigger is failing randomly w/ use of copy_file in 5.0
# Unfortunately, it is not possible to share a solution as 5.0 has the following issues:
# 1 - Inability to restart a server in the middle of a test case.
# 2 - Neither the index or the binlogs are re-opened when the slave is stopped and
# restarted.
#
if
(
`select convert(@@version_compile_os using latin1) IN ("Win32","Win64","Windows") = 0`
)
{
# Stop the slave.
connection
slave
;
STOP
SLAVE
;
connection
slave
;
STOP
SLAVE
;
# Replace master's binlog.
# Replace master's binlog.
connection
master
;
FLUSH
LOGS
;
--
remove_file
$MYSQLTEST_VARDIR
/
log
/
master
-
bin
.
000001
--
copy_file
$MYSQL_TEST_DIR
/
std_data
/
bug16266
.
000001
$MYSQLTEST_VARDIR
/
log
/
master
-
bin
.
000001
connection
master
;
FLUSH
LOGS
;
--
remove_file
$MYSQLTEST_VARDIR
/
log
/
master
-
bin
.
000001
--
copy_file
$MYSQL_TEST_DIR
/
std_data
/
bug16266
.
000001
$MYSQLTEST_VARDIR
/
log
/
master
-
bin
.
000001
# Make the slave to replay the new binlog.
# Make the slave to replay the new binlog.
connection
slave
;
RESET
SLAVE
;
START
SLAVE
;
connection
slave
;
RESET
SLAVE
;
START
SLAVE
;
SELECT
MASTER_POS_WAIT
(
'master-bin.000001'
,
513
)
>=
0
;
SELECT
MASTER_POS_WAIT
(
'master-bin.000001'
,
513
)
>=
0
;
# Check that the replication succeeded.
# Check that the replication succeeded.
SHOW
TABLES
LIKE
't_'
;
SHOW
TRIGGERS
;
SELECT
*
FROM
t1
;
SELECT
*
FROM
t2
;
SHOW
TABLES
LIKE
't_'
;
SHOW
TRIGGERS
;
SELECT
*
FROM
t1
;
SELECT
*
FROM
t2
;
# 2. Check that the trigger is non-SUID on the slave;
# 3. Check that the trigger can be activated on the slave.
# 2. Check that the trigger is non-SUID on the slave;
# 3. Check that the trigger can be activated on the slave.
INSERT
INTO
t1
VALUES
(
2
);
INSERT
INTO
t1
VALUES
(
2
);
SELECT
*
FROM
t1
;
SELECT
*
FROM
t2
;
SELECT
*
FROM
t1
;
SELECT
*
FROM
t2
;
# That's all, cleanup.
# That's all, cleanup.
DROP
TRIGGER
trg1
;
DROP
TABLE
t1
;
DROP
TABLE
t2
;
DROP
TRIGGER
trg1
;
DROP
TABLE
t1
;
DROP
TABLE
t2
;
STOP
SLAVE
;
RESET
SLAVE
;
connection
slave
;
# The master should be clean.
STOP
SLAVE
;
--
source
include
/
wait_for_slave_to_stop
.
inc
RESET
SLAVE
;
connection
master
;
SHOW
TABLES
LIKE
't_'
;
SHOW
TRIGGERS
;
# The master should be clean.
RESET
MASTER
;
connection
master
;
SHOW
TABLES
LIKE
't_'
;
SHOW
TRIGGERS
;
# Restart slave.
RESET
MASTER
;
connection
slave
;
START
SLAVE
;
# Restart slave.
connection
slave
;
START
SLAVE
;
}
#
# BUG#20438: CREATE statements for views, stored routines and triggers can be
...
...
mysql-test/t/rpl_trigger_not_windows.test
0 → 100644
View file @
3e9ddf3d
#
# Test of triggers with replication
#
source
include
/
master
-
slave
.
inc
;
source
include
/
not_windows
.
inc
;
source
t
/
rpl_trigger
.
inc
;
mysql-test/t/rpl_trigger_windows.test
0 → 100644
View file @
3e9ddf3d
#
# Test of triggers with replication
#
source
include
/
master
-
slave
.
inc
;
source
include
/
windows
.
inc
;
source
t
/
rpl_trigger
.
inc
;
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