mariadb/sql
Igor Babaev 6dd9f049ab Fixed bug mdev-4894.
This a an old legacy performance bug.
When a very selective range scan existed for the second table in a join,
and, at the same time, there was another range condition depending on the
fields of the first table, the optimizer chose a plan with
'Range checked for each record'. This plan was extremely inefficient in
comparison with the regular selective range scan.
As a matter of fact the range scan chosen for each record was the same as
that selective range scan. 

Changed the test case for bug 24776 to preserve the old output for explain.
2013-08-13 15:21:11 -07:00
..
examples Updated/added copyright headers 2011-06-30 17:31:31 +02:00
share Merge MySQL 5.1.66 -> MariaDB 5.1.65 2012-11-06 11:52:55 +02:00
.cvsignore Applying patch for Bug#67177 Bug#15967374 from Kent 2013-01-08 13:29:11 +01:00
add_errmsg
authors.h Initail merge with MySQL 5.1 (XtraDB still needs to be merged) 2011-11-21 19:13:14 +02:00
client_settings.h Updated/added copyright headers 2011-06-30 17:37:13 +02:00
CMakeLists.txt mysql-5.1.62 merge 2012-04-05 10:49:38 +02:00
contributors.h
custom_conf.h
debug_sync.cc Initail merge with MySQL 5.1 (XtraDB still needs to be merged) 2011-11-21 19:13:14 +02:00
debug_sync.h Initail merge with MySQL 5.1 (XtraDB still needs to be merged) 2011-11-21 19:13:14 +02:00
derror.cc Initail merge with MySQL 5.1 (XtraDB still needs to be merged) 2011-11-21 19:13:14 +02:00
des_key_file.cc
discover.cc
event_data_objects.cc Initail merge with MySQL 5.1 (XtraDB still needs to be merged) 2011-11-21 19:13:14 +02:00
event_data_objects.h
event_db_repository.cc Initail merge with MySQL 5.1 (XtraDB still needs to be merged) 2011-11-21 19:13:14 +02:00
event_db_repository.h Initail merge with MySQL 5.1 (XtraDB still needs to be merged) 2011-11-21 19:13:14 +02:00
event_parse_data.cc Initail merge with MySQL 5.1 (XtraDB still needs to be merged) 2011-11-21 19:13:14 +02:00
event_parse_data.h Initail merge with MySQL 5.1 (XtraDB still needs to be merged) 2011-11-21 19:13:14 +02:00
event_queue.cc
event_queue.h
event_scheduler.cc merge with MySQL 5.1.65 2012-08-22 11:40:39 +02:00
event_scheduler.h
events.cc Initail merge with MySQL 5.1 (XtraDB still needs to be merged) 2011-11-21 19:13:14 +02:00
events.h
field.cc mysql-5.1 merge 2013-02-28 09:58:39 +01:00
field.h Merge with MySQL 5.1.60 2011-11-23 19:32:14 +02:00
field_conv.cc mysql-5.1.62 merge 2012-04-05 10:49:38 +02:00
filesort.cc Merge MySQL 5.1.66 -> MariaDB 5.1.65 2012-11-06 11:52:55 +02:00
frm_crypt.cc
gen_lex_hash.cc Merge MySQL 5.1.66 -> MariaDB 5.1.65 2012-11-06 11:52:55 +02:00
gstream.cc Updated/added copyright headers 2011-06-30 17:37:13 +02:00
gstream.h
ha_ndbcluster.cc Initail merge with MySQL 5.1 (XtraDB still needs to be merged) 2011-11-21 19:13:14 +02:00
ha_ndbcluster.h restore the unintentinally broken ABI 2010-07-23 22:37:21 +02:00
ha_ndbcluster_binlog.cc mysql-5.1.67 merge 2013-01-09 23:51:51 +01:00
ha_ndbcluster_binlog.h
ha_ndbcluster_cond.cc
ha_ndbcluster_cond.h
ha_ndbcluster_tables.h
ha_partition.cc mysql-5.1 merge 2013-02-28 09:58:39 +01:00
ha_partition.h Merge MySQL 5.1.66 -> MariaDB 5.1.65 2012-11-06 11:52:55 +02:00
handler.cc Merge MySQL 5.1.66 -> MariaDB 5.1.65 2012-11-06 11:52:55 +02:00
handler.h Fixed lp:944422 "mysql_upgrade destroys Maria tables?" 2012-03-28 13:22:21 +03:00
hash_filo.cc Fix a bunch of Windows warnings 2010-04-21 02:25:59 +02:00
hash_filo.h
hostname.cc mysql-5.1.67 merge 2013-01-09 23:51:51 +01:00
init.cc
item.cc Merge with latest 5.1. 2012-08-24 10:34:55 +02:00
item.h MDEV-382: Incorrect quoting 2012-08-24 10:06:16 +02:00
item_buff.cc Initail merge with MySQL 5.1 (XtraDB still needs to be merged) 2011-11-21 19:13:14 +02:00
item_cmpfunc.cc mysql-5.1.67 merge 2013-01-09 23:51:51 +01:00
item_cmpfunc.h merge with mysql-5.1.63 2012-05-17 12:12:33 +02:00
item_create.cc MDEV-4289 Assertion `0' fails in make_sortkey with GROUP_CONCAT, MAKE_SET, GROUP BY 2013-03-18 10:35:03 +01:00
item_create.h Initail merge with MySQL 5.1 (XtraDB still needs to be merged) 2011-11-21 19:13:14 +02:00
item_func.cc a simpler fix for 2013-02-28 11:46:35 +01:00
item_func.h mysql-5.1.67 merge 2013-01-09 23:51:51 +01:00
item_geofunc.cc Updated/added copyright headers 2011-06-30 17:37:13 +02:00
item_geofunc.h Merge with MySQL 5.1.55 2011-02-20 18:51:43 +02:00
item_row.cc Initail merge with MySQL 5.1 (XtraDB still needs to be merged) 2011-11-21 19:13:14 +02:00
item_row.h Initail merge with MySQL 5.1 (XtraDB still needs to be merged) 2011-11-21 19:13:14 +02:00
item_strfunc.cc MDEV-4289 Assertion `0' fails in make_sortkey with GROUP_CONCAT, MAKE_SET, GROUP BY 2013-03-18 10:35:03 +01:00
item_strfunc.h MDEV-4289 Assertion `0' fails in make_sortkey with GROUP_CONCAT, MAKE_SET, GROUP BY 2013-03-18 10:35:03 +01:00
item_subselect.cc Merge MySQL 5.1.66 -> MariaDB 5.1.65 2012-11-06 11:52:55 +02:00
item_subselect.h mysql-5.1.62 merge 2012-04-05 10:49:38 +02:00
item_sum.cc Fixed bug mdev-4063 (bug #56927). 2013-01-21 11:47:45 -08:00
item_sum.h Initail merge with MySQL 5.1 (XtraDB still needs to be merged) 2011-11-21 19:13:14 +02:00
item_timefunc.cc mysql-5.1.62 merge 2012-04-05 10:49:38 +02:00
item_timefunc.h Initail merge with MySQL 5.1 (XtraDB still needs to be merged) 2011-11-21 19:13:14 +02:00
item_xmlfunc.cc mysql-5.1 merge 2013-02-28 09:58:39 +01:00
item_xmlfunc.h
key.cc Updated/added copyright headers 2011-06-30 17:37:13 +02:00
lex.h Initail merge with MySQL 5.1 (XtraDB still needs to be merged) 2011-11-21 19:13:14 +02:00
lex_symbol.h
lock.cc Initail merge with MySQL 5.1 (XtraDB still needs to be merged) 2011-11-21 19:13:14 +02:00
log.cc mysql-5.1.67 merge 2013-01-09 23:51:51 +01:00
log.h MDEV-3861: assertions in TC_LOG_MMAP. 2012-11-20 13:28:53 +01:00
log_event.cc mysql-5.1 merge 2013-02-28 09:58:39 +01:00
log_event.h mysql-5.1 merge 2013-02-28 09:58:39 +01:00
log_event_old.cc MDEV-382: Incorrect quoting 2012-08-24 10:06:16 +02:00
log_event_old.h MDEV-382: Incorrect quoting 2012-08-24 10:06:16 +02:00
log_slow.h
Makefile.am mysql-5.1 merge 2013-02-28 09:58:39 +01:00
mem_root_array.h Backport 5.5=>5.1 Patch for Bug#13805127: 2012-04-18 13:14:05 +02:00
message.h Initail merge with MySQL 5.1 (XtraDB still needs to be merged) 2011-11-21 19:13:14 +02:00
message.mc
message.rc
mf_iocache.cc Fix a bunch of Windows warnings 2010-04-21 02:25:59 +02:00
MSG00001.bin
my_decimal.cc Initail merge with MySQL 5.1 (XtraDB still needs to be merged) 2011-11-21 19:13:14 +02:00
my_decimal.h mysql-5.1.62 merge 2012-04-05 10:49:38 +02:00
my_lock.c
mysql_priv.h mysql-5.1 merge 2013-02-28 09:58:39 +01:00
mysqld.cc mysql-5.1 merge 2013-02-28 09:58:39 +01:00
mysqld_suffix.h
net_serv.cc Updated/added copyright headers 2011-06-30 17:31:31 +02:00
nt_servc.cc
nt_servc.h
opt_range.cc MDEV-4244 [PATCH] Buffer overruns and use-after-free errors 2013-04-06 21:29:12 +02:00
opt_range.h Initail merge with MySQL 5.1 (XtraDB still needs to be merged) 2011-11-21 19:13:14 +02:00
opt_sum.cc Initail merge with MySQL 5.1 (XtraDB still needs to be merged) 2011-11-21 19:13:14 +02:00
opt_table_elimination.cc
parse_file.cc Initail merge with MySQL 5.1 (XtraDB still needs to be merged) 2011-11-21 19:13:14 +02:00
parse_file.h Updated/added copyright headers 2011-06-30 17:37:13 +02:00
partition_element.h Merge with main 2011-02-22 20:28:01 +02:00
partition_info.cc Initail merge with MySQL 5.1 (XtraDB still needs to be merged) 2011-11-21 19:13:14 +02:00
partition_info.h Updated/added copyright headers 2011-06-30 17:37:13 +02:00
password.c Bug #13934049: 64884: LOGINS WITH INCORRECT PASSWORD ARE ALLOWED 2012-04-06 12:04:07 +03:00
procedure.cc
procedure.h
protocol.cc merge with MySQL 5.1.65 2012-08-22 11:40:39 +02:00
protocol.h Initail merge with MySQL 5.1 (XtraDB still needs to be merged) 2011-11-21 19:13:14 +02:00
records.cc Bug#14051002 VALGRIND: CONDITIONAL JUMP OR MOVE IN RR_CMP / MY_QSORT 2012-06-05 15:53:39 +02:00
repl_failsafe.cc Initail merge with MySQL 5.1 (XtraDB still needs to be merged) 2011-11-21 19:13:14 +02:00
repl_failsafe.h
rpl_constants.h Updated/added copyright headers 2011-06-30 17:37:13 +02:00
rpl_filter.cc Initail merge with MySQL 5.1 (XtraDB still needs to be merged) 2011-11-21 19:13:14 +02:00
rpl_filter.h
rpl_injector.cc Initail merge with MySQL 5.1 (XtraDB still needs to be merged) 2011-11-21 19:13:14 +02:00
rpl_injector.h
rpl_mi.cc Initail merge with MySQL 5.1 (XtraDB still needs to be merged) 2011-11-21 19:13:14 +02:00
rpl_mi.h Initail merge with MySQL 5.1 (XtraDB still needs to be merged) 2011-11-21 19:13:14 +02:00
rpl_record.cc Initail merge with MySQL 5.1 (XtraDB still needs to be merged) 2011-11-21 19:13:14 +02:00
rpl_record.h Initail merge with MySQL 5.1 (XtraDB still needs to be merged) 2011-11-21 19:13:14 +02:00
rpl_record_old.cc Updated/added copyright headers 2011-06-30 17:37:13 +02:00
rpl_record_old.h Merge with MySQL 5.1.55 2011-02-20 18:51:43 +02:00
rpl_reporting.cc Updated/added copyright headers 2011-06-30 17:37:13 +02:00
rpl_reporting.h Updated/added copyright headers 2011-06-30 17:37:13 +02:00
rpl_rli.cc merge with MySQL 5.1.65 2012-08-22 11:40:39 +02:00
rpl_rli.h merge with MySQL 5.1.65 2012-08-22 11:40:39 +02:00
rpl_tblmap.cc Updated/added copyright headers 2011-06-30 17:37:13 +02:00
rpl_tblmap.h
rpl_utility.cc merge with MySQL 5.1.65 2012-08-22 11:40:39 +02:00
rpl_utility.h merge with MySQL 5.1.65 2012-08-22 11:40:39 +02:00
scheduler.cc
scheduler.h
set_var.cc bug#11761752: DO NOT ALLOW USE OF ALTERNATE DATA STREAMS ON NTFS FILESYSTEM. 2012-12-13 20:33:44 +05:30
set_var.h Updated/added copyright headers 2011-06-30 17:31:31 +02:00
signal_handler.cc merge with mysql-5.1.63 2012-05-17 12:12:33 +02:00
slave.cc MDEV-4088 Replication 10.0 -> 5.5 fails 2013-04-04 11:35:10 +02:00
slave.h Initail merge with MySQL 5.1 (XtraDB still needs to be merged) 2011-11-21 19:13:14 +02:00
sp.cc Initail merge with MySQL 5.1 (XtraDB still needs to be merged) 2011-11-21 19:13:14 +02:00
sp.h Updated/added copyright headers 2011-06-30 17:37:13 +02:00
sp_cache.cc Initail merge with MySQL 5.1 (XtraDB still needs to be merged) 2011-11-21 19:13:14 +02:00
sp_cache.h
sp_head.cc mysql-5.1.67 merge 2013-01-09 23:51:51 +01:00
sp_head.h mysql-5.1.62 merge 2012-04-05 10:49:38 +02:00
sp_pcontext.cc Updated/added copyright headers 2011-06-30 17:37:13 +02:00
sp_pcontext.h Updated/added copyright headers 2011-06-30 17:37:13 +02:00
sp_rcontext.cc Initail merge with MySQL 5.1 (XtraDB still needs to be merged) 2011-11-21 19:13:14 +02:00
sp_rcontext.h Bug fix for lp:732124 union + limit returns wrong result 2011-03-09 19:45:48 +02:00
spatial.cc MDEV-4478 check mysql-5.5 changes in spatial.cc. 2013-07-22 00:55:06 +05:00
spatial.h MDEV-4478 check mysql-5.5 changes in spatial.cc. 2013-07-22 00:55:06 +05:00
sql_acl.cc mysql-5.1.67 merge 2013-01-09 23:51:51 +01:00
sql_acl.h Updated/added copyright headers 2011-06-30 17:37:13 +02:00
sql_analyse.cc Initail merge with MySQL 5.1 (XtraDB still needs to be merged) 2011-11-21 19:13:14 +02:00
sql_analyse.h
sql_array.h
sql_base.cc mysql-5.1 merge 2013-02-28 09:58:39 +01:00
sql_binlog.cc Initail merge with MySQL 5.1 (XtraDB still needs to be merged) 2011-11-21 19:13:14 +02:00
sql_bitmap.h
sql_builtin.cc.in
sql_cache.cc mysql-5.1 merge 2013-02-28 09:58:39 +01:00
sql_cache.h Updated/added copyright headers 2011-06-30 17:37:13 +02:00
sql_class.cc a simpler fix for 2013-02-28 11:46:35 +01:00
sql_class.h Fixed bug mdev-4063 (bug #56927). 2013-01-21 11:47:45 -08:00
sql_client.cc
sql_connect.cc mysql-5.1.67 merge 2013-01-09 23:51:51 +01:00
sql_crypt.cc Initail merge with MySQL 5.1 (XtraDB still needs to be merged) 2011-11-21 19:13:14 +02:00
sql_crypt.h Initail merge with MySQL 5.1 (XtraDB still needs to be merged) 2011-11-21 19:13:14 +02:00
sql_cursor.cc Initail merge with MySQL 5.1 (XtraDB still needs to be merged) 2011-11-21 19:13:14 +02:00
sql_cursor.h
sql_db.cc mysql-5.1.67 merge 2013-01-09 23:51:51 +01:00
sql_delete.cc Initail merge with MySQL 5.1 (XtraDB still needs to be merged) 2011-11-21 19:13:14 +02:00
sql_derived.cc Fixed valgrind problem: reference on deleted memory of temporary table name. 2011-12-11 22:58:01 +02:00
sql_do.cc
sql_error.cc Initail merge with MySQL 5.1 (XtraDB still needs to be merged) 2011-11-21 19:13:14 +02:00
sql_error.h
sql_handler.cc Initail merge with MySQL 5.1 (XtraDB still needs to be merged) 2011-11-21 19:13:14 +02:00
sql_help.cc Initail merge with MySQL 5.1 (XtraDB still needs to be merged) 2011-11-21 19:13:14 +02:00
sql_insert.cc mysql-5.1.67 merge 2013-01-09 23:51:51 +01:00
sql_lex.cc mysql-5.1.67 merge 2013-01-09 23:51:51 +01:00
sql_lex.h mysql-5.1 merge 2013-02-28 09:58:39 +01:00
sql_list.cc
sql_list.h mysql-5.1.67 merge 2013-01-09 23:51:51 +01:00
sql_load.cc BUG#14548159: NUMEROUS CASES OF INCORRECT IDENTIFIER 2012-09-22 17:50:51 +05:30
sql_locale.cc Updated/added copyright headers 2011-06-30 17:37:13 +02:00
sql_manager.cc Updated/added copyright headers 2011-06-30 17:37:13 +02:00
sql_map.cc
sql_map.h
sql_olap.cc Initail merge with MySQL 5.1 (XtraDB still needs to be merged) 2011-11-21 19:13:14 +02:00
sql_parse.cc merge with MySQL 5.1.65 2012-08-22 11:40:39 +02:00
sql_partition.cc Initail merge with MySQL 5.1 (XtraDB still needs to be merged) 2011-11-21 19:13:14 +02:00
sql_partition.h Initail merge with MySQL 5.1 (XtraDB still needs to be merged) 2011-11-21 19:13:14 +02:00
sql_plugin.cc Initail merge with MySQL 5.1 (XtraDB still needs to be merged) 2011-11-21 19:13:14 +02:00
sql_plugin.h Initail merge with MySQL 5.1 (XtraDB still needs to be merged) 2011-11-21 19:13:14 +02:00
sql_prepare.cc MDEV-4326 fix. 2013-04-09 09:58:51 +03:00
sql_profile.cc mysql-5.1.67 merge 2013-01-09 23:51:51 +01:00
sql_profile.h mysql-5.1.67 merge 2013-01-09 23:51:51 +01:00
sql_rename.cc Initail merge with MySQL 5.1 (XtraDB still needs to be merged) 2011-11-21 19:13:14 +02:00
sql_repl.cc mysql-5.1 merge 2013-02-28 09:58:39 +01:00
sql_repl.h
sql_select.cc Fixed bug mdev-4894. 2013-08-13 15:21:11 -07:00
sql_select.h Initail merge with MySQL 5.1 (XtraDB still needs to be merged) 2011-11-21 19:13:14 +02:00
sql_servers.cc Updated/added copyright headers 2011-06-30 17:37:13 +02:00
sql_servers.h
sql_show.cc Bug #69682 - mysqld crashes after uninstall of plugin with "first" status var 2013-07-06 15:28:11 +02:00
sql_show.h BUG#14548159: NUMEROUS CASES OF INCORRECT IDENTIFIER 2012-09-22 17:50:51 +05:30
sql_sort.h
sql_state.c
sql_string.cc MDEV-382: Incorrect quoting 2012-08-24 10:06:16 +02:00
sql_string.h Merge MySQL 5.1.66 -> MariaDB 5.1.65 2012-11-06 11:52:55 +02:00
sql_table.cc mysql-5.1 merge 2013-02-28 09:58:39 +01:00
sql_tablespace.cc Initail merge with MySQL 5.1 (XtraDB still needs to be merged) 2011-11-21 19:13:14 +02:00
sql_test.cc Updated/added copyright headers 2011-06-30 17:37:13 +02:00
sql_trigger.cc mysql-5.1 merge 2013-02-28 09:58:39 +01:00
sql_trigger.h Initail merge with MySQL 5.1 (XtraDB still needs to be merged) 2011-11-21 19:13:14 +02:00
sql_udf.cc Initail merge with MySQL 5.1 (XtraDB still needs to be merged) 2011-11-21 19:13:14 +02:00
sql_udf.h
sql_union.cc Merge with MySQL 5.1.60 2011-11-23 19:32:14 +02:00
sql_update.cc Updated/added copyright headers 2011-06-30 17:31:31 +02:00
sql_view.cc Updated/added copyright headers 2012-02-15 17:13:47 +01:00
sql_view.h Updated/added copyright headers 2011-06-30 17:37:13 +02:00
sql_yacc.yy merge with MySQL 5.1.65 2012-08-22 11:40:39 +02:00
strfunc.cc Initail merge with MySQL 5.1 (XtraDB still needs to be merged) 2011-11-21 19:13:14 +02:00
structs.h Updated/added copyright headers 2011-06-30 17:37:13 +02:00
table.cc merge with mysql-5.1.63 2012-05-17 12:12:33 +02:00
table.h mysql-5.1.62 merge 2012-04-05 10:49:38 +02:00
thr_malloc.cc Initail merge with MySQL 5.1 (XtraDB still needs to be merged) 2011-11-21 19:13:14 +02:00
time.cc Initail merge with MySQL 5.1 (XtraDB still needs to be merged) 2011-11-21 19:13:14 +02:00
tzfile.h
tztime.cc mysql-5.1 merge 2013-02-28 09:58:39 +01:00
tztime.h Updated/added copyright headers 2011-06-30 17:37:13 +02:00
udf_example.c Initail merge with MySQL 5.1 (XtraDB still needs to be merged) 2011-11-21 19:13:14 +02:00
udf_example.def
uniques.cc Fixed bug mdev-4063 (bug #56927). 2013-01-21 11:47:45 -08:00
unireg.cc Initail merge with MySQL 5.1 (XtraDB still needs to be merged) 2011-11-21 19:13:14 +02:00
unireg.h mysql-5.1.62 merge 2012-04-05 10:49:38 +02:00