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
716dda38
Commit
716dda38
authored
Jan 23, 2001
by
tim@work.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge work.mysql.com:/home/bk/mysql
into work.mysql.com:/d1/users/tim/my/work
parents
a078b143
8b7391c9
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
22 additions
and
29 deletions
+22
-29
BitKeeper/etc/logging_ok
BitKeeper/etc/logging_ok
+1
-1
mysql-test/r/rpl000016.result
mysql-test/r/rpl000016.result
+4
-0
mysql-test/t/rpl000001.test
mysql-test/t/rpl000001.test
+0
-1
mysql-test/t/rpl000002.test
mysql-test/t/rpl000002.test
+0
-1
mysql-test/t/rpl000003.test
mysql-test/t/rpl000003.test
+0
-1
mysql-test/t/rpl000007.test
mysql-test/t/rpl000007.test
+0
-1
mysql-test/t/rpl000008.test
mysql-test/t/rpl000008.test
+0
-1
mysql-test/t/rpl000009.test
mysql-test/t/rpl000009.test
+0
-1
mysql-test/t/rpl000010.test
mysql-test/t/rpl000010.test
+1
-1
mysql-test/t/rpl000011.test
mysql-test/t/rpl000011.test
+0
-2
mysql-test/t/rpl000012.test
mysql-test/t/rpl000012.test
+0
-1
mysql-test/t/rpl000013.test
mysql-test/t/rpl000013.test
+0
-1
mysql-test/t/rpl000014.test
mysql-test/t/rpl000014.test
+0
-1
mysql-test/t/rpl000015.test
mysql-test/t/rpl000015.test
+2
-2
mysql-test/t/rpl000016.test
mysql-test/t/rpl000016.test
+5
-3
sql/log_event.h
sql/log_event.h
+1
-1
sql/slave.cc
sql/slave.cc
+8
-10
No files found.
BitKeeper/etc/logging_ok
View file @
716dda38
jcole@tetra.spaceapes.com
jcole@tetra.spaceapes.com
monty@donna.mysql.com
monty@donna.mysql.com
monty@work.mysql.com
mwagner@work.mysql.com
mwagner@work.mysql.com
paul@central.snake.net
paul@central.snake.net
sasha@mysql.sashanet.com
sasha@mysql.sashanet.com
sasha@work.mysql.com
sasha@work.mysql.com
serg@donna.mysql.com
serg@donna.mysql.com
tim@cane.mysql.fi
tim@cane.mysql.fi
monty@work.mysql.com
tim@work.mysql.com
tim@work.mysql.com
mysql-test/r/rpl000016.result
View file @
716dda38
Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db
127.0.0.1 root 9306 60 master-bin.001 216 Yes
s
s
Could not break slave
Could not break slave
Tried hard
Tried hard
...
@@ -7,6 +9,8 @@ master-bin.002
...
@@ -7,6 +9,8 @@ master-bin.002
master-bin.003
master-bin.003
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
127.0.0.1 root 9306 60 master-bin.003 128 Yes
m
m
34
34
67
67
...
...
mysql-test/t/rpl000001.test
View file @
716dda38
...
@@ -12,7 +12,6 @@ insert into foo values(1),(2);
...
@@ -12,7 +12,6 @@ insert into foo values(1),(2);
save_master_pos
;
save_master_pos
;
connection
slave
;
connection
slave
;
sync_with_master
;
sync_with_master
;
sleep
1
;
use
test
;
use
test
;
select
*
from
foo
;
select
*
from
foo
;
select
sum
(
length
(
word
))
from
t1
;
select
sum
(
length
(
word
))
from
t1
;
...
...
mysql-test/t/rpl000002.test
View file @
716dda38
...
@@ -9,7 +9,6 @@ save_master_pos;
...
@@ -9,7 +9,6 @@ save_master_pos;
connection
slave
;
connection
slave
;
use
test
;
use
test
;
sync_with_master
;
sync_with_master
;
sleep
1
;
@
r
/
rpl000002
.
result
select
*
from
t1
;
@
r
/
rpl000002
.
result
select
*
from
t1
;
connection
master
;
connection
master
;
drop
table
t1
;
drop
table
t1
;
...
...
mysql-test/t/rpl000003.test
View file @
716dda38
...
@@ -7,7 +7,6 @@ insert into t1 values (3);
...
@@ -7,7 +7,6 @@ insert into t1 values (3);
save_master_pos
;
save_master_pos
;
connection
slave
;
connection
slave
;
sync_with_master
;
sync_with_master
;
sleep
1
;
@
r
/
rpl000003
.
result
select
*
from
t1
;
@
r
/
rpl000003
.
result
select
*
from
t1
;
connection
master
;
connection
master
;
drop
table
t1
;
drop
table
t1
;
...
...
mysql-test/t/rpl000007.test
View file @
716dda38
...
@@ -18,7 +18,6 @@ insert into bar values(15);
...
@@ -18,7 +18,6 @@ insert into bar values(15);
save_master_pos
;
save_master_pos
;
connection
slave
;
connection
slave
;
sync_with_master
;
sync_with_master
;
sleep
1
;
@
r
/
rpl000007
.
result
select
foo
.
n
,
bar
.
m
from
foo
,
bar
;
@
r
/
rpl000007
.
result
select
foo
.
n
,
bar
.
m
from
foo
,
bar
;
connection
master
;
connection
master
;
drop
table
if
exists
bar
,
foo
;
drop
table
if
exists
bar
,
foo
;
...
...
mysql-test/t/rpl000008.test
View file @
716dda38
...
@@ -20,7 +20,6 @@ insert into choo values(55);
...
@@ -20,7 +20,6 @@ insert into choo values(55);
save_master_pos
;
save_master_pos
;
connection
slave
;
connection
slave
;
sync_with_master
;
sync_with_master
;
sleep
1
;
@
r
/
rpl000008
.
result
select
foo
.
n
,
bar
.
m
,
choo
.
k
from
foo
,
bar
,
choo
;
@
r
/
rpl000008
.
result
select
foo
.
n
,
bar
.
m
,
choo
.
k
from
foo
,
bar
,
choo
;
connection
master
;
connection
master
;
drop
table
if
exists
foo
,
bar
,
choo
;
drop
table
if
exists
foo
,
bar
,
choo
;
...
...
mysql-test/t/rpl000009.test
View file @
716dda38
...
@@ -22,7 +22,6 @@ insert into bar.bar values(15);
...
@@ -22,7 +22,6 @@ insert into bar.bar values(15);
save_master_pos
;
save_master_pos
;
connection
slave
;
connection
slave
;
sync_with_master
;
sync_with_master
;
sleep
1
;
@
r
/
rpl000009
.
result
select
foo
.
foo
.
n
,
bar
.
bar
.
m
from
foo
.
foo
,
bar
.
bar
;
@
r
/
rpl000009
.
result
select
foo
.
foo
.
n
,
bar
.
bar
.
m
from
foo
.
foo
,
bar
.
bar
;
connection
master
;
connection
master
;
drop
database
if
exists
bar
;
drop
database
if
exists
bar
;
...
...
mysql-test/t/rpl000010.test
View file @
716dda38
...
@@ -11,10 +11,10 @@ insert into t1 values(2);
...
@@ -11,10 +11,10 @@ insert into t1 values(2);
save_master_pos
;
save_master_pos
;
connection
slave
;
connection
slave
;
sync_with_master
;
sync_with_master
;
sleep
1
;
@
r
/
rpl000010
.
result
select
n
from
t1
;
@
r
/
rpl000010
.
result
select
n
from
t1
;
connection
master
;
connection
master
;
drop
table
t1
;
drop
table
t1
;
save_master_pos
;
save_master_pos
;
connection
slave
;
connection
slave
;
sync_with_master
;
sync_with_master
;
mysql-test/t/rpl000011.test
View file @
716dda38
...
@@ -6,7 +6,6 @@ create table t1 (n int);
...
@@ -6,7 +6,6 @@ create table t1 (n int);
insert
into
t1
values
(
1
);
insert
into
t1
values
(
1
);
save_master_pos
;
save_master_pos
;
connection
slave
;
connection
slave
;
#give slave some breathing room to get started
sync_with_master
;
sync_with_master
;
slave
stop
;
slave
stop
;
slave
start
;
slave
start
;
...
@@ -16,7 +15,6 @@ save_master_pos;
...
@@ -16,7 +15,6 @@ save_master_pos;
connection
slave
;
connection
slave
;
#let slave catch up
#let slave catch up
sync_with_master
;
sync_with_master
;
sleep
1
;
@
r
/
rpl000011
.
result
select
*
from
t1
;
@
r
/
rpl000011
.
result
select
*
from
t1
;
connection
master
;
connection
master
;
drop
table
t1
;
drop
table
t1
;
...
...
mysql-test/t/rpl000012.test
View file @
716dda38
...
@@ -19,7 +19,6 @@ connection master2;
...
@@ -19,7 +19,6 @@ connection master2;
save_master_pos
;
save_master_pos
;
connection
slave
;
connection
slave
;
sync_with_master
;
sync_with_master
;
sleep
1
;
@
r
/
rpl000012
.
result
select
*
from
t2
;
@
r
/
rpl000012
.
result
select
*
from
t2
;
@
r
/
rpl000012
.
status
.
result
show
status
like
'Slave_open_temp_tables'
;
@
r
/
rpl000012
.
status
.
result
show
status
like
'Slave_open_temp_tables'
;
#
#
...
...
mysql-test/t/rpl000013.test
View file @
716dda38
...
@@ -22,7 +22,6 @@ connection master2;
...
@@ -22,7 +22,6 @@ connection master2;
save_master_pos
;
save_master_pos
;
connection
slave
;
connection
slave
;
sync_with_master
;
sync_with_master
;
sleep
1
;
@
r
/
rpl000013
.
result
select
*
from
t2
;
@
r
/
rpl000013
.
result
select
*
from
t2
;
@
r
/
rpl000013
.
status
.
result
show
status
like
'Slave_open_temp_tables'
;
@
r
/
rpl000013
.
status
.
result
show
status
like
'Slave_open_temp_tables'
;
#
#
...
...
mysql-test/t/rpl000014.test
View file @
716dda38
...
@@ -24,7 +24,6 @@ save_master_pos;
...
@@ -24,7 +24,6 @@ save_master_pos;
connection
slave
;
connection
slave
;
change
master
to
master_log_pos
=
73
;
change
master
to
master_log_pos
=
73
;
sync_with_master
;
sync_with_master
;
sleep
1
;
select
*
from
foo
;
select
*
from
foo
;
connection
master
;
connection
master
;
drop
table
foo
;
drop
table
foo
;
...
...
mysql-test/t/rpl000015.test
View file @
716dda38
...
@@ -4,6 +4,7 @@ source include/have_default_master.inc;
...
@@ -4,6 +4,7 @@ source include/have_default_master.inc;
connection
master
;
connection
master
;
reset
master
;
reset
master
;
show
master
status
;
show
master
status
;
save_master_pos
;
connection
slave
;
connection
slave
;
reset
slave
;
reset
slave
;
show
slave
status
;
show
slave
status
;
...
@@ -13,7 +14,7 @@ change master to master_host='127.0.0.1',master_user='root',
...
@@ -13,7 +14,7 @@ change master to master_host='127.0.0.1',master_user='root',
master_password
=
''
,
master_port
=
9306
;
master_password
=
''
,
master_port
=
9306
;
show
slave
status
;
show
slave
status
;
slave
start
;
slave
start
;
s
leep
3
;
s
ync_with_master
;
show
slave
status
;
show
slave
status
;
connection
master
;
connection
master
;
drop
table
if
exists
foo
;
drop
table
if
exists
foo
;
...
@@ -22,7 +23,6 @@ insert into foo values (10),(45),(90);
...
@@ -22,7 +23,6 @@ insert into foo values (10),(45),(90);
save_master_pos
;
save_master_pos
;
connection
slave
;
connection
slave
;
sync_with_master
;
sync_with_master
;
sleep
1
;
select
*
from
foo
;
select
*
from
foo
;
connection
master
;
connection
master
;
drop
table
foo
;
drop
table
foo
;
...
...
mysql-test/t/rpl000016.test
View file @
716dda38
...
@@ -10,6 +10,9 @@ system chmod 600 var/slave-data/master.info;
...
@@ -10,6 +10,9 @@ system chmod 600 var/slave-data/master.info;
!
change
master
to
master_host
=
'127.0.0.1'
,
master_port
=
9306
,
master_user
=
'root'
;
!
change
master
to
master_host
=
'127.0.0.1'
,
master_port
=
9306
,
master_user
=
'root'
;
reset
slave
;
reset
slave
;
!
change
master
to
master_host
=
'127.0.0.1'
,
master_port
=
9306
,
master_user
=
'root'
;
!
change
master
to
master_host
=
'127.0.0.1'
,
master_port
=
9306
,
master_user
=
'root'
;
connection
master
;
reset
master
;
connection
slave
;
slave
start
;
slave
start
;
connection
master
;
connection
master
;
drop
table
if
exists
t1
;
drop
table
if
exists
t1
;
...
@@ -18,7 +21,7 @@ insert into t1 values('Could not break slave'),('Tried hard');
...
@@ -18,7 +21,7 @@ insert into t1 values('Could not break slave'),('Tried hard');
save_master_pos
;
save_master_pos
;
connection
slave
;
connection
slave
;
sync_with_master
;
sync_with_master
;
s
leep
1
;
s
how
slave
status
;
select
*
from
t1
;
select
*
from
t1
;
connection
master
;
connection
master
;
flush
logs
;
flush
logs
;
...
@@ -27,14 +30,13 @@ create table t2(m int);
...
@@ -27,14 +30,13 @@ create table t2(m int);
insert
into
t2
values
(
34
),(
67
),(
123
);
insert
into
t2
values
(
34
),(
67
),(
123
);
flush
logs
;
flush
logs
;
show
master
logs
;
show
master
logs
;
sleep
2
;
# If a slow machine
purge
master
logs
to
'master-bin.003'
;
purge
master
logs
to
'master-bin.003'
;
show
master
logs
;
show
master
logs
;
insert
into
t2
values
(
65
);
insert
into
t2
values
(
65
);
save_master_pos
;
save_master_pos
;
connection
slave
;
connection
slave
;
sync_with_master
;
sync_with_master
;
s
leep
1
;
s
how
slave
status
;
select
*
from
t2
;
select
*
from
t2
;
drop
table
if
exists
t1
,
t2
;
drop
table
if
exists
t1
,
t2
;
connection
master
;
connection
master
;
...
...
sql/log_event.h
View file @
716dda38
...
@@ -84,7 +84,7 @@ public:
...
@@ -84,7 +84,7 @@ public:
when
(
when_arg
),
exec_time
(
exec_time_arg
),
when
(
when_arg
),
exec_time
(
exec_time_arg
),
valid_exec_time
(
valid_exec_time_arg
)
valid_exec_time
(
valid_exec_time_arg
)
{
{
server_id
=
server_id_arg
?
server_id_arg
:
server_id
=
::
server_id
;
server_id
=
server_id_arg
?
server_id_arg
:
(
::
server_id
)
;
}
}
Log_event
(
const
char
*
buf
)
:
valid_exec_time
(
0
)
Log_event
(
const
char
*
buf
)
:
valid_exec_time
(
0
)
...
...
sql/slave.cc
View file @
716dda38
...
@@ -616,7 +616,7 @@ int st_master_info::wait_for_pos(THD* thd, String* log_name, ulong log_pos)
...
@@ -616,7 +616,7 @@ int st_master_info::wait_for_pos(THD* thd, String* log_name, ulong log_pos)
bool
pos_reached
;
bool
pos_reached
;
int
event_count
=
0
;
int
event_count
=
0
;
pthread_mutex_lock
(
&
lock
);
pthread_mutex_lock
(
&
lock
);
do
while
(
!
thd
->
killed
)
{
{
int
cmp_result
;
int
cmp_result
;
if
(
*
log_file_name
)
if
(
*
log_file_name
)
...
@@ -638,15 +638,13 @@ int st_master_info::wait_for_pos(THD* thd, String* log_name, ulong log_pos)
...
@@ -638,15 +638,13 @@ int st_master_info::wait_for_pos(THD* thd, String* log_name, ulong log_pos)
pos_reached
=
((
!
cmp_result
&&
pos
>=
log_pos
)
||
cmp_result
>
0
);
pos_reached
=
((
!
cmp_result
&&
pos
>=
log_pos
)
||
cmp_result
>
0
);
if
(
pos_reached
||
thd
->
killed
)
if
(
pos_reached
||
thd
->
killed
)
break
;
break
;
{
const
char
*
msg
=
thd
->
enter_cond
(
&
cond
,
&
lock
,
const
char
*
msg
=
thd
->
enter_cond
(
&
cond
,
&
lock
,
"Waiting for master update"
);
"Waiting for master update"
);
pthread_cond_wait
(
&
cond
,
&
lock
);
pthread_cond_wait
(
&
cond
,
&
lock
);
thd
->
exit_cond
(
msg
);
thd
->
exit_cond
(
msg
);
event_count
++
;
event_count
++
;
pos_reached
=
(
pos
>=
log_pos
);
}
}
}
while
(
!
pos_reached
&&
!
thd
->
killed
);
pthread_mutex_unlock
(
&
lock
);
pthread_mutex_unlock
(
&
lock
);
return
thd
->
killed
?
-
1
:
event_count
;
return
thd
->
killed
?
-
1
:
event_count
;
}
}
...
...
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