| List: | Commits | « Previous MessageNext Message » | |
| From: | Mattias Jonsson | Date: | December 16 2011 9:47pm |
| Subject: | bzr push into mysql-trunk branch (mattias.jonsson:3671 to 3672) WL#4443 | ||
| View as plain text | |||
3672 Mattias Jonsson 2011-12-16
WL#4443 test fixes
main.type_date had bad result, changed
opt_trace.bugs_no_prot_none changed trace due to no
subquery executions during prepare phase.
removed unused variables store_in_query_cache.
modified:
mysql-test/r/type_date.result
mysql-test/suite/opt_trace/r/bugs_no_prot_none.result
mysql-test/t/type_date.test
sql/sql_select.cc
sql/sql_union.cc
3671 Mattias Jonsson 2011-12-16
WL#4443
Revertet non relevant plugin.test changes and ha_example changes
(reported as 13511529).
Moved query cache registration to be as before this patch
Disabled DBUG_ASSERT(inited == INDEX) in ha_index_first since
ha_index_init return value is not always checked.
(11746399, 11746275)
modified:
mysql-test/r/plugin.result
mysql-test/t/plugin.test
sql/handler.cc
sql/sql_select.cc
sql/sql_union.cc
storage/example/ha_example.cc
=== modified file 'mysql-test/r/type_date.result'
--- a/mysql-test/r/type_date.result 2011-11-01 11:52:24 +0000
+++ b/mysql-test/r/type_date.result 2011-12-16 21:46:26 +0000
@@ -305,12 +305,15 @@ DROP VIEW v1;
#
CREATE TABLE t1(a DATE, b YEAR, KEY(a));
INSERT INTO t1 VALUES ('2011-01-01',2011);
+SELECT b = CONVERT(a, DATE) FROM t1;
+b = CONVERT(a, DATE)
+0
SELECT b = (SELECT CONVERT(a, DATE) FROM t1 GROUP BY a) FROM t1;
b = (SELECT CONVERT(a, DATE) FROM t1 GROUP BY a)
-1
+0
SELECT b = CONVERT((SELECT CONVERT(a, DATE) FROM t1 GROUP BY a), DATE) FROM t1;
b = CONVERT((SELECT CONVERT(a, DATE) FROM t1 GROUP BY a), DATE)
-1
+0
DROP TABLE t1;
End of 5.1 tests
#
=== modified file 'mysql-test/suite/opt_trace/r/bugs_no_prot_none.result'
--- a/mysql-test/suite/opt_trace/r/bugs_no_prot_none.result 2011-11-29 08:41:50 +0000
+++ b/mysql-test/suite/opt_trace/r/bugs_no_prot_none.result 2011-12-16 21:46:26 +0000
@@ -1580,232 +1580,6 @@ SELECT 1 FROM t1 WHERE 1 LIKE
} /* join_preparation */
},
{
- "subselect_execution": {
- "select#": 2,
- "steps": [
- {
- "join_optimization": {
- "select#": 2,
- "steps": [
- {
- "condition_processing": {
- "condition": "WHERE",
- "original_condition": "(`test`.`t1`.`a` = 1)",
- "steps": [
- {
- "transformation": "equality_propagation",
- "resulting_condition": "multiple equal(1, `test`.`t1`.`a`)"
- },
- {
- "transformation": "constant_propagation",
- "resulting_condition": "multiple equal(1, `test`.`t1`.`a`)"
- },
- {
- "transformation": "trivial_condition_removal",
- "resulting_condition": "multiple equal(1, `test`.`t1`.`a`)"
- }
- ] /* steps */
- } /* condition_processing */
- },
- {
- "table_dependencies": [
- {
- "database": "test",
- "table": "t1",
- "row_may_be_null": false,
- "map_bit": 0,
- "depends_on_map_bits": [
- ] /* depends_on_map_bits */
- }
- ] /* table_dependencies */
- },
- {
- "ref_optimizer_key_uses": [
- {
- "database": "test",
- "table": "t1",
- "field": "a",
- "equals": "1",
- "null_rejecting": false
- },
- {
- "database": "test",
- "table": "t1",
- "field": "a",
- "equals": "1",
- "null_rejecting": false
- }
- ] /* ref_optimizer_key_uses */
- },
- {
- "rows_estimation": [
- {
- "database": "test",
- "table": "t1",
- "range_analysis": {
- "table_scan": {
- "rows": 1,
- "cost": 3.3
- } /* table_scan */,
- "potential_range_indices": [
- {
- "index": "a",
- "usable": true,
- "key_parts": [
- "a"
- ] /* key_parts */
- },
- {
- "index": "a_2",
- "usable": true,
- "key_parts": [
- "a",
- "c"
- ] /* key_parts */
- }
- ] /* potential_range_indices */,
- "best_covering_index_scan": {
- "index": "a_2",
- "cost": 1.2,
- "chosen": true
- } /* best_covering_index_scan */,
- "setup_range_conditions": [
- ] /* setup_range_conditions */,
- "group_index_range": {
- "chosen": false,
- "cause": "not_group_by_or_distinct"
- } /* group_index_range */,
- "analyzing_range_alternatives": {
- "range_scan_alternatives": [
- {
- "index": "a",
- "ranges": [
- "1 <= a <= 1"
- ] /* ranges */,
- "index_only": false,
- "rows": 1,
- "cost": 2.21,
- "rowid_ordered": true,
- "chosen": false,
- "cause": "cost"
- },
- {
- "index": "a_2",
- "ranges": [
- "1 <= a <= 1"
- ] /* ranges */,
- "index_only": true,
- "rows": 1,
- "cost": 2.21,
- "rowid_ordered": false,
- "chosen": false,
- "cause": "cost"
- }
- ] /* range_scan_alternatives */,
- "analyzing_roworder_intersect": {
- "usable": false,
- "cause": "too_few_roworder_scans"
- } /* analyzing_roworder_intersect */
- } /* analyzing_range_alternatives */
- } /* range_analysis */
- }
- ] /* rows_estimation */
- },
- {
- "considered_execution_plans": [
- {
- "database": "test",
- "table": "t1",
- "best_access_path": {
- "considered_access_paths": [
- {
- "access_type": "ref",
- "index": "a",
- "rows": 1,
- "cost": 1.2,
- "chosen": true
- },
- {
- "access_type": "ref",
- "index": "a_2",
- "rows": 1,
- "cost": 1.2,
- "chosen": false
- },
- {
- "access_type": "scan",
- "cause": "covering_index_better_than_full_scan",
- "chosen": false
- }
- ] /* considered_access_paths */
- } /* best_access_path */,
- "cost_for_plan": 1.2,
- "rows_for_plan": 1,
- "chosen": true
- }
- ] /* considered_execution_plans */
- },
- {
- "attaching_conditions_to_tables": {
- "original_condition": "(`test`.`t1`.`a` = 1)",
- "attached_conditions_computation": [
- ] /* attached_conditions_computation */,
- "attached_conditions_summary": [
- {
- "database": "test",
- "table": "t1",
- "attached": null
- }
- ] /* attached_conditions_summary */
- } /* attaching_conditions_to_tables */
- },
- {
- "clause_processing": {
- "clause": "ORDER BY",
- "original_clause": "`test`.`t1`.`c`",
- "items": [
- {
- "item": "`test`.`t1`.`c`"
- }
- ] /* items */,
- "resulting_clause_is_simple": true,
- "resulting_clause": "`test`.`t1`.`c`"
- } /* clause_processing */
- },
- {
- "refine_plan": [
- {
- "database": "test",
- "table": "t1"
- }
- ] /* refine_plan */
- }
- ] /* steps */
- } /* join_optimization */
- },
- {
- "join_execution": {
- "select#": 2,
- "steps": [
- {
- "reconsidering_access_paths_for_index_ordering": {
- "index_order_summary": {
- "database": "test",
- "table": "t1",
- "index": "a_2",
- "order_direction": "asc",
- "plan_changed": true,
- "access_type": "ref"
- } /* index_order_summary */
- } /* reconsidering_access_paths_for_index_ordering */
- }
- ] /* steps */
- } /* join_execution */
- }
- ] /* steps */
- } /* subselect_execution */
- },
- {
"expanded_query": "/* select#1 */ select 1 AS `1` from `test`.`t1` where (1 like (/* select#2 */ select `test`.`t1`.`a` from `test`.`t1` where (`test`.`t1`.`a` = 1) order by `test`.`t1`.`c`))"
}
] /* steps */
@@ -1839,6 +1613,225 @@ SELECT 1 FROM t1 WHERE 1 LIKE
"subselect_execution": {
"select#": 2,
"steps": [
+ {
+ "join_optimization": {
+ "select#": 2,
+ "steps": [
+ {
+ "condition_processing": {
+ "condition": "WHERE",
+ "original_condition": "(`test`.`t1`.`a` = 1)",
+ "steps": [
+ {
+ "transformation": "equality_propagation",
+ "resulting_condition": "multiple equal(1, `test`.`t1`.`a`)"
+ },
+ {
+ "transformation": "constant_propagation",
+ "resulting_condition": "multiple equal(1, `test`.`t1`.`a`)"
+ },
+ {
+ "transformation": "trivial_condition_removal",
+ "resulting_condition": "multiple equal(1, `test`.`t1`.`a`)"
+ }
+ ] /* steps */
+ } /* condition_processing */
+ },
+ {
+ "table_dependencies": [
+ {
+ "database": "test",
+ "table": "t1",
+ "row_may_be_null": false,
+ "map_bit": 0,
+ "depends_on_map_bits": [
+ ] /* depends_on_map_bits */
+ }
+ ] /* table_dependencies */
+ },
+ {
+ "ref_optimizer_key_uses": [
+ {
+ "database": "test",
+ "table": "t1",
+ "field": "a",
+ "equals": "1",
+ "null_rejecting": false
+ },
+ {
+ "database": "test",
+ "table": "t1",
+ "field": "a",
+ "equals": "1",
+ "null_rejecting": false
+ }
+ ] /* ref_optimizer_key_uses */
+ },
+ {
+ "rows_estimation": [
+ {
+ "database": "test",
+ "table": "t1",
+ "range_analysis": {
+ "table_scan": {
+ "rows": 1,
+ "cost": 3.3
+ } /* table_scan */,
+ "potential_range_indices": [
+ {
+ "index": "a",
+ "usable": true,
+ "key_parts": [
+ "a"
+ ] /* key_parts */
+ },
+ {
+ "index": "a_2",
+ "usable": true,
+ "key_parts": [
+ "a",
+ "c"
+ ] /* key_parts */
+ }
+ ] /* potential_range_indices */,
+ "best_covering_index_scan": {
+ "index": "a_2",
+ "cost": 1.2,
+ "chosen": true
+ } /* best_covering_index_scan */,
+ "setup_range_conditions": [
+ ] /* setup_range_conditions */,
+ "group_index_range": {
+ "chosen": false,
+ "cause": "not_group_by_or_distinct"
+ } /* group_index_range */,
+ "analyzing_range_alternatives": {
+ "range_scan_alternatives": [
+ {
+ "index": "a",
+ "ranges": [
+ "1 <= a <= 1"
+ ] /* ranges */,
+ "index_only": false,
+ "rows": 1,
+ "cost": 2.21,
+ "rowid_ordered": true,
+ "chosen": false,
+ "cause": "cost"
+ },
+ {
+ "index": "a_2",
+ "ranges": [
+ "1 <= a <= 1"
+ ] /* ranges */,
+ "index_only": true,
+ "rows": 1,
+ "cost": 2.21,
+ "rowid_ordered": false,
+ "chosen": false,
+ "cause": "cost"
+ }
+ ] /* range_scan_alternatives */,
+ "analyzing_roworder_intersect": {
+ "usable": false,
+ "cause": "too_few_roworder_scans"
+ } /* analyzing_roworder_intersect */
+ } /* analyzing_range_alternatives */
+ } /* range_analysis */
+ }
+ ] /* rows_estimation */
+ },
+ {
+ "considered_execution_plans": [
+ {
+ "database": "test",
+ "table": "t1",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "ref",
+ "index": "a",
+ "rows": 1,
+ "cost": 1.2,
+ "chosen": true
+ },
+ {
+ "access_type": "ref",
+ "index": "a_2",
+ "rows": 1,
+ "cost": 1.2,
+ "chosen": false
+ },
+ {
+ "access_type": "scan",
+ "cause": "covering_index_better_than_full_scan",
+ "chosen": false
+ }
+ ] /* considered_access_paths */
+ } /* best_access_path */,
+ "cost_for_plan": 1.2,
+ "rows_for_plan": 1,
+ "chosen": true
+ }
+ ] /* considered_execution_plans */
+ },
+ {
+ "attaching_conditions_to_tables": {
+ "original_condition": "(`test`.`t1`.`a` = 1)",
+ "attached_conditions_computation": [
+ ] /* attached_conditions_computation */,
+ "attached_conditions_summary": [
+ {
+ "database": "test",
+ "table": "t1",
+ "attached": null
+ }
+ ] /* attached_conditions_summary */
+ } /* attaching_conditions_to_tables */
+ },
+ {
+ "clause_processing": {
+ "clause": "ORDER BY",
+ "original_clause": "`test`.`t1`.`c`",
+ "items": [
+ {
+ "item": "`test`.`t1`.`c`"
+ }
+ ] /* items */,
+ "resulting_clause_is_simple": true,
+ "resulting_clause": "`test`.`t1`.`c`"
+ } /* clause_processing */
+ },
+ {
+ "refine_plan": [
+ {
+ "database": "test",
+ "table": "t1"
+ }
+ ] /* refine_plan */
+ }
+ ] /* steps */
+ } /* join_optimization */
+ },
+ {
+ "join_execution": {
+ "select#": 2,
+ "steps": [
+ {
+ "reconsidering_access_paths_for_index_ordering": {
+ "index_order_summary": {
+ "database": "test",
+ "table": "t1",
+ "index": "a_2",
+ "order_direction": "asc",
+ "plan_changed": true,
+ "access_type": "ref"
+ } /* index_order_summary */
+ } /* reconsidering_access_paths_for_index_ordering */
+ }
+ ] /* steps */
+ } /* join_execution */
+ }
] /* steps */
} /* subselect_execution */
}
=== modified file 'mysql-test/t/type_date.test'
--- a/mysql-test/t/type_date.test 2011-11-01 11:52:24 +0000
+++ b/mysql-test/t/type_date.test 2011-12-16 21:46:26 +0000
@@ -273,6 +273,7 @@ DROP VIEW v1;
CREATE TABLE t1(a DATE, b YEAR, KEY(a));
INSERT INTO t1 VALUES ('2011-01-01',2011);
+SELECT b = CONVERT(a, DATE) FROM t1;
SELECT b = (SELECT CONVERT(a, DATE) FROM t1 GROUP BY a) FROM t1;
SELECT b = CONVERT((SELECT CONVERT(a, DATE) FROM t1 GROUP BY a), DATE) FROM t1;
=== modified file 'sql/sql_select.cc'
--- a/sql/sql_select.cc 2011-12-16 20:28:07 +0000
+++ b/sql/sql_select.cc 2011-12-16 21:46:26 +0000
@@ -1183,7 +1183,6 @@ mysql_select(THD *thd,
SELECT_LEX *select_lex)
{
bool free_join= 1;
- bool store_in_query_cache= false;
uint og_num= 0;
ORDER *first_order= NULL;
ORDER *first_group= NULL;
=== modified file 'sql/sql_union.cc'
--- a/sql/sql_union.cc 2011-12-16 20:28:07 +0000
+++ b/sql/sql_union.cc 2011-12-16 21:46:26 +0000
@@ -33,7 +33,6 @@ bool mysql_union(THD *thd, LEX *lex, sel
SELECT_LEX_UNIT *unit, ulong setup_tables_done_option)
{
bool res;
- bool store_in_query_cache= false;
DBUG_ENTER("mysql_union");
if (open_query_tables(thd))
No bundle (reason: useless for push emails).
| Thread | ||
|---|---|---|
| • bzr push into mysql-trunk branch (mattias.jonsson:3671 to 3672) WL#4443 | Mattias Jonsson | 16 Dec |
