mariadb/sql
unknown 5f97dc6e9e BUG#24127: (a,b) IN (SELECT c,d ...) can produce wrong results if a and/or b are NULLs:
- Make the code produce correct result: use an array of triggers to turn on/off equalities for each
  compared column. Also turn on/off optimizations based on those equalities.
- Make EXPLAIN output show "Full scan on NULL key" for tables for which we switch between
  ref/unique_subquery/index_subquery and ALL access.
- index_subquery engine now has HAVING clause when it is needed, and it is
  displayed in EXPLAIN EXTENDED
- Fix incorrect presense of "Using index" for index/unique-based subqueries (BUG#22930)
// bk trigger note: this commit refers to BUG#24127


mysql-test/r/ndb_subquery.result:
  BUG#24127: wrong result for (null,not-null) IN (SELECT a,b ...)
  - Updated test results (checked)
mysql-test/r/subselect.result:
  BUG#24127: wrong result for (null,not-null) IN (SELECT a,b ...)
  - Updated test results (checked)
mysql-test/r/subselect2.result:
  BUG#24127: wrong result for (null,not-null) IN (SELECT a,b ...)
  - Updated test results (checked)
mysql-test/r/subselect3.result:
  BUG#24127: wrong result for (null,not-null) IN (SELECT a,b ...)
  - Testcases
mysql-test/t/subselect3.test:
  BUG#24127: wrong result for (null,not-null) IN (SELECT a,b ...)
  - Testcases
sql/item_cmpfunc.cc:
  BUG#24127: wrong result for (null,not-null) IN (SELECT a,b ...)
  - For row-based IN subqueries, use one flag per each column. Set the flags appropriately before
    running the subquery.
sql/item_cmpfunc.h:
  BUG#24127: wrong result for (null,not-null) IN (SELECT a,b ...)
   - Added Item_func_trig_cond::get_triv_var()
sql/item_subselect.cc:
  BUG#24127: wrong result for (null,not-null) IN (SELECT a,b ...)
  - Item_subselect::exec() and subselect_*_engine::exec() don't have parameter
    anymore - now Item_subselect owns the pushed down predicates guard flags.
  - A correct set of conditional predicates is now pushed into row-based IN 
    subquery.
  - select_indexsubquery_engine now has "HAVING clause" (needed for correct query
    results), and it is shown in EXPLAIN EXTENDED
sql/item_subselect.h:
  BUG#24127: wrong result for (null,not-null) IN (SELECT a,b ...)
  - Item_subselect::exec() and subselect_*_engine::exec() don't have parameter
    anymore - now Item_subselect owns the pushed down predicates guard flags.
  - A correct set of conditional predicates is now pushed into row-based IN 
    subquery.
  - select_indexsubquery_engine now has "HAVING clause" (needed for correct query
    results), and it is shown in EXPLAIN EXTENDED
sql/mysql_priv.h:
  BUG#24127: wrong result for (null,not-null) IN (SELECT a,b ...)
  - Added "in_having_cond" special Item name
sql/mysqld.cc:
  BUG#24127: wrong result for (null,not-null) IN (SELECT a,b ...)
  - Added "in_having_cond" special Item name
sql/sql_lex.h:
  BUG#24127: wrong result for (null,not-null) IN (SELECT a,b ...)
sql/sql_select.cc:
  BUG#24127: wrong result for (null,not-null) IN (SELECT a,b ...)
  - Make "ref" analyzer be able to work with conditional equalities
  - Fix subquery optimization code to match the changes in what kinds of 
    conditions are pushed down into subqueries 
  - Fix wrong EXPLAIN output in some queries with subquery (BUG#22390)
sql/sql_select.h:
  BUG#24127: wrong result for (null,not-null) IN (SELECT a,b ...)
  - Make "ref" analyzer be able to work with conditional equalities
  - Fix wrong EXPLAIN output in some queries with subquery (BUG#22390)
2007-01-12 23:22:41 +03:00
..
examples my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
share Merge mysql.com:/d2/hf/clean/my50-clean 2006-12-31 12:39:20 +04:00
.cvsignore
add_errmsg
client_settings.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
CMakeLists.txt my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
custom_conf.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
derror.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
des_key_file.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
discover.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
field.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
field.h Bug#14171: Wrong internal default value for a BINARY field. 2007-01-09 22:35:30 +03:00
field_conv.cc Many files: 2006-12-23 20:17:15 +01:00
filesort.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
frm_crypt.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
gen_lex_hash.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
gstream.cc Many files: 2006-12-23 20:17:15 +01:00
gstream.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
ha_archive.cc Many files: 2006-12-23 20:17:15 +01:00
ha_archive.h Many files: 2006-12-23 20:17:15 +01:00
ha_berkeley.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
ha_berkeley.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
ha_blackhole.cc Many files: 2006-12-23 20:17:15 +01:00
ha_blackhole.h Many files: 2006-12-23 20:17:15 +01:00
ha_federated.cc Merge xiphis.org:/home/antony/work2/mysql-5.0-engines 2006-12-26 16:23:05 -08:00
ha_federated.h Many files: 2006-12-23 20:17:15 +01:00
ha_heap.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
ha_heap.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
ha_innodb.cc Many files: 2006-12-23 20:17:15 +01:00
ha_innodb.h Many files: 2006-12-23 20:17:15 +01:00
ha_myisam.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
ha_myisam.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
ha_myisammrg.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
ha_myisammrg.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
ha_ndbcluster.cc Many files: 2006-12-23 20:17:15 +01:00
ha_ndbcluster.h Many files: 2006-12-23 20:17:15 +01:00
handler.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
handler.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
hash_filo.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
hash_filo.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
hostname.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
init.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
item.cc Merge olga.mysql.com:/home/igor/mysql-4.1-opt 2007-01-10 08:55:55 -08:00
item.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
item_buff.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
item_cmpfunc.cc BUG#24127: (a,b) IN (SELECT c,d ...) can produce wrong results if a and/or b are NULLs: 2007-01-12 23:22:41 +03:00
item_cmpfunc.h BUG#24127: (a,b) IN (SELECT c,d ...) can produce wrong results if a and/or b are NULLs: 2007-01-12 23:22:41 +03:00
item_create.cc Many files: 2006-12-23 20:17:15 +01:00
item_create.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
item_func.cc Fixed bug#16861: User defined variable can have a wrong value if a tmp table was 2007-01-09 23:24:56 +03:00
item_func.h Fixed bug#16861: User defined variable can have a wrong value if a tmp table was 2007-01-09 23:24:56 +03:00
item_geofunc.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
item_geofunc.h Many files: 2006-12-23 20:17:15 +01:00
item_row.cc Many files: 2006-12-23 20:17:15 +01:00
item_row.h Many files: 2006-12-23 20:17:15 +01:00
item_strfunc.cc Merge mysql.com:/d2/hf/clean/my50-clean 2006-12-31 12:39:20 +04:00
item_strfunc.h Many files: 2006-12-23 20:17:15 +01:00
item_subselect.cc BUG#24127: (a,b) IN (SELECT c,d ...) can produce wrong results if a and/or b are NULLs: 2007-01-12 23:22:41 +03:00
item_subselect.h BUG#24127: (a,b) IN (SELECT c,d ...) can produce wrong results if a and/or b are NULLs: 2007-01-12 23:22:41 +03:00
item_sum.cc Many files: 2006-12-23 20:17:15 +01:00
item_sum.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
item_timefunc.cc Many files: 2006-12-23 20:17:15 +01:00
item_timefunc.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
item_uniq.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
item_uniq.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
key.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
lex.h Many files: 2006-12-23 20:17:15 +01:00
lex_symbol.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
lock.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
log.cc Many files: 2006-12-23 20:17:15 +01:00
log_event.cc Many files: 2006-12-23 20:17:15 +01:00
log_event.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
Makefile.am my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
matherr.c my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
message.mc make dist changes for Cmake build 2006-09-01 10:32:12 +02:00
mf_iocache.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
my_decimal.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
my_decimal.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
my_lock.c my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
mysql_priv.h BUG#24127: (a,b) IN (SELECT c,d ...) can produce wrong results if a and/or b are NULLs: 2007-01-12 23:22:41 +03:00
mysqld.cc BUG#24127: (a,b) IN (SELECT c,d ...) can produce wrong results if a and/or b are NULLs: 2007-01-12 23:22:41 +03:00
mysqld_suffix.h Many files: 2006-12-23 20:17:15 +01:00
net_serv.cc Many files: 2006-12-23 20:17:15 +01:00
nt_servc.cc
nt_servc.h
opt_range.cc Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-5.0 2006-12-31 01:04:07 +01:00
opt_range.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
opt_sum.cc Many files: 2006-12-23 20:17:15 +01:00
parse_file.cc Many files: 2006-12-23 20:17:15 +01:00
parse_file.h Many files: 2006-12-23 20:17:15 +01:00
password.c my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
procedure.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
procedure.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
protocol.cc Many files: 2006-12-23 20:17:15 +01:00
protocol.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
records.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
repl_failsafe.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
repl_failsafe.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
set_var.cc Many files: 2006-12-23 20:17:15 +01:00
set_var.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
slave.cc Many files: 2006-12-23 20:17:15 +01:00
slave.h Many files: 2006-12-23 20:17:15 +01:00
sp.cc Many files: 2006-12-23 20:17:15 +01:00
sp.h Many files: 2006-12-23 20:17:15 +01:00
sp_cache.cc Many files: 2006-12-23 20:17:15 +01:00
sp_cache.h Many files: 2006-12-23 20:17:15 +01:00
sp_head.cc Many files: 2006-12-23 20:17:15 +01:00
sp_head.h Many files: 2006-12-23 20:17:15 +01:00
sp_pcontext.cc Many files: 2006-12-23 20:17:15 +01:00
sp_pcontext.h Many files: 2006-12-23 20:17:15 +01:00
sp_rcontext.cc Many files: 2006-12-23 20:17:15 +01:00
sp_rcontext.h Many files: 2006-12-23 20:17:15 +01:00
spatial.cc Many files: 2006-12-23 20:17:15 +01:00
spatial.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_acl.cc Many files: 2006-12-23 20:17:15 +01:00
sql_acl.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_analyse.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_analyse.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_array.h Many files: 2006-12-23 20:17:15 +01:00
sql_base.cc after merge fix 2007-01-10 14:03:36 +04:00
sql_bitmap.h Many files: 2006-12-23 20:17:15 +01:00
sql_cache.cc Many files: 2006-12-23 20:17:15 +01:00
sql_cache.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_class.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_class.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_client.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_crypt.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_crypt.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_cursor.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_cursor.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_db.cc Many files: 2006-12-23 20:17:15 +01:00
sql_delete.cc Many files: 2006-12-23 20:17:15 +01:00
sql_derived.cc Many files: 2006-12-23 20:17:15 +01:00
sql_do.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_error.cc Many files: 2006-12-23 20:17:15 +01:00
sql_error.h Many files: 2006-12-23 20:17:15 +01:00
sql_handler.cc Many files: 2006-12-23 20:17:15 +01:00
sql_help.cc Many files: 2006-12-23 20:17:15 +01:00
sql_insert.cc Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-5.0 2006-12-31 01:04:07 +01:00
sql_lex.cc Merge olga.mysql.com:/home/igor/mysql-5.0-opt 2007-01-09 10:26:28 -08:00
sql_lex.h BUG#24127: (a,b) IN (SELECT c,d ...) can produce wrong results if a and/or b are NULLs: 2007-01-12 23:22:41 +03:00
sql_list.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_list.h Many files: 2006-12-23 20:17:15 +01:00
sql_load.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_locale.cc Many files: 2006-12-23 20:17:15 +01:00
sql_manager.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_manager.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_map.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_map.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_olap.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_parse.cc Merge xiphis.org:/home/antony/work2/mysql-5.0-engines 2006-12-26 16:23:05 -08:00
sql_prepare.cc Merge mysql.com:/d2/hf/common/my41-common 2007-01-02 17:50:55 +04:00
sql_rename.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_repl.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_repl.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_select.cc BUG#24127: (a,b) IN (SELECT c,d ...) can produce wrong results if a and/or b are NULLs: 2007-01-12 23:22:41 +03:00
sql_select.h BUG#24127: (a,b) IN (SELECT c,d ...) can produce wrong results if a and/or b are NULLs: 2007-01-12 23:22:41 +03:00
sql_show.cc Many files: 2006-12-23 20:17:15 +01:00
sql_sort.h Many files: 2006-12-23 20:17:15 +01:00
sql_state.c Many files: 2006-12-23 20:17:15 +01:00
sql_string.cc Many files: 2006-12-23 20:17:15 +01:00
sql_string.h Many files: 2006-12-23 20:17:15 +01:00
sql_table.cc Many files: 2006-12-23 20:17:15 +01:00
sql_test.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_trigger.cc Many files: 2006-12-23 20:17:15 +01:00
sql_trigger.h Many files: 2006-12-23 20:17:15 +01:00
sql_udf.cc Merge bk-internal:/home/bk/mysql-5.0-opt 2007-01-03 18:29:39 +02:00
sql_udf.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_union.cc Many files: 2006-12-23 20:17:15 +01:00
sql_update.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_view.cc Many files: 2006-12-23 20:17:15 +01:00
sql_view.h Many files: 2006-12-23 20:17:15 +01:00
sql_yacc.yy Many files: 2006-12-23 20:17:15 +01:00
stacktrace.c Many files: 2006-12-23 20:17:15 +01:00
stacktrace.h Many files: 2006-12-23 20:17:15 +01:00
strfunc.cc Many files: 2006-12-23 20:17:15 +01:00
structs.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
table.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
table.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
thr_malloc.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
time.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
tzfile.h Many files: 2006-12-23 20:17:15 +01:00
tztime.cc Many files: 2006-12-23 20:17:15 +01:00
tztime.h Many files: 2006-12-23 20:17:15 +01:00
udf_example.c Many files: 2006-12-23 20:17:15 +01:00
udf_example.def Add the two new functions to udf_example.def so they will be exported by dll's 2006-11-16 16:19:29 +01:00
uniques.cc Many files: 2006-12-23 20:17:15 +01:00
unireg.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
unireg.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
watchdog_mysqld