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
7bcb79e7
Commit
7bcb79e7
authored
May 14, 2004
by
guilhem@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/mysql_src/mysql-4.0
parents
02f51ccf
a039062e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
5 deletions
+18
-5
client/mysqltest.c
client/mysqltest.c
+18
-3
mysql-test/r/rpl_server_id2.result
mysql-test/r/rpl_server_id2.result
+0
-1
mysql-test/t/rpl_server_id2.test
mysql-test/t/rpl_server_id2.test
+0
-1
No files found.
client/mysqltest.c
View file @
7bcb79e7
...
@@ -1081,7 +1081,7 @@ int do_sync_with_master2(const char* p)
...
@@ -1081,7 +1081,7 @@ int do_sync_with_master2(const char* p)
MYSQL_ROW
row
;
MYSQL_ROW
row
;
MYSQL
*
mysql
=
&
cur_con
->
mysql
;
MYSQL
*
mysql
=
&
cur_con
->
mysql
;
char
query_buf
[
FN_REFLEN
+
128
];
char
query_buf
[
FN_REFLEN
+
128
];
int
offset
=
0
;
int
offset
=
0
,
tries
=
0
;
int
rpl_parse
;
int
rpl_parse
;
if
(
!
master_pos
.
file
[
0
])
if
(
!
master_pos
.
file
[
0
])
...
@@ -1096,6 +1096,9 @@ int do_sync_with_master2(const char* p)
...
@@ -1096,6 +1096,9 @@ int do_sync_with_master2(const char* p)
sprintf
(
query_buf
,
"select master_pos_wait('%s', %ld)"
,
master_pos
.
file
,
sprintf
(
query_buf
,
"select master_pos_wait('%s', %ld)"
,
master_pos
.
file
,
master_pos
.
pos
+
offset
);
master_pos
.
pos
+
offset
);
wait_for_position:
if
(
mysql_query
(
mysql
,
query_buf
))
if
(
mysql_query
(
mysql
,
query_buf
))
die
(
"line %u: failed in %s: %d: %s"
,
start_lineno
,
query_buf
,
die
(
"line %u: failed in %s: %d: %s"
,
start_lineno
,
query_buf
,
mysql_errno
(
mysql
),
mysql_error
(
mysql
));
mysql_errno
(
mysql
),
mysql_error
(
mysql
));
...
@@ -1106,8 +1109,20 @@ int do_sync_with_master2(const char* p)
...
@@ -1106,8 +1109,20 @@ int do_sync_with_master2(const char* p)
if
(
!
(
row
=
mysql_fetch_row
(
res
)))
if
(
!
(
row
=
mysql_fetch_row
(
res
)))
die
(
"line %u: empty result in %s"
,
start_lineno
,
query_buf
);
die
(
"line %u: empty result in %s"
,
start_lineno
,
query_buf
);
if
(
!
row
[
0
])
if
(
!
row
[
0
])
{
/*
It may be that the slave SQL thread has not started yet, though START
SLAVE has been issued ?
*/
if
(
tries
++
==
3
)
{
die
(
"line %u: could not sync with master ('%s' returned NULL)"
,
die
(
"line %u: could not sync with master ('%s' returned NULL)"
,
start_lineno
,
query_buf
);
start_lineno
,
query_buf
);
}
sleep
(
1
);
/* So at most we will wait 3 seconds and make 4 tries */
mysql_free_result
(
res
);
goto
wait_for_position
;
}
mysql_free_result
(
res
);
mysql_free_result
(
res
);
last_result
=
0
;
last_result
=
0
;
if
(
rpl_parse
)
if
(
rpl_parse
)
...
...
mysql-test/r/rpl_server_id2.result
View file @
7bcb79e7
...
@@ -4,7 +4,6 @@ reset master;
...
@@ -4,7 +4,6 @@ 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;
slave start;
slave start;
drop table if exists t1;
create table t1 (n int);
create table t1 (n int);
reset master;
reset master;
stop slave;
stop slave;
...
...
mysql-test/t/rpl_server_id2.test
View file @
7bcb79e7
...
@@ -3,7 +3,6 @@
...
@@ -3,7 +3,6 @@
source
include
/
master
-
slave
.
inc
;
source
include
/
master
-
slave
.
inc
;
connection
slave
;
connection
slave
;
drop
table
if
exists
t1
;
create
table
t1
(
n
int
);
create
table
t1
(
n
int
);
reset
master
;
reset
master
;
# replicate ourselves
# replicate ourselves
...
...
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