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
b076cdb2
Commit
b076cdb2
authored
May 16, 2005
by
kent@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mysqltest.c:
To solve bug#8455, call mysql_affected_rows() earlier, before query to find warnings
parent
6374bfeb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
client/mysqltest.c
client/mysqltest.c
+10
-1
No files found.
client/mysqltest.c
View file @
b076cdb2
...
@@ -2597,6 +2597,8 @@ static int run_query_normal(MYSQL* mysql, struct st_query* q, int flags)
...
@@ -2597,6 +2597,8 @@ static int run_query_normal(MYSQL* mysql, struct st_query* q, int flags)
if
(
!
disable_result_log
)
if
(
!
disable_result_log
)
{
{
ulong
affected_rows
;
/* Ok to be undef if 'disable_info' is set */
if
(
res
)
if
(
res
)
{
{
MYSQL_FIELD
*
field
=
mysql_fetch_fields
(
res
);
MYSQL_FIELD
*
field
=
mysql_fetch_fields
(
res
);
...
@@ -2619,6 +2621,13 @@ static int run_query_normal(MYSQL* mysql, struct st_query* q, int flags)
...
@@ -2619,6 +2621,13 @@ static int run_query_normal(MYSQL* mysql, struct st_query* q, int flags)
append_result
(
ds
,
res
);
append_result
(
ds
,
res
);
}
}
/*
Need to call mysql_affected_rows() before the new
query to find the warnings
*/
if
(
!
disable_info
)
affected_rows
=
(
ulong
)
mysql_affected_rows
(
mysql
);
/* Add all warnings to the result */
/* Add all warnings to the result */
if
(
!
disable_warnings
&&
mysql_warning_count
(
mysql
))
if
(
!
disable_warnings
&&
mysql_warning_count
(
mysql
))
{
{
...
@@ -2641,7 +2650,7 @@ static int run_query_normal(MYSQL* mysql, struct st_query* q, int flags)
...
@@ -2641,7 +2650,7 @@ static int run_query_normal(MYSQL* mysql, struct st_query* q, int flags)
if
(
!
disable_info
)
if
(
!
disable_info
)
{
{
char
buf
[
40
];
char
buf
[
40
];
sprintf
(
buf
,
"affected rows: %lu
\n
"
,
(
ulong
)
mysql_affected_rows
(
mysql
)
);
sprintf
(
buf
,
"affected rows: %lu
\n
"
,
affected_rows
);
dynstr_append
(
ds
,
buf
);
dynstr_append
(
ds
,
buf
);
if
(
mysql_info
(
mysql
))
if
(
mysql_info
(
mysql
))
{
{
...
...
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