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
aaa188da
Commit
aaa188da
authored
Jul 27, 2012
by
Sergey Petrunya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Post-merge fixes.
parent
2b0f6ece
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
19 additions
and
16 deletions
+19
-16
mysql-test/r/subselect.result
mysql-test/r/subselect.result
+1
-1
mysql-test/r/subselect_innodb.result
mysql-test/r/subselect_innodb.result
+2
-2
mysql-test/r/subselect_mat_cost_bugs.result
mysql-test/r/subselect_mat_cost_bugs.result
+1
-1
mysql-test/r/subselect_no_mat.result
mysql-test/r/subselect_no_mat.result
+1
-1
mysql-test/r/subselect_no_opts.result
mysql-test/r/subselect_no_opts.result
+1
-1
mysql-test/r/subselect_no_scache.result
mysql-test/r/subselect_no_scache.result
+1
-1
mysql-test/r/subselect_no_semijoin.result
mysql-test/r/subselect_no_semijoin.result
+1
-1
sql/sql_select.cc
sql/sql_select.cc
+11
-8
No files found.
mysql-test/r/subselect.result
View file @
aaa188da
...
...
@@ -4196,7 +4196,7 @@ INSERT INTO t1 VALUES (1,1),(2,1);
EXPLAIN SELECT 1 FROM t1 WHERE a = (SELECT COUNT(*) FROM t1 GROUP BY b);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ref a a 5 const 1 Using where; Using index
2 SUBQUERY
internal_tmp_table ALL group_key NULL NULL NULL 1
Using temporary; Using filesort
2 SUBQUERY
t1 ALL NULL NULL NULL NULL 2
Using temporary; Using filesort
DROP TABLE t1;
CREATE TABLE t1 (id int NOT NULL, st CHAR(2), INDEX idx(id));
INSERT INTO t1 VALUES
...
...
mysql-test/r/subselect_innodb.result
View file @
aaa188da
...
...
@@ -333,7 +333,7 @@ WHERE (SELECT DISTINCT b FROM t3) > 0);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 const PRIMARY PRIMARY 4 const 1 Using where; Using index
2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
3 SUBQUERY
internal_tmp_table ALL group_key NULL NULL NULL 0
Using temporary
3 SUBQUERY
t3 ALL NULL NULL NULL NULL 1
Using temporary
SELECT *
FROM t1
WHERE t1.a = (
...
...
@@ -386,7 +386,7 @@ select 1 from t1 where 1 like (select 1 from t1 where 1 <=> (select 1 from t1 gr
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 1
2 SUBQUERY t1 ALL NULL NULL NULL NULL 1
3 SUBQUERY
internal_tmp_table ALL group_key
NULL NULL NULL 1 Using temporary; Using filesort
3 SUBQUERY
t1 ALL NULL
NULL NULL NULL 1 Using temporary; Using filesort
select 1 from t1 where 1 like (select 1 from t1 where 1 <=> (select 1 from t1 group by a1));
1
1
...
...
mysql-test/r/subselect_mat_cost_bugs.result
View file @
aaa188da
...
...
@@ -148,7 +148,7 @@ FROM t2 GROUP BY f1
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
2 SUBQUERY t1 system NULL NULL NULL NULL 1
3 SUBQUERY
internal_tmp_table ALL group_key NULL NULL NULL 1
Using temporary; Using filesort
3 SUBQUERY
t2 ALL NULL NULL NULL NULL 2
Using temporary; Using filesort
drop table t1, t2, t3;
#
# LP BUG#715034 Item_sum_distinct::clear(): Assertion `tree != 0' failed
...
...
mysql-test/r/subselect_no_mat.result
View file @
aaa188da
...
...
@@ -4200,7 +4200,7 @@ INSERT INTO t1 VALUES (1,1),(2,1);
EXPLAIN SELECT 1 FROM t1 WHERE a = (SELECT COUNT(*) FROM t1 GROUP BY b);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ref a a 5 const 1 Using where; Using index
2 SUBQUERY
internal_tmp_table ALL group_key NULL NULL NULL 1
Using temporary; Using filesort
2 SUBQUERY
t1 ALL NULL NULL NULL NULL 2
Using temporary; Using filesort
DROP TABLE t1;
CREATE TABLE t1 (id int NOT NULL, st CHAR(2), INDEX idx(id));
INSERT INTO t1 VALUES
...
...
mysql-test/r/subselect_no_opts.result
View file @
aaa188da
...
...
@@ -4196,7 +4196,7 @@ INSERT INTO t1 VALUES (1,1),(2,1);
EXPLAIN SELECT 1 FROM t1 WHERE a = (SELECT COUNT(*) FROM t1 GROUP BY b);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ref a a 5 const 1 Using where; Using index
2 SUBQUERY
internal_tmp_table ALL group_key NULL NULL NULL 1
Using temporary; Using filesort
2 SUBQUERY
t1 ALL NULL NULL NULL NULL 2
Using temporary; Using filesort
DROP TABLE t1;
CREATE TABLE t1 (id int NOT NULL, st CHAR(2), INDEX idx(id));
INSERT INTO t1 VALUES
...
...
mysql-test/r/subselect_no_scache.result
View file @
aaa188da
...
...
@@ -4202,7 +4202,7 @@ INSERT INTO t1 VALUES (1,1),(2,1);
EXPLAIN SELECT 1 FROM t1 WHERE a = (SELECT COUNT(*) FROM t1 GROUP BY b);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ref a a 5 const 1 Using where; Using index
2 SUBQUERY
internal_tmp_table ALL group_key NULL NULL NULL 1
Using temporary; Using filesort
2 SUBQUERY
t1 ALL NULL NULL NULL NULL 2
Using temporary; Using filesort
DROP TABLE t1;
CREATE TABLE t1 (id int NOT NULL, st CHAR(2), INDEX idx(id));
INSERT INTO t1 VALUES
...
...
mysql-test/r/subselect_no_semijoin.result
View file @
aaa188da
...
...
@@ -4196,7 +4196,7 @@ INSERT INTO t1 VALUES (1,1),(2,1);
EXPLAIN SELECT 1 FROM t1 WHERE a = (SELECT COUNT(*) FROM t1 GROUP BY b);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ref a a 5 const 1 Using where; Using index
2 SUBQUERY
internal_tmp_table ALL group_key NULL NULL NULL 1
Using temporary; Using filesort
2 SUBQUERY
t1 ALL NULL NULL NULL NULL 2
Using temporary; Using filesort
DROP TABLE t1;
CREATE TABLE t1 (id int NOT NULL, st CHAR(2), INDEX idx(id));
INSERT INTO t1 VALUES
...
...
sql/sql_select.cc
View file @
aaa188da
...
...
@@ -271,8 +271,11 @@ Item_equal *find_item_equal(COND_EQUAL *cond_equal, Field *field,
bool
*
inherited_fl
);
JOIN_TAB
*
first_depth_first_tab
(
JOIN
*
join
);
JOIN_TAB
*
next_depth_first_tab
(
JOIN
*
join
,
JOIN_TAB
*
tab
);
JOIN_TAB
*
first_breadth_first_tab
(
JOIN
*
join
);
JOIN_TAB
*
next_breadth_first_tab
(
JOIN
*
join
,
JOIN_TAB
*
tab
);
enum
enum_exec_or_opt
{
WALK_OPTIMIZATION_TABS
,
WALK_EXECUTION_TABS
};
JOIN_TAB
*
first_breadth_first_tab
(
JOIN
*
join
,
enum
enum_exec_or_opt
tabs_kind
);
JOIN_TAB
*
next_breadth_first_tab
(
JOIN
*
join
,
enum
enum_exec_or_opt
tabs_kind
,
JOIN_TAB
*
tab
);
#ifndef DBUG_OFF
...
...
@@ -6730,12 +6733,12 @@ double JOIN::get_examined_rows()
{
ha_rows
examined_rows
;
double
prev_fanout
=
1
;
JOIN_TAB
*
tab
=
first_breadth_first_tab
(
this
);
JOIN_TAB
*
tab
=
first_breadth_first_tab
(
this
,
WALK_OPTIMIZATION_TABS
);
JOIN_TAB
*
prev_tab
=
tab
;
examined_rows
=
tab
->
get_examined_rows
();
while
((
tab
=
next_breadth_first_tab
(
this
,
tab
)))
while
((
tab
=
next_breadth_first_tab
(
this
,
WALK_OPTIMIZATION_TABS
,
tab
)))
{
prev_fanout
*=
prev_tab
->
records_read
;
examined_rows
+=
tab
->
get_examined_rows
()
*
prev_fanout
;
...
...
@@ -7345,7 +7348,6 @@ prev_record_reads(POSITION *positions, uint idx, table_map found_ref)
return
found
;
}
enum
enum_exec_or_opt
{
WALK_OPTIMIZATION_TABS
,
WALK_EXECUTION_TABS
};
/*
Enumerate join tabs in breadth-first fashion, including const tables.
...
...
@@ -10434,7 +10436,7 @@ ha_rows JOIN_TAB::get_examined_rows()
{
ha_rows
examined_rows
;
if
(
select
&&
select
->
quick
)
if
(
select
&&
select
->
quick
&&
use_quick
!=
2
)
examined_rows
=
select
->
quick
->
records
;
else
if
(
type
==
JT_NEXT
||
type
==
JT_ALL
||
type
==
JT_HASH
||
type
==
JT_HASH_NEXT
)
...
...
@@ -19182,7 +19184,7 @@ create_sort_index(THD *thd, JOIN *join, ORDER *order,
void
JOIN
::
clean_pre_sort_join_tab
()
{
TABLE
*
table
=
pre_sort_join_tab
->
table
;
//
TABLE *table= pre_sort_join_tab->table;
/*
Note: we can come here for fake_select_lex object. That object will have
the table already deleted by st_select_lex_unit::cleanup().
...
...
@@ -21710,7 +21712,8 @@ int JOIN::print_explain(select_result_sink *result, uint8 explain_flags,
continue
;
}
if
(
tab
==
(
first_top_tab
+
join
->
const_tables
)
&&
pre_sort_join_tab
)
if
(
join
->
table_access_tabs
==
join
->
join_tab
&&
tab
==
(
first_top_tab
+
join
->
const_tables
)
&&
pre_sort_join_tab
)
{
saved_join_tab
=
tab
;
tab
=
pre_sort_join_tab
;
...
...
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