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
1c9e362f
Commit
1c9e362f
authored
Oct 15, 2007
by
kostja@bodhi.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add comments, tidy up sql_delete.cc to refer to thd->row_count_func
explicitly.
parent
5cda5030
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
4 deletions
+16
-4
sql/sql_class.cc
sql/sql_class.cc
+12
-0
sql/sql_delete.cc
sql/sql_delete.cc
+4
-4
No files found.
sql/sql_class.cc
View file @
1c9e362f
...
...
@@ -1423,7 +1423,14 @@ bool select_to_file::send_eof()
if
(
my_close
(
file
,
MYF
(
MY_WME
)))
error
=
1
;
if
(
!
error
)
{
/*
In order to remember the value of affected rows for ROW_COUNT()
function, SELECT INTO has to have an own SQLCOM.
TODO: split from SQLCOM_SELECT
*/
::
send_ok
(
thd
,
row_count
);
}
file
=
-
1
;
return
error
;
}
...
...
@@ -2338,6 +2345,11 @@ bool select_dumpvar::send_eof()
if
(
!
row_count
)
push_warning
(
thd
,
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
ER_SP_FETCH_NO_DATA
,
ER
(
ER_SP_FETCH_NO_DATA
));
/*
In order to remember the value of affected rows for ROW_COUNT()
function, SELECT INTO has to have an own SQLCOM.
TODO: split from SQLCOM_SELECT
*/
::
send_ok
(
thd
,
row_count
);
return
0
;
}
...
...
sql/sql_delete.cc
View file @
1c9e362f
...
...
@@ -142,7 +142,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
{
free_underlaid_joins
(
thd
,
select_lex
);
thd
->
row_count_func
=
0
;
send_ok
(
thd
);
// No matching records
send_ok
(
thd
,
(
ha_rows
)
thd
->
row_count_func
);
// No matching records
DBUG_RETURN
(
0
);
}
#endif
...
...
@@ -159,7 +159,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
delete
select
;
free_underlaid_joins
(
thd
,
select_lex
);
thd
->
row_count_func
=
0
;
send_ok
(
thd
,
0L
);
send_ok
(
thd
,
(
ha_rows
)
thd
->
row_count_func
);
/*
We don't need to call reset_auto_increment in this case, because
mysql_truncate always gives a NULL conds argument, hence we never
...
...
@@ -386,7 +386,7 @@ cleanup:
if
(
error
<
0
||
(
thd
->
lex
->
ignore
&&
!
thd
->
is_fatal_error
))
{
thd
->
row_count_func
=
deleted
;
send_ok
(
thd
,
deleted
);
send_ok
(
thd
,
(
ha_rows
)
thd
->
row_count_func
);
DBUG_PRINT
(
"info"
,(
"%ld records deleted"
,(
long
)
deleted
));
}
DBUG_RETURN
(
error
>=
0
||
thd
->
net
.
report_error
);
...
...
@@ -889,7 +889,7 @@ bool multi_delete::send_eof()
if
(
!
local_error
)
{
thd
->
row_count_func
=
deleted
;
::
send_ok
(
thd
,
deleted
);
::
send_ok
(
thd
,
(
ha_rows
)
thd
->
row_count_func
);
}
return
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