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
c18980ae
Commit
c18980ae
authored
Sep 19, 2005
by
msvensson@neptunus.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up printout of line numbers
parent
cb3d6101
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
16 deletions
+11
-16
client/mysqltest.c
client/mysqltest.c
+11
-16
No files found.
client/mysqltest.c
View file @
c18980ae
...
...
@@ -610,7 +610,9 @@ static void verbose_msg(const char *fmt, ...)
va_start
(
args
,
fmt
);
fprintf
(
stderr
,
"mysqltest: At line %u: "
,
start_lineno
);
fprintf
(
stderr
,
"mysqltest: "
);
if
(
start_lineno
>
0
)
fprintf
(
stderr
,
"At line %u: "
,
start_lineno
);
vfprintf
(
stderr
,
fmt
,
args
);
fprintf
(
stderr
,
"
\n
"
);
va_end
(
args
);
...
...
@@ -1345,9 +1347,7 @@ int do_sync_with_master2(long offset)
int
rpl_parse
;
if
(
!
master_pos
.
file
[
0
])
{
die
(
"Line %u: Calling 'sync_with_master' without calling 'save_master_pos'"
,
start_lineno
);
}
die
(
"Calling 'sync_with_master' without calling 'save_master_pos'"
);
rpl_parse
=
mysql_rpl_parse_enabled
(
mysql
);
mysql_disable_rpl_parse
(
mysql
);
...
...
@@ -1357,14 +1357,13 @@ int do_sync_with_master2(long offset)
wait_for_position:
if
(
mysql_query
(
mysql
,
query_buf
))
die
(
"
line %u: failed in %s: %d: %s"
,
start_lineno
,
query_buf
,
mysql_errno
(
mysql
),
mysql_error
(
mysql
));
die
(
"
failed in %s: %d: %s"
,
query_buf
,
mysql_errno
(
mysql
)
,
mysql_error
(
mysql
));
if
(
!
(
last_result
=
res
=
mysql_store_result
(
mysql
)))
die
(
"line %u: mysql_store_result() returned NULL for '%s'"
,
start_lineno
,
query_buf
);
die
(
"mysql_store_result() returned NULL for '%s'"
,
query_buf
);
if
(
!
(
row
=
mysql_fetch_row
(
res
)))
die
(
"
line %u: empty result in %s"
,
start_lineno
,
query_buf
);
die
(
"
empty result in %s"
,
query_buf
);
if
(
!
row
[
0
])
{
/*
...
...
@@ -1372,10 +1371,7 @@ wait_for_position:
SLAVE has been issued ?
*/
if
(
tries
++
==
3
)
{
die
(
"line %u: could not sync with master ('%s' returned NULL)"
,
start_lineno
,
query_buf
);
}
die
(
"could not sync with master ('%s' returned NULL)"
,
query_buf
);
sleep
(
1
);
/* So at most we will wait 3 seconds and make 4 tries */
mysql_free_result
(
res
);
goto
wait_for_position
;
...
...
@@ -1421,10 +1417,9 @@ int do_save_master_pos()
mysql_errno
(
mysql
),
mysql_error
(
mysql
));
if
(
!
(
last_result
=
res
=
mysql_store_result
(
mysql
)))
die
(
"line %u: mysql_store_result() retuned NULL for '%s'"
,
start_lineno
,
query
);
die
(
"mysql_store_result() retuned NULL for '%s'"
,
query
);
if
(
!
(
row
=
mysql_fetch_row
(
res
)))
die
(
"
line %u: empty result in show master status"
,
start_lineno
);
die
(
"
empty result in show master status"
);
strnmov
(
master_pos
.
file
,
row
[
0
],
sizeof
(
master_pos
.
file
)
-
1
);
master_pos
.
pos
=
strtoul
(
row
[
1
],
(
char
**
)
0
,
10
);
mysql_free_result
(
res
);
last_result
=
0
;
...
...
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