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
b8bf46ca
Commit
b8bf46ca
authored
Aug 23, 2002
by
monty@mashka.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added testing of temporary tables with replication
parent
fb3f13aa
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
70 additions
and
11 deletions
+70
-11
.bzrignore
.bzrignore
+13
-0
mysql-test/r/rpl_rotate_logs.result
mysql-test/r/rpl_rotate_logs.result
+8
-4
mysql-test/t/rpl000018.test
mysql-test/t/rpl000018.test
+5
-0
mysql-test/t/rpl_rotate_logs-master.opt
mysql-test/t/rpl_rotate_logs-master.opt
+0
-0
mysql-test/t/rpl_rotate_logs-slave-master-info.opt
mysql-test/t/rpl_rotate_logs-slave-master-info.opt
+0
-0
mysql-test/t/rpl_rotate_logs-slave.sh
mysql-test/t/rpl_rotate_logs-slave.sh
+0
-0
mysql-test/t/rpl_rotate_logs.test
mysql-test/t/rpl_rotate_logs.test
+44
-7
No files found.
.bzrignore
View file @
b8bf46ca
...
@@ -308,3 +308,16 @@ bdb/include/mutex_ext.h
...
@@ -308,3 +308,16 @@ bdb/include/mutex_ext.h
mit-pthreads/syscall.S
mit-pthreads/syscall.S
mit-pthreads/config.flags
mit-pthreads/config.flags
stamp-h.in
stamp-h.in
mit-pthreads/include/bits
mit-pthreads/include/pthread/machdep.h
mit-pthreads/include/pthread/posix.h
mit-pthreads/include/sys
mit-pthreads/machdep.c
mit-pthreads/pg++
mit-pthreads/pgcc
sql-bench/innotest1
sql-bench/innotest1a
sql-bench/innotest1b
sql-bench/innotest2
sql-bench/innotest2a
sql-bench/innotest2b
mysql-test/r/rpl
000016
.result
→
mysql-test/r/rpl
_rotate_logs
.result
View file @
b8bf46ca
Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter
Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter
127.0.0.1 root 9999 60 master-bin.001
216
Yes 0 0
127.0.0.1 root 9999 60 master-bin.001
387
Yes 0 0
s
s
Could not break slave
Could not break slave
Tried hard
Tried hard
...
@@ -7,10 +7,12 @@ Log_name
...
@@ -7,10 +7,12 @@ Log_name
master-bin.001
master-bin.001
master-bin.002
master-bin.002
master-bin.003
master-bin.003
a
testing temporary tables
Log_name
Log_name
master-bin.003
master-bin.003
Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter
Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter
127.0.0.1 root 9999 60 master-bin.003
206
Yes 0 0
127.0.0.1 root 9999 60 master-bin.003
329
Yes 0 0
m
m
34
34
65
65
...
@@ -23,8 +25,10 @@ master-bin.004
...
@@ -23,8 +25,10 @@ master-bin.004
master-bin.005
master-bin.005
master-bin.006
master-bin.006
File Position Binlog_do_db Binlog_ignore_db
File Position Binlog_do_db Binlog_ignore_db
master-bin.006 131
master-bin.006 490
a
testing temporary tables part 2
Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter
Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter
127.0.0.1 root 9999 60 master-bin.006
131
Yes 0 0
127.0.0.1 root 9999 60 master-bin.006
490
Yes 0 0
count(*)
count(*)
100
100
mysql-test/t/rpl000018.test
View file @
b8bf46ca
#
# Running test with abort-slave-event-count=1
# This will force slave to reconnect after every event
#
connect
(
master
,
localhost
,
root
,,
test
,
0
,
mysql
-
master
.
sock
);
connect
(
master
,
localhost
,
root
,,
test
,
0
,
mysql
-
master
.
sock
);
connect
(
slave
,
localhost
,
root
,,
test
,
0
,
mysql
-
slave
.
sock
);
connect
(
slave
,
localhost
,
root
,,
test
,
0
,
mysql
-
slave
.
sock
);
connection
slave
;
connection
slave
;
...
...
mysql-test/t/rpl
000016
-master.opt
→
mysql-test/t/rpl
_rotate_logs
-master.opt
View file @
b8bf46ca
File moved
mysql-test/t/rpl
000016
-slave-master-info.opt
→
mysql-test/t/rpl
_rotate_logs
-slave-master-info.opt
View file @
b8bf46ca
File moved
mysql-test/t/rpl
000016
-slave.sh
→
mysql-test/t/rpl
_rotate_logs
-slave.sh
View file @
b8bf46ca
File moved
mysql-test/t/rpl
000016
.test
→
mysql-test/t/rpl
_rotate_logs
.test
View file @
b8bf46ca
#
# Test are run with max_binlog_size=2048 to force automatic rotation of the
# binary log
# Tests done:
# - Check that slaves reports correct failures if master.info has strange
# modes/information
# - Automatic binary log rotation
# - Ensure that temporary tables works over flush logs and binary log
# changes
# - Test creating a duplicate key error and recover from it
#
connect
(
master
,
localhost
,
root
,,
test
,
0
,
mysql
-
master
.
sock
);
connect
(
master
,
localhost
,
root
,,
test
,
0
,
mysql
-
master
.
sock
);
connect
(
slave
,
localhost
,
root
,,
test
,
0
,
mysql
-
slave
.
sock
);
connect
(
slave
,
localhost
,
root
,,
test
,
0
,
mysql
-
slave
.
sock
);
system
cat
/
dev
/
null
>
var
/
slave
-
data
/
master
.
info
;
system
cat
/
dev
/
null
>
var
/
slave
-
data
/
master
.
info
;
...
@@ -16,7 +27,14 @@ reset master;
...
@@ -16,7 +27,14 @@ reset master;
connection
slave
;
connection
slave
;
slave
start
;
slave
start
;
connection
master
;
connection
master
;
drop
table
if
exists
t1
;
drop
table
if
exists
t1
,
t2
,
t3
,
t4
;
#
# Test FLUSH LOGS
#
create
temporary
table
temp_table
(
a
char
(
80
)
not
null
);
insert
into
temp_table
values
(
"testing temporary tables"
);
create
table
t1
(
s
text
);
create
table
t1
(
s
text
);
insert
into
t1
values
(
'Could not break slave'
),(
'Tried hard'
);
insert
into
t1
values
(
'Could not break slave'
),(
'Tried hard'
);
save_master_pos
;
save_master_pos
;
...
@@ -30,15 +48,24 @@ flush logs;
...
@@ -30,15 +48,24 @@ flush logs;
drop
table
if
exists
t2
;
drop
table
if
exists
t2
;
create
table
t2
(
m
int
not
null
auto_increment
primary
key
);
create
table
t2
(
m
int
not
null
auto_increment
primary
key
);
insert
into
t2
values
(
34
),(
67
),(
123
);
insert
into
t2
values
(
34
),(
67
),(
123
);
save_master_pos
;
flush
logs
;
flush
logs
;
show
master
logs
;
show
master
logs
;
create
table
t3
select
*
from
temp_table
;
#now lets make some duplicate key mess and see if we can recover from it
save_master_pos
;
#first insert a value on the slave
connection
slave
;
connection
slave
;
sync_with_master
;
sync_with_master
;
select
*
from
t3
;
connection
master
;
drop
table
temp_table
,
t3
;
#
# Now lets make some duplicate key mess and see if we can recover from it
#
# First insert a value on the slave
connection
slave
;
insert
into
t2
values
(
1234
);
insert
into
t2
values
(
1234
);
#same value on the master
#same value on the master
...
@@ -72,7 +99,14 @@ sync_with_master;
...
@@ -72,7 +99,14 @@ sync_with_master;
--
replace_result
9306
9999
3334
9999
3335
9999
--
replace_result
9306
9999
3334
9999
3335
9999
show
slave
status
;
show
slave
status
;
select
*
from
t2
;
select
*
from
t2
;
#
# Test forcing the replication log to rotate
#
connection
master
;
connection
master
;
create
temporary
table
temp_table
(
a
char
(
80
)
not
null
);
insert
into
temp_table
values
(
"testing temporary tables part 2"
);
let
$
1
=
100
;
let
$
1
=
100
;
drop
table
if
exists
t3
;
drop
table
if
exists
t3
;
create
table
t3
(
n
int
);
create
table
t3
(
n
int
);
...
@@ -82,13 +116,16 @@ while ($1)
...
@@ -82,13 +116,16 @@ while ($1)
eval
insert
into
t3
values
(
$
1
+
4
);
eval
insert
into
t3
values
(
$
1
+
4
);
dec
$
1
;
dec
$
1
;
}
}
create
table
t4
select
*
from
temp_table
;
show
master
logs
;
show
master
logs
;
show
master
status
;
show
master
status
;
save_master_pos
;
save_master_pos
;
connection
slave
;
connection
slave
;
slave
stop
;
#
slave stop;
slave
start
;
#
slave start;
sync_with_master
;
sync_with_master
;
select
*
from
t4
;
--
replace_result
9306
9999
3334
9999
3335
9999
--
replace_result
9306
9999
3334
9999
3335
9999
show
slave
status
;
show
slave
status
;
# because of concurrent insert, the table may not be up to date
# because of concurrent insert, the table may not be up to date
...
...
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