mariadb/sql
unknown 4f14c13a1c Fix for BUG#31035: select from function, group by result crasher.
This actually, fix for the patch for bug-27354. The problem with
the patch was that Item_func_sp::used_tables() was updated, but
Item_func_sp::const_item() was not. So, for Item_func_sp, we had
the following inconsistency:
  - used_tables() returned RAND_TABLE, which means that the item
    can produce "random" results;
  - but const_item() returned TRUE, which means that the item is
    a constant one.

The fix is to change Item_func_sp::const_item() behaviour: it must
return TRUE (an item is a constant one) only if a stored function
is deterministic and each of its arguments (if any) is a constant
item.


mysql-test/r/sp.result:
  Update result file.
mysql-test/t/sp.test:
  Add test cases for BUG-31035, BUG-31191, BUG-31226
sql/item_func.cc:
  Make Item::const_item() be consistent with Item::used_tables().
2007-10-04 17:19:14 +04:00
..
examples Bug#28862 Extended Latin1 characters get lost in CVS engine 2007-06-15 11:19:35 +05:00
share Merge ramayana.hindu.god:/home/tsmith/m/bk/50 2007-08-15 15:48:03 -06:00
.cvsignore
add_errmsg
client_settings.h
CMakeLists.txt CMakeLists.txt, README, configure.js 2007-08-03 21:51:37 +02:00
custom_conf.h
derror.cc
des_key_file.cc
discover.cc
field.cc Bug #29536: timestamp inconsistent in replication around 1970 2007-08-06 04:57:28 -07:00
field.h Fixed compiler error for Windows in the patch for bug 30219. 2007-08-05 17:12:57 -07:00
field_conv.cc field_conv.cc: 2007-07-12 00:55:40 +05:00
filesort.cc Bug#15130: CREATE .. SELECT was denied to use advantages of the SQL_BIG_RESULT. 2007-07-24 18:15:44 +04:00
frm_crypt.cc
gen_lex_hash.cc
gstream.cc
gstream.h
ha_archive.cc BUG#29207 - archive table reported as corrupt by check table (P1) 2007-06-27 13:19:34 +05:00
ha_archive.h
ha_berkeley.cc BUG#28591: make the fix work for BDB tables too: 2007-07-26 20:52:53 +04:00
ha_berkeley.h
ha_blackhole.cc
ha_blackhole.h Merge mysql.com:/home/svoj/devel/mysql/BUG27998/mysql-4.1-engines 2007-05-10 18:14:04 +05:00
ha_federated.cc fix pushbuild failures 2007-07-25 17:22:52 -07:00
ha_federated.h Merge ramayana.hindu.god:/home/tsmith/m/bk/50 2007-08-01 18:14:50 -06:00
ha_heap.cc Mark deadcode for gcov 2007-07-18 11:12:15 +04:00
ha_heap.h [pb problem]: ha_heap->clone() fails on windows because of mess with 2007-07-17 19:51:50 +04:00
ha_innodb.cc NULL MERGE this ChangeSet to 5.1 2007-08-15 17:20:54 -06:00
ha_innodb.h
ha_myisam.cc Merge gleb.loc:/home/uchum/work/bk/5.0 2007-07-19 19:57:53 +05:00
ha_myisam.h Bug#28249 Query Cache returns wrong result with concurrent insert / certain lock 2007-07-12 13:29:51 +02:00
ha_myisammrg.cc BUG#26976 - Missing table in merge not noted in related error msg + 2007-06-14 16:18:01 +05:00
ha_myisammrg.h BUG#26976 - Missing table in merge not noted in related error msg + 2007-06-06 04:42:41 +05:00
ha_ndbcluster.cc (pushing for Andrei) 2007-07-30 18:27:36 +03:00
ha_ndbcluster.h
ha_ndbcluster_cond.cc
ha_ndbcluster_cond.h Bug #29185 Large IN list crashes mysqld with cluster and condition pushdown 2007-06-19 13:56:02 +02:00
handler.cc bug#28570: handler::index_read() is called with different find_flag when 2007-08-15 09:23:44 +02:00
handler.h Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.0-opt 2007-08-01 18:39:13 -06:00
hash_filo.cc
hash_filo.h
hostname.cc
init.cc Fix for bug #28121 "INSERT or UPDATE into DOUBLE(200,0) field being truncated to 31 digits" 2007-05-28 12:44:59 +04:00
item.cc Fixed bug #30287. 2007-08-21 01:39:39 +05:00
item.h Merge mkindahl@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl 2007-08-03 18:59:16 +02:00
item_buff.cc
item_cmpfunc.cc item_cmpfunc.cc: 2007-07-16 01:03:58 +04:00
item_cmpfunc.h Merge weblab.(none):/home/marcsql/TREE/mysql-5.0-base 2007-08-30 17:23:40 -06:00
item_create.cc Fix for bug #30200: mysqlbinlog.test: connection_id() not restored under ps-protocol 2007-08-02 14:51:03 +05:00
item_create.h
item_func.cc Fix for BUG#31035: select from function, group by result crasher. 2007-10-04 17:19:14 +04:00
item_func.h Fixed bug #29338. 2007-07-19 18:39:01 +05:00
item_geofunc.cc
item_geofunc.h
item_row.cc
item_row.h
item_strfunc.cc Merge mysql.com:/home/bar/mysql-work/mysql-5.0.b28875 2007-08-03 15:30:31 +05:00
item_strfunc.h Bug #29878 Garbage data generation when executing SESSION_USER() on a slave. 2007-07-27 18:42:25 +05:00
item_subselect.cc Bug#27333: subquery grouped for aggregate of outer 2007-06-29 10:39:17 +03:00
item_subselect.h
item_sum.cc Bug#29850: Wrong charset of GROUP_CONCAT result when the select employs 2007-07-19 20:21:23 +04:00
item_sum.h Bug#27333: subquery grouped for aggregate of outer 2007-06-29 10:39:17 +03:00
item_timefunc.cc Merge mysql.com:/home/bar/mysql-work/mysql-5.0.b28875 2007-08-03 15:30:31 +05:00
item_timefunc.h Backport of TIME->MYSQL_TIME / Y2K fixset 2007-05-16 10:44:59 +02:00
item_uniq.cc
item_uniq.h
key.cc
lex.h
lex_symbol.h
lock.cc Bug#25164 create table a as select * from A hangs 2007-08-27 10:13:54 -03:00
log.cc (pushing for Andrei) 2007-07-30 18:27:36 +03:00
log_event.cc Fix for bug #29928: INSERT ... VALUES(connection_id(), ...) incorrect 2007-08-01 15:27:03 +05:00
log_event.h Bug#22725 Replication outages from ER_SERVER_SHUTDOWN (1053) set in replication events 2007-05-28 22:20:22 +03:00
Makefile.am Bug#29414 HPUX build fails - 'noinst_HEADERS' does not exist 2007-06-28 11:13:18 +02:00
matherr.c
message.mc
mf_iocache.cc
my_decimal.cc Backport of TIME->MYSQL_TIME / Y2K fixset 2007-05-16 10:44:59 +02:00
my_decimal.h Merge bk-internal.mysql.com:/data0/bk/mysql-5.0 2007-05-28 00:05:38 +02:00
my_lock.c
mysql_priv.h Bug#16918: Aborted_clients > Connections. 2007-09-13 17:30:44 +04:00
mysqld.cc Fix for Bug#27970 "Fix for bug 24507 makes mysql_install_db fail" 2007-08-16 17:25:48 +03:00
mysqld_suffix.h
net_serv.cc Merge mysql.com:/home/hf/work/29117/my41-29117 2007-06-19 12:31:37 +05:00
nt_servc.cc
nt_servc.h
opt_range.cc Merge mhansson@bk-internal.mysql.com:/home/bk/mysql-5.0-opt 2007-08-16 14:13:07 +02:00
opt_range.h
opt_sum.cc Bug#27573: MIN() on an indexed column which is always NULL sets _other_ results 2007-05-15 15:29:12 +03:00
parse_file.cc
parse_file.h
password.c
procedure.cc
procedure.h
protocol.cc Backport of TIME->MYSQL_TIME / Y2K fixset 2007-05-16 10:44:59 +02:00
protocol.h Backport of TIME->MYSQL_TIME / Y2K fixset 2007-05-16 10:44:59 +02:00
records.cc
repl_failsafe.cc
repl_failsafe.h
set_var.cc (pushing for Andrei) 2007-07-30 18:27:36 +03:00
set_var.h
slave.cc Merge polly.local:/home/kaa/src/maint/bug24192/my50-bug24192 2007-07-11 19:29:11 +04:00
slave.h
sp.cc Allow mysql.proc to have extra (unknown) fields. 2007-07-25 18:38:52 +04:00
sp.h
sp_cache.cc
sp_cache.h
sp_head.cc Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt 2007-07-31 15:23:25 +03:00
sp_head.h A fix and a test case for Bug#26141 mixing table types in trigger 2007-07-12 22:26:41 +04:00
sp_pcontext.cc
sp_pcontext.h
sp_rcontext.cc Bug#24989: The DEADLOCK error is improperly handled by InnoDB. 2007-07-30 17:14:34 +04:00
sp_rcontext.h Bug#24989: The DEADLOCK error is improperly handled by InnoDB. 2007-07-30 17:14:34 +04:00
spatial.cc Bug #29166: 2007-07-05 18:24:48 +03:00
spatial.h
sql_acl.cc BUG#29030 (DROP USER command that errors still gets written to binary log 2007-06-20 14:24:31 +02:00
sql_acl.h
sql_analyse.cc
sql_analyse.h
sql_array.h
sql_base.cc Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-marvel 2007-08-23 17:43:47 +02:00
sql_bitmap.h
sql_cache.cc Merge adventure.(none):/home/thek/Development/cpp/bug21074/my50-bug21074 2007-09-03 13:46:10 +02:00
sql_cache.h Bug #30269 Query cache eats memory 2007-08-17 16:55:20 +02:00
sql_class.cc Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.0-opt 2007-08-01 18:39:13 -06:00
sql_class.h Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.0-opt 2007-08-01 18:39:13 -06:00
sql_client.cc Bug#26664 test suite times out on OS X 64bit 2007-05-24 11:21:27 +02:00
sql_crypt.cc
sql_crypt.h
sql_cursor.cc
sql_cursor.h
sql_db.cc A fix and a teset case for Bug#28551 The warning 2007-07-05 02:20:32 +04:00
sql_delete.cc (pushing for Andrei) 2007-07-30 18:27:36 +03:00
sql_derived.cc
sql_do.cc
sql_error.cc Merge bk-internal.mysql.com:/home/bk/mysql-5.0-runtime 2007-06-20 12:46:15 +04:00
sql_error.h BUG#26976 - Missing table in merge not noted in related error msg + 2007-06-06 04:42:41 +05:00
sql_handler.cc Bug#30632 HANDLER read failure causes hang 2007-08-27 10:37:12 -03:00
sql_help.cc
sql_insert.cc Bug#28587 SELECT is blocked by INSERT waiting on read lock, even with low_priority_updates 2007-08-30 16:11:53 -03:00
sql_lex.cc Merge weblab.(none):/home/marcsql/TREE/mysql-5.0-base 2007-08-30 17:23:40 -06:00
sql_lex.h Fixed bug #30396. 2007-08-15 10:24:18 -07:00
sql_list.cc
sql_list.h
sql_load.cc (pushing for Andrei) 2007-07-30 18:27:36 +03:00
sql_locale.cc
sql_manager.cc
sql_manager.h
sql_map.cc
sql_map.h
sql_olap.cc
sql_parse.cc Bug#16918: Aborted_clients > Connections. 2007-09-13 17:30:44 +04:00
sql_prepare.cc Merge bk-internal.mysql.com:/home/bk/mysql-5.0-runtime 2007-07-12 23:22:17 +04:00
sql_rename.cc
sql_repl.cc Fix for bug #29420: crash with show and purge binlogs 2007-07-05 13:09:56 +05:00
sql_repl.h
sql_select.cc Merge gleb.loc:/home/uchum/work/bk/5.0-opt-30287 2007-08-21 19:30:32 +05:00
sql_select.h Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.0-opt 2007-07-31 15:24:22 +04:00
sql_show.cc Merge ramayana.hindu.god:/home/tsmith/m/bk/50 2007-08-27 18:19:55 -06:00
sql_sort.h Fixed bug #25798. 2007-07-01 15:33:28 -07:00
sql_state.c
sql_string.cc Reversing additional change suggested by Serg 2007-08-07 19:25:45 +05:00
sql_string.h
sql_table.cc Merge olga.mysql.com:/home/igor/mysql-5.0 2007-08-04 20:53:26 -07:00
sql_test.cc
sql_trigger.cc Fixed whitespace 2007-09-04 16:40:27 -06:00
sql_trigger.h A fix and a test case for Bug#26141 mixing table types in trigger 2007-07-12 22:26:41 +04:00
sql_udf.cc
sql_udf.h Remove typedef st_table_list TABLE_LIST and always use name 'TABLE_LIST'. 2007-07-06 16:18:49 +04:00
sql_union.cc Post-merge fixes 2007-07-31 16:15:56 +04:00
sql_update.cc addendum for the fix for bug 27417: 2007-07-31 14:42:56 +03:00
sql_view.cc Fixed bug #30287. 2007-08-21 01:39:39 +05:00
sql_view.h
sql_yacc.yy Bug#30625 (Performance, reduce depth for expressions) 2007-08-28 11:16:03 -06:00
stacktrace.c Bug #29543 GCov information not written in case of crash. 2007-07-07 07:46:17 +02:00
stacktrace.h
strfunc.cc
structs.h Bug#28149 overflow in some "SHOW STATUS"-variables 2007-06-09 17:46:09 +05:00
table.cc Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.0-opt 2007-08-01 18:39:13 -06:00
table.h Bug #29929 LOCK TABLES does not pre-lock tables used in triggers of the locked tables 2007-07-27 16:56:29 +02:00
thr_malloc.cc
time.cc Bug #29536: timestamp inconsistent in replication around 1970 2007-08-06 04:57:28 -07:00
tzfile.h
tztime.cc Backport of TIME->MYSQL_TIME / Y2K fixset 2007-05-16 10:44:59 +02:00
tztime.h Backport of TIME->MYSQL_TIME / Y2K fixset 2007-05-16 10:44:59 +02:00
udf_example.c bug#27741: udf test fails on AIX < 5.3 2007-05-31 14:22:21 +02:00
udf_example.def
uniques.cc Fixed bug #25798. 2007-07-01 15:33:28 -07:00
unireg.cc Bug #29325: 2007-07-11 10:49:54 +03:00
unireg.h Fixed bug #27352. 2007-08-03 01:58:21 +05:00
watchdog_mysqld