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
9ffeed15
Commit
9ffeed15
authored
Feb 18, 2020
by
Varun Gupta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing buildbot failures
parent
1ee02f2c
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
29 additions
and
29 deletions
+29
-29
mysql-test/main/sort_nest.result
mysql-test/main/sort_nest.result
+6
-6
mysql-test/main/sort_nest.test
mysql-test/main/sort_nest.test
+1
-1
mysql-test/suite/sys_vars/r/optimizer_switch_basic.result
mysql-test/suite/sys_vars/r/optimizer_switch_basic.result
+16
-16
mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
...l-test/suite/sys_vars/r/sysvars_server_notembedded.result
+1
-1
sql/sql_select.cc
sql/sql_select.cc
+2
-2
sql/sql_sort_nest.cc
sql/sql_sort_nest.cc
+3
-3
No files found.
mysql-test/main/sort_nest.result
View file @
9ffeed15
...
...
@@ -1219,7 +1219,7 @@ ANALYZE TABLE t3 PERSISTENT FOR ALL;
#
# sort-nest(t2,t1) and independent subquery in the SELECT list
#
EXPLAIN SELECT (SELECT
A.a FROM t3 A WHERE A
.a > 5 limit 1) as x,
EXPLAIN SELECT (SELECT
q.a FROM t3 q WHERE q
.a > 5 limit 1) as x,
t2.b, t1.b, t3.a
FROM t1,t2,t3
WHERE t1.a = t2.a
...
...
@@ -1230,8 +1230,8 @@ id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ref a a 5 test.t2.a 1
1 PRIMARY <sort-nest> ALL NULL NULL NULL NULL 1 Using filesort
1 PRIMARY t3 ALL NULL NULL NULL NULL 1000
2 SUBQUERY
A
ALL NULL NULL NULL NULL 1000 Using where
EXPLAIN FORMAT=JSON SELECT (SELECT
A.a FROM t3 A WHERE A
.a > 5 limit 1) as x,
2 SUBQUERY
q
ALL NULL NULL NULL NULL 1000 Using where
EXPLAIN FORMAT=JSON SELECT (SELECT
q.a FROM t3 q WHERE q
.a > 5 limit 1) as x,
t2.b, t1.b, t3.a
FROM t1,t2,t3
WHERE t1.a = t2.a
...
...
@@ -1281,18 +1281,18 @@ EXPLAIN
"query_block": {
"select_id": 2,
"table": {
"table_name": "
A
",
"table_name": "
q
",
"access_type": "ALL",
"rows": 1000,
"filtered": 99.219,
"attached_condition": "
a
.a > 5"
"attached_condition": "
q
.a > 5"
}
}
}
]
}
}
SELECT (SELECT
A.a FROM t3 A WHERE A
.a > 5 limit 1) as x,
SELECT (SELECT
q.a FROM t3 q WHERE q
.a > 5 limit 1) as x,
t2.b, t1.b, t3.a
FROM t1,t2,t3
WHERE t1.a = t2.a
...
...
mysql-test/main/sort_nest.test
View file @
9ffeed15
...
...
@@ -387,7 +387,7 @@ ANALYZE TABLE t3 PERSISTENT FOR ALL;
--
echo
#
let
$query
=
SELECT
(
SELECT
A
.
a
FROM
t3
A
WHERE
A
.
a
>
5
limit
1
)
as
x
,
SELECT
(
SELECT
q
.
a
FROM
t3
q
WHERE
q
.
a
>
5
limit
1
)
as
x
,
t2
.
b
,
t1
.
b
,
t3
.
a
FROM
t1
,
t2
,
t3
WHERE
t1
.
a
=
t2
.
a
...
...
mysql-test/suite/sys_vars/r/optimizer_switch_basic.result
View file @
9ffeed15
This diff is collapsed.
Click to expand it.
mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
View file @
9ffeed15
...
...
@@ -2440,7 +2440,7 @@ VARIABLE_COMMENT Fine-tune the optimizer behavior
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST index_merge,index_merge_union,index_merge_sort_union,index_merge_intersection,index_merge_sort_intersection,engine_condition_pushdown,index_condition_pushdown,derived_merge,derived_with_keys,firstmatch,loosescan,materialization,in_to_exists,semijoin,partial_match_rowid_merge,partial_match_table_scan,subquery_cache,mrr,mrr_cost_based,mrr_sort_keys,outer_join_with_cache,semijoin_with_cache,join_cache_incremental,join_cache_hashed,join_cache_bka,optimize_join_buffer_size,table_elimination,extended_keys,exists_to_in,orderby_uses_equalities,condition_pushdown_for_derived,split_materialized,condition_pushdown_for_subquery,rowid_filter,condition_pushdown_from_having,not_null_range_scan,default
ENUM_VALUE_LIST index_merge,index_merge_union,index_merge_sort_union,index_merge_intersection,index_merge_sort_intersection,engine_condition_pushdown,index_condition_pushdown,derived_merge,derived_with_keys,firstmatch,loosescan,materialization,in_to_exists,semijoin,partial_match_rowid_merge,partial_match_table_scan,subquery_cache,mrr,mrr_cost_based,mrr_sort_keys,outer_join_with_cache,semijoin_with_cache,join_cache_incremental,join_cache_hashed,join_cache_bka,optimize_join_buffer_size,table_elimination,extended_keys,exists_to_in,orderby_uses_equalities,condition_pushdown_for_derived,split_materialized,condition_pushdown_for_subquery,rowid_filter,condition_pushdown_from_having,not_null_range_scan,
cost_based_order_by_limit,
default
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME OPTIMIZER_TRACE
...
...
sql/sql_select.cc
View file @
9ffeed15
...
...
@@ -13759,7 +13759,7 @@ make_join_readinfo(JOIN *join, ulonglong options, uint no_jbuf_after)
sort_nest_info->index_used >= 0)
{
tab->index= sort_nest_info->index_used;
tab
->
limit
=
tab
->
records_read
;
tab->limit=
(ha_rows)
tab->records_read;
}
else
tab->index=find_shortest_key(table, &table->covering_keys);
...
...
@@ -28908,7 +28908,7 @@ test_if_cheaper_ordering(const JOIN_TAB *tab, ORDER *order, TABLE *table,
} /* group */
find_cost_of_index_with_ordering(thd, tab, table, &select_limit,
fanout
,
refkey_rows_estimate
,
fanout,
(double)
refkey_rows_estimate,
nr, &index_scan_time,
&possible_key);
...
...
sql/sql_sort_nest.cc
View file @
9ffeed15
...
...
@@ -1061,7 +1061,7 @@ int get_best_index_for_order_by_limit(JOIN_TAB *tab,
{
best_index
=
idx
;
*
read_time
=
index_scan_time
;
*
records
=
select_limit
;
*
records
=
(
double
)
select_limit
;
}
}
considered_indexes
.
end
();
...
...
@@ -1256,7 +1256,7 @@ void JOIN::setup_range_scan(JOIN_TAB *tab, uint idx, double records)
taken selectivity of limit into account.
*/
if
(
sort_nest_possible
&&
records
<
tab
->
quick
->
records
)
tab
->
quick
->
records
=
records
;
tab
->
quick
->
records
=
(
ha_rows
)
records
;
sel
->
quick
=
NULL
;
...
...
@@ -1537,7 +1537,7 @@ void find_cost_of_index_with_ordering(THD *thd, const JOIN_TAB *tab,
KEY
*
keyinfo
=
table
->
key_info
+
nr
;
ha_rows
select_limit
=
*
select_limit_arg
;
double
rec_per_key
;
double
table_records
=
table
->
stat_records
();
ha_rows
table_records
=
table
->
stat_records
();
/*
If tab=tk is not the last joined table tn then to get first
L records from the result set we can expect to retrieve
...
...
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