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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
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
Hide 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()
...
@@ -1423,7 +1423,14 @@ bool select_to_file::send_eof()
if
(
my_close
(
file
,
MYF
(
MY_WME
)))
if
(
my_close
(
file
,
MYF
(
MY_WME
)))
error
=
1
;
error
=
1
;
if
(
!
error
)
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
);
::
send_ok
(
thd
,
row_count
);
}
file
=
-
1
;
file
=
-
1
;
return
error
;
return
error
;
}
}
...
@@ -2338,6 +2345,11 @@ bool select_dumpvar::send_eof()
...
@@ -2338,6 +2345,11 @@ bool select_dumpvar::send_eof()
if
(
!
row_count
)
if
(
!
row_count
)
push_warning
(
thd
,
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
push_warning
(
thd
,
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
ER_SP_FETCH_NO_DATA
,
ER
(
ER_SP_FETCH_NO_DATA
));
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
);
::
send_ok
(
thd
,
row_count
);
return
0
;
return
0
;
}
}
...
...
sql/sql_delete.cc
View file @
1c9e362f
...
@@ -142,7 +142,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
...
@@ -142,7 +142,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
{
{
free_underlaid_joins
(
thd
,
select_lex
);
free_underlaid_joins
(
thd
,
select_lex
);
thd
->
row_count_func
=
0
;
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
);
DBUG_RETURN
(
0
);
}
}
#endif
#endif
...
@@ -159,7 +159,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
...
@@ -159,7 +159,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
delete
select
;
delete
select
;
free_underlaid_joins
(
thd
,
select_lex
);
free_underlaid_joins
(
thd
,
select_lex
);
thd
->
row_count_func
=
0
;
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
We don't need to call reset_auto_increment in this case, because
mysql_truncate always gives a NULL conds argument, hence we never
mysql_truncate always gives a NULL conds argument, hence we never
...
@@ -386,7 +386,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
...
@@ -386,7 +386,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
if
(
error
<
0
||
(
thd
->
lex
->
ignore
&&
!
thd
->
is_fatal_error
))
if
(
error
<
0
||
(
thd
->
lex
->
ignore
&&
!
thd
->
is_fatal_error
))
{
{
thd
->
row_count_func
=
deleted
;
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_PRINT
(
"info"
,(
"%ld records deleted"
,(
long
)
deleted
));
}
}
DBUG_RETURN
(
error
>=
0
||
thd
->
net
.
report_error
);
DBUG_RETURN
(
error
>=
0
||
thd
->
net
.
report_error
);
...
@@ -889,7 +889,7 @@ bool multi_delete::send_eof()
...
@@ -889,7 +889,7 @@ bool multi_delete::send_eof()
if
(
!
local_error
)
if
(
!
local_error
)
{
{
thd
->
row_count_func
=
deleted
;
thd
->
row_count_func
=
deleted
;
::
send_ok
(
thd
,
deleted
);
::
send_ok
(
thd
,
(
ha_rows
)
thd
->
row_count_func
);
}
}
return
0
;
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