Commit 9ffeed15 authored by Varun Gupta's avatar Varun Gupta

Fixing buildbot failures

parent 1ee02f2c
...@@ -1219,7 +1219,7 @@ ANALYZE TABLE t3 PERSISTENT FOR ALL; ...@@ -1219,7 +1219,7 @@ ANALYZE TABLE t3 PERSISTENT FOR ALL;
# #
# sort-nest(t2,t1) and independent subquery in the SELECT list # 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 t2.b, t1.b, t3.a
FROM t1,t2,t3 FROM t1,t2,t3
WHERE t1.a = t2.a WHERE t1.a = t2.a
...@@ -1230,8 +1230,8 @@ id select_type table type possible_keys key key_len ref rows Extra ...@@ -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 t1 ref a a 5 test.t2.a 1
1 PRIMARY <sort-nest> ALL NULL NULL NULL NULL 1 Using filesort 1 PRIMARY <sort-nest> ALL NULL NULL NULL NULL 1 Using filesort
1 PRIMARY t3 ALL NULL NULL NULL NULL 1000 1 PRIMARY t3 ALL NULL NULL NULL NULL 1000
2 SUBQUERY A ALL NULL NULL NULL NULL 1000 Using where 2 SUBQUERY q 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, EXPLAIN FORMAT=JSON SELECT (SELECT q.a FROM t3 q WHERE q.a > 5 limit 1) as x,
t2.b, t1.b, t3.a t2.b, t1.b, t3.a
FROM t1,t2,t3 FROM t1,t2,t3
WHERE t1.a = t2.a WHERE t1.a = t2.a
...@@ -1281,18 +1281,18 @@ EXPLAIN ...@@ -1281,18 +1281,18 @@ EXPLAIN
"query_block": { "query_block": {
"select_id": 2, "select_id": 2,
"table": { "table": {
"table_name": "A", "table_name": "q",
"access_type": "ALL", "access_type": "ALL",
"rows": 1000, "rows": 1000,
"filtered": 99.219, "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 t2.b, t1.b, t3.a
FROM t1,t2,t3 FROM t1,t2,t3
WHERE t1.a = t2.a WHERE t1.a = t2.a
......
...@@ -387,7 +387,7 @@ ANALYZE TABLE t3 PERSISTENT FOR ALL; ...@@ -387,7 +387,7 @@ ANALYZE TABLE t3 PERSISTENT FOR ALL;
--echo # --echo #
let $query= 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 t2.b, t1.b, t3.a
FROM t1,t2,t3 FROM t1,t2,t3
WHERE t1.a = t2.a WHERE t1.a = t2.a
......
...@@ -2440,7 +2440,7 @@ VARIABLE_COMMENT Fine-tune the optimizer behavior ...@@ -2440,7 +2440,7 @@ VARIABLE_COMMENT Fine-tune the optimizer behavior
NUMERIC_MIN_VALUE NULL NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE 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 READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME OPTIMIZER_TRACE VARIABLE_NAME OPTIMIZER_TRACE
......
...@@ -13759,7 +13759,7 @@ make_join_readinfo(JOIN *join, ulonglong options, uint no_jbuf_after) ...@@ -13759,7 +13759,7 @@ make_join_readinfo(JOIN *join, ulonglong options, uint no_jbuf_after)
sort_nest_info->index_used >= 0) sort_nest_info->index_used >= 0)
{ {
tab->index= sort_nest_info->index_used; tab->index= sort_nest_info->index_used;
tab->limit= tab->records_read; tab->limit= (ha_rows)tab->records_read;
} }
else else
tab->index=find_shortest_key(table, &table->covering_keys); 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, ...@@ -28908,7 +28908,7 @@ test_if_cheaper_ordering(const JOIN_TAB *tab, ORDER *order, TABLE *table,
} /* group */ } /* group */
find_cost_of_index_with_ordering(thd, tab, table, &select_limit, find_cost_of_index_with_ordering(thd, tab, table, &select_limit,
fanout, refkey_rows_estimate, fanout, (double)refkey_rows_estimate,
nr, &index_scan_time, nr, &index_scan_time,
&possible_key); &possible_key);
......
...@@ -1061,7 +1061,7 @@ int get_best_index_for_order_by_limit(JOIN_TAB *tab, ...@@ -1061,7 +1061,7 @@ int get_best_index_for_order_by_limit(JOIN_TAB *tab,
{ {
best_index= idx; best_index= idx;
*read_time= index_scan_time; *read_time= index_scan_time;
*records= select_limit; *records= (double)select_limit;
} }
} }
considered_indexes.end(); considered_indexes.end();
...@@ -1256,7 +1256,7 @@ void JOIN::setup_range_scan(JOIN_TAB *tab, uint idx, double records) ...@@ -1256,7 +1256,7 @@ void JOIN::setup_range_scan(JOIN_TAB *tab, uint idx, double records)
taken selectivity of limit into account. taken selectivity of limit into account.
*/ */
if (sort_nest_possible && records < tab->quick->records) if (sort_nest_possible && records < tab->quick->records)
tab->quick->records= records; tab->quick->records= (ha_rows)records;
sel->quick= NULL; sel->quick= NULL;
...@@ -1537,7 +1537,7 @@ void find_cost_of_index_with_ordering(THD *thd, const JOIN_TAB *tab, ...@@ -1537,7 +1537,7 @@ void find_cost_of_index_with_ordering(THD *thd, const JOIN_TAB *tab,
KEY *keyinfo= table->key_info + nr; KEY *keyinfo= table->key_info + nr;
ha_rows select_limit= *select_limit_arg; ha_rows select_limit= *select_limit_arg;
double rec_per_key; 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 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 L records from the result set we can expect to retrieve
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment