Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
None
Description
SET optimizer_use_condition_selectivity=3; |
SET use_stat_tables=PREFERABLY; |
SET histogram_size=100; |
SET histogram_type='SINGLE_PREC_HB'; |
|
CREATE TABLE t1 (a INT); |
INSERT INTO t1 VALUES (9),(1); |
ANALYZE TABLE t1; |
FLUSH TABLES;
|
|
SELECT * FROM t1 WHERE a > 3; |
#3 <signal handler called>
|
#4 0x00000000006a7448 in Histogram::get_value (this=0x7fa1f8018748, i=50) at /data/bzr/maria-10.0-mwl253/sql/sql_statistics.h:144
|
#5 0x00000000006a750c in Histogram::find_bucket (this=0x7fa1f8018748, pos=0.25, first=true) at /data/bzr/maria-10.0-mwl253/sql/sql_statistics.h:159
|
#6 0x00000000006a787b in Histogram::range_selectivity (this=0x7fa1f8018748, min_pos=0.25, max_pos=1) at /data/bzr/maria-10.0-mwl253/sql/sql_statistics.h:226
|
#7 0x00000000006a715f in get_column_range_cardinality (field=0x7fa1f8104ec8, min_endp=0x7fa202993d90, max_endp=0x0) at /data/bzr/maria-10.0-mwl253/sql/sql_statistics.cc:3412
|
#8 0x00000000008e5414 in records_in_column_ranges (param=0x7fa202993f50, idx=0, tree=0x7fa1f8019c10) at /data/bzr/maria-10.0-mwl253/sql/opt_range.cc:3306
|
#9 0x00000000008e577d in calculate_cond_selectivity_for_table (thd=0x2368800, table=0x7fa1f810c420, cond=0x7fa1f8132710) at /data/bzr/maria-10.0-mwl253/sql/opt_range.cc:3381
|
#10 0x000000000064d8ae in make_join_statistics (join=0x7fa1f8132958, tables_list=..., conds=0x7fa1f8132710, keyuse_array=0x7fa1f8132c60) at /data/bzr/maria-10.0-mwl253/sql/sql_select.cc:3839
|
#11 0x0000000000644c03 in JOIN::optimize_inner (this=0x7fa1f8132958) at /data/bzr/maria-10.0-mwl253/sql/sql_select.cc:1306
|
#12 0x0000000000643bd2 in JOIN::optimize (this=0x7fa1f8132958) at /data/bzr/maria-10.0-mwl253/sql/sql_select.cc:1008
|
#13 0x000000000064b6df in mysql_select (thd=0x2368800, rref_pointer_array=0x236b738, tables=0x7fa1f8131f90, wild_num=1, fields=..., conds=0x7fa1f8132710, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7fa1f8132938, unit=0x236ae00, select_lex=0x236b4d8) at /data/bzr/maria-10.0-mwl253/sql/sql_select.cc:3220
|
#14 0x0000000000642041 in handle_select (thd=0x2368800, lex=0x236ad48, result=0x7fa1f8132938, setup_tables_done_option=0) at /data/bzr/maria-10.0-mwl253/sql/sql_select.cc:376
|
#15 0x000000000061a185 in execute_sqlcom_select (thd=0x2368800, all_tables=0x7fa1f8131f90) at /data/bzr/maria-10.0-mwl253/sql/sql_parse.cc:4797
|
#16 0x000000000061278e in mysql_execute_command (thd=0x2368800) at /data/bzr/maria-10.0-mwl253/sql/sql_parse.cc:2266
|
#17 0x000000000061ca26 in mysql_parse (thd=0x2368800, rawbuf=0x7fa1f8131d98 "SELECT * FROM t1 WHERE a > 3", length=28, parser_state=0x7fa202997500) at /data/bzr/maria-10.0-mwl253/sql/sql_parse.cc:5920
|
#18 0x000000000060fab2 in dispatch_command (command=COM_QUERY, thd=0x2368800, packet=0x236dd01 "SELECT * FROM t1 WHERE a > 3", packet_length=28) at /data/bzr/maria-10.0-mwl253/sql/sql_parse.cc:1091
|
#19 0x000000000060ece0 in do_command (thd=0x2368800) at /data/bzr/maria-10.0-mwl253/sql/sql_parse.cc:810
|
#20 0x00000000007222fe in do_handle_one_connection (thd_arg=0x2368800) at /data/bzr/maria-10.0-mwl253/sql/sql_connect.cc:1266
|
#21 0x0000000000721ce9 in handle_one_connection (arg=0x2368800) at /data/bzr/maria-10.0-mwl253/sql/sql_connect.cc:1181
|
#22 0x0000000000c9d5a8 in pfs_spawn_thread (arg=0x2315230) at /data/bzr/maria-10.0-mwl253/storage/perfschema/pfs.cc:1015
|
#23 0x00007fa20e084e9a in start_thread (arg=0x7fa202998700) at pthread_create.c:308
|
revision-id: igor@askmonty.org-20130404065014-v321xub8xct3udms
|
revno: 3515
|
branch-nick: maria-10.0-mwl253
|
Reproducible with InnoDB, MyISAM, Aria.
histogram_type does not matter.
Attachments
Issue Links
- relates to
-
MDEV-4145 Take into account the selectivity of single-table range predicates on non-indexed columns when searching for the best execution plan
- Closed