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
b14e9a7a
Commit
b14e9a7a
authored
Oct 16, 2006
by
istruewing@chilla.local
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-5.0-engines
into chilla.local:/home/mydev/mysql-5.0-bug12240
parents
35c94b6e
9f4d8208
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
6 deletions
+18
-6
sql/sql_select.cc
sql/sql_select.cc
+18
-6
No files found.
sql/sql_select.cc
View file @
b14e9a7a
...
@@ -1375,12 +1375,13 @@ JOIN::exec()
...
@@ -1375,12 +1375,13 @@ JOIN::exec()
thd
->
examined_row_count
=
0
;
thd
->
examined_row_count
=
0
;
DBUG_VOID_RETURN
;
DBUG_VOID_RETURN
;
}
}
/*
/*
don't reset the found rows count if there're no tables
Don't reset the found rows count if there're no tables as
as FOUND_ROWS() may be called.
FOUND_ROWS() may be called. Never reset the examined row count here.
*/
It must be accumulated from all join iterations of all join parts.
*/
if
(
tables
)
if
(
tables
)
thd
->
limit_found_rows
=
thd
->
examined_row_count
=
0
;
thd
->
limit_found_rows
=
0
;
if
(
zero_result_cause
)
if
(
zero_result_cause
)
{
{
...
@@ -1428,6 +1429,12 @@ JOIN::exec()
...
@@ -1428,6 +1429,12 @@ JOIN::exec()
List
<
Item
>
*
curr_all_fields
=
&
all_fields
;
List
<
Item
>
*
curr_all_fields
=
&
all_fields
;
List
<
Item
>
*
curr_fields_list
=
&
fields_list
;
List
<
Item
>
*
curr_fields_list
=
&
fields_list
;
TABLE
*
curr_tmp_table
=
0
;
TABLE
*
curr_tmp_table
=
0
;
/*
Initialize examined rows here because the values from all join parts
must be accumulated in examined_row_count. Hence every join
iteration must count from zero.
*/
curr_join
->
examined_rows
=
0
;
if
((
curr_join
->
select_lex
->
options
&
OPTION_SCHEMA_TABLE
)
&&
if
((
curr_join
->
select_lex
->
options
&
OPTION_SCHEMA_TABLE
)
&&
get_schema_tables_result
(
curr_join
))
get_schema_tables_result
(
curr_join
))
...
@@ -1834,9 +1841,12 @@ JOIN::exec()
...
@@ -1834,9 +1841,12 @@ JOIN::exec()
Protocol
::
SEND_NUM_ROWS
|
Protocol
::
SEND_EOF
);
Protocol
::
SEND_NUM_ROWS
|
Protocol
::
SEND_EOF
);
error
=
do_select
(
curr_join
,
curr_fields_list
,
NULL
,
procedure
);
error
=
do_select
(
curr_join
,
curr_fields_list
,
NULL
,
procedure
);
thd
->
limit_found_rows
=
curr_join
->
send_records
;
thd
->
limit_found_rows
=
curr_join
->
send_records
;
thd
->
examined_row_count
=
curr_join
->
examined_rows
;
}
}
/* Accumulate the counts from all join iterations of all join parts. */
thd
->
examined_row_count
+=
curr_join
->
examined_rows
;
DBUG_PRINT
(
"counts"
,
(
"thd->examined_row_count: %lu"
,
(
ulong
)
thd
->
examined_row_count
));
DBUG_VOID_RETURN
;
DBUG_VOID_RETURN
;
}
}
...
@@ -10141,6 +10151,8 @@ evaluate_join_record(JOIN *join, JOIN_TAB *join_tab,
...
@@ -10141,6 +10151,8 @@ evaluate_join_record(JOIN *join, JOIN_TAB *join_tab,
*/
*/
join
->
examined_rows
++
;
join
->
examined_rows
++
;
join
->
thd
->
row_count
++
;
join
->
thd
->
row_count
++
;
DBUG_PRINT
(
"counts"
,
(
"join->examined_rows++: %lu"
,
(
ulong
)
join
->
examined_rows
));
if
(
found
)
if
(
found
)
{
{
...
...
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