mariadb/sql
unknown 0390de8672 Fix bug #13855 select distinct with group by caused server crash
DISTINCT wasn't optimized away and caused creation of tmp table in wrong
case. This result in integer overrun and running out of memory.

Fix backported from 4.1. Now if optimizer founds that in result be only 1
row it removes distinct.


sql/sql_select.cc:
  Fix bug #13855 select distinct with group by caused server crash
mysql-test/r/select.result:
  Test case for bug#13855 select distinct with group by caused server crash
mysql-test/t/select.test:
   Test case for bug#13855 select distinct with group by caused server crash
2005-10-14 01:22:24 +04:00
..
share errmsg.txt: 2005-05-07 15:11:31 +02:00
.cvsignore
add_errmsg
cache_manager.cc
cache_manager.h
convert.cc Compile all charset conversion tables if --with-extra-charsets=all 2004-08-27 21:17:29 +05:00
custom_conf.h
derror.cc
des_key_file.cc Replaced deprecated since OpenSSL 0.9.7 des_ calls and types with 2003-09-12 22:33:43 +04:00
field.cc Fix for bug #8894 "TIMESTAMP values scrambled/misaligned when using --new". 2005-03-28 23:36:25 +04:00
field.h Fix for bug #8894 "TIMESTAMP values scrambled/misaligned when using --new". 2005-03-28 23:36:25 +04:00
field_conv.cc Fix over-optimization that could result in an unsigned double field being 2005-01-17 16:13:56 -08:00
filesort.cc Anoter fix for moved IO_CACHE object 2005-01-18 02:04:41 +02:00
frm_crypt.cc
gen_lex_hash.cc Added global my_getopt_error_reporter function pointer which is 2004-08-31 21:27:58 +05:00
ha_berkeley.cc Merge 2004-06-25 12:59:47 +02:00
ha_berkeley.h Mark that strings may change on index only reads (for BDB tables). 2004-01-29 15:16:48 +01:00
ha_heap.cc fixed Bug #4973 Memory is not released when HEAP table is dropped 2004-08-11 18:55:12 +05:00
ha_heap.h Fixes for valgrind 2003-04-23 21:52:16 +03:00
ha_innodb.cc InnoDB: Display an error message in /* */ comments 2005-10-03 17:46:27 +03:00
ha_innodb.h InnoDB: Backport innodb_autoextend_increment from 4.1 2005-01-25 16:27:13 +02:00
ha_isam.cc Some small portability fixes. 2003-12-30 13:14:21 +02:00
ha_isam.h Some small portability fixes. 2003-12-30 13:14:21 +02:00
ha_isammrg.cc
ha_isammrg.h Some small portability fixes. 2003-12-30 13:14:21 +02:00
ha_myisam.cc uninit variable fixed 2005-03-03 21:13:33 +01:00
ha_myisam.h Some small portability fixes. 2003-12-30 13:14:21 +02:00
ha_myisammrg.cc Some small portability fixes. 2003-12-30 13:14:21 +02:00
ha_myisammrg.h Some small portability fixes. 2003-12-30 13:14:21 +02:00
handler.cc Reverted patch for new usage of open_count as it caused more problems than it solved 2004-10-06 01:24:21 +03:00
handler.h Change create_field->offset to store offset from start of fields, independent of null bits. 2005-05-13 11:11:50 +03:00
hash_filo.cc
hash_filo.h
hostname.cc
init.cc Added option --read-only (Thanks to Markus Benning) 2003-05-19 12:01:38 +03:00
item.cc Review of new pushed code 2005-10-13 17:41:55 +03:00
item.h Fix for BUG#6976: 2004-12-11 19:59:09 +03:00
item_buff.cc
item_cmpfunc.cc Fixes while reviewing code 2004-11-26 02:31:22 +02:00
item_cmpfunc.h Fix for BUG#8711: "<=>" may have true value for NULL arguments, so make 2005-03-11 02:17:03 +03:00
item_create.cc Fix for bug #9796 "Query Cache caches queries with CURRENT_USER() 2005-04-11 00:30:23 +04:00
item_create.h
item_func.cc BUG#7709 fix - Boolean fulltext query against unsupported engines does not 2005-05-07 15:48:56 +05:00
item_func.h Fixes while reviewing code 2004-11-26 02:31:22 +02:00
item_strfunc.cc BUG 11104 (same as changeset 1.1891 on the 5.0 tree, but realised this 2005-07-31 21:28:52 -07:00
item_strfunc.h Fix QUOTE() to not reuse the input field for output, which resulted in 2005-02-01 18:29:10 -08:00
item_sum.cc cleanup: if there is return from if-part, we don't need else statement 2003-12-10 22:26:31 +03:00
item_sum.h BUG#4393, BUG#4356 - incorrect decimals in fix_length_and_dec() in some functions 2004-07-31 22:39:10 +02:00
item_timefunc.cc Fix for bug #7515 "from_unixtime(0) now returns NULL instead of 2004-12-30 21:18:10 +03:00
item_timefunc.h Fix for bug #7515 "from_unixtime(0) now returns NULL instead of 2004-12-30 21:18:10 +03:00
item_uniq.cc
item_uniq.h Fixed some varnings from valgrind 2003-08-20 16:25:44 +03:00
key.cc A fix (bug #8942: SUBSTRING_INDEX in UPDATE causes internal loop). 2005-03-17 10:24:50 +04:00
lex.h Portability fixes (mostly test suite) 2003-12-16 13:20:17 +02:00
lex_symbol.h
lock.cc Review fixes: 2005-07-26 17:55:58 +03:00
log.cc Bug#8412: For replication to work correctly, the prologue and 2005-02-14 18:39:33 +01:00
log_event.cc safer creation of temp files used in replication of LOAD DATA INFILE. 2005-03-17 14:39:39 +01:00
log_event.h Always use libtool with "--preserve-dup-deps" 2004-02-13 16:05:09 +02:00
Makefile.am Dependency fix. We observed that doing any change to class THD in sql_class.h resulted in mysqld going crazy (parsing errors, 2004-09-06 22:30:16 +02:00
matherr.c
mf_iocache.cc Fixed memory leak in DROP DATABASE when using RAID tables (Bug #2882) 2004-03-10 13:46:11 +02:00
mini_client.cc Fixes bug #5588. vio_was_interrupted() function was added to detect 2005-08-30 19:19:28 +04:00
mini_client.h
my_lock.c
mysql_priv.h Review fixes: 2005-07-26 17:55:58 +03:00
mysqld.cc Bug#12920 - key_read_requests counter appears to re-set 2005-09-14 09:56:49 +02:00
mysqld_suffix.h New MYSQL_SERVER_SUFFIX usage (for easier compilation) 2004-05-25 02:28:44 +03:00
net_pkg.cc Fix for BUG#5711 "replication SQL thread does not abort on SQL syntax error": 2004-09-23 14:43:31 +02:00
net_serv.cc Fixes bug #5588. vio_was_interrupted() function was added to detect 2005-08-30 19:19:28 +04:00
nt_servc.cc merge with 3.23 2004-03-25 22:05:09 +02:00
nt_servc.h
opt_ft.cc Add new user variables for tuning memory usage: 2003-10-11 22:00:24 +03:00
opt_ft.h Add new user variables for tuning memory usage: 2003-10-11 22:00:24 +03:00
opt_range.cc Fixed unlikely bug in the range optimzer when using many IN() queries on different key parts. (Bug #4157) 2004-06-18 02:31:11 +03:00
opt_range.h Add new user variables for tuning memory usage: 2003-10-11 22:00:24 +03:00
opt_sum.cc Bug#4411 2004-08-11 23:24:36 +01:00
password.c - renamed "rnd" to "my_rnd" as the name was too generic (and is an exported 2003-03-18 22:14:02 +01:00
procedure.cc
procedure.h
records.cc Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.0 2004-10-06 12:49:56 +05:00
repl_failsafe.cc Fix for Bug#6148. Only rewind read position in binary log when the 2004-11-25 09:26:45 +01:00
repl_failsafe.h Updating the headers on a few files to include GPL header. 2004-09-08 18:26:19 -07:00
set_var.cc set_var.cc: 2005-08-29 12:08:04 -05:00
set_var.h Ensure that one can't from the command line set a variable too small. (Bug #2710) 2004-03-06 10:43:35 +02:00
slave.cc Review fixes: 2005-07-26 17:55:58 +03:00
slave.h Fix for Bug#6148. Only rewind read position in binary log when the 2004-11-25 09:26:45 +01:00
sql_acl.cc Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement. 2005-05-31 11:08:14 +02:00
sql_acl.h backport wild_compare fix from 4.1 - bug#3924 2004-05-29 17:52:20 +02:00
sql_analyse.cc Fixed Bug#3645, "PROCEDURE ANALYSE() recommends illegal 2004-09-07 11:40:27 +03:00
sql_analyse.h
sql_base.cc Bug#12845 - Stress test: Server crashes on CREATE .. SELECT statement 2005-09-13 20:19:59 +02:00
sql_cache.cc block using QC in case of having tables locked by LOCK... (BUG#12385) 2005-08-10 18:58:55 +03:00
sql_cache.h Check of temporary tables hiding for query fetched from QC (BUG#6084) 2004-10-21 23:56:12 +03:00
sql_class.cc two fixes for potential security bugs 2004-12-07 12:08:20 +01:00
sql_class.h Prevent adding 'CREATE TABLE .. SELECT' query to the binary log when the 2004-12-03 00:05:11 +01:00
sql_crypt.cc - renamed "rnd" to "my_rnd" as the name was too generic (and is an exported 2003-03-18 22:14:02 +01:00
sql_crypt.h
sql_db.cc when we update thd->db in replication, it's safer to update thd->db_length too. 2004-09-07 14:57:54 +02:00
sql_delete.cc TRUNCATE is always a transaction on itself. pretent we're in auto-commit mode 2005-04-14 18:14:54 +02:00
sql_do.cc
sql_handler.cc Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement. 2005-05-31 11:08:14 +02:00
sql_insert.cc Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement. 2005-05-31 11:08:14 +02:00
sql_lex.cc Fix bug#7672 Unknown column error in order clause 2005-10-09 23:05:44 +04:00
sql_lex.h Fix bug#7672 Unknown column error in order clause 2005-10-09 23:05:44 +04:00
sql_list.cc Don't install signal handler for SIGINT by default 2003-06-10 21:42:29 +03:00
sql_list.h Fix for BUG#10095: {wrong query results because of incorrect constant propagation} 2005-05-15 22:56:45 +02:00
sql_load.cc A fix for a long standing bug in LOAD DATA .. LOCAL ..' 2004-07-13 13:54:20 +03:00
sql_manager.cc
sql_manager.h
sql_map.cc
sql_map.h
sql_olap.cc
sql_parse.cc Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement. 2005-05-31 11:08:14 +02:00
sql_rename.cc Some small portability fixes. 2003-12-30 13:14:21 +02:00
sql_repl.cc sql_repl.cc: 2005-06-03 11:16:37 +02:00
sql_repl.h Updating the headers on a few files to include GPL header. 2004-09-08 18:26:19 -07:00
sql_select.cc Fix bug #13855 select distinct with group by caused server crash 2005-10-14 01:22:24 +04:00
sql_select.h Fixes for valgrind 2003-04-23 21:52:16 +03:00
sql_show.cc Fix for BUG#7519: Index statistics is not displayed after ANALYZE for temporary tables: 2005-02-05 06:23:23 +03:00
sql_sort.h
sql_string.cc a proper fix for the bug #2298 Trailing whitespace inconsistently handled in WHERE clause. 2004-01-22 18:05:47 +04:00
sql_string.h
sql_table.cc Bug #10600 After review fixes 2005-07-20 21:19:01 +02:00
sql_test.cc Bug#12920 - key_read_requests counter appears to re-set 2005-09-14 09:56:49 +02:00
sql_udf.cc - backport of a compile fix from 4.1 (ChangeSet@1.2260.23.2 2005/05/19 from reggie) 2005-06-30 17:33:23 +02:00
sql_udf.h
sql_union.cc Fix for wrongly calculated Examined_rows in 4.0 UNION's. 2004-10-05 14:47:10 +03:00
sql_update.cc Merge mysql.com:/home/bkroot/mysql-4.0 2005-02-18 13:50:19 +01:00
sql_yacc.yy Bug#8191 - SELECT INTO OUTFILE insists on FROM clause 2005-05-08 22:56:58 +01:00
stacktrace.c Change www.mysql.com -> dev.mysql.com in a reference to 2004-09-19 14:48:41 +04:00
stacktrace.h
structs.h Fixed http address in some scripts (Bug #3460) 2004-04-28 17:45:08 +03:00
table.cc Fixes for bugs reported by Stefano Di Paola (stefano.dipaola@wisec.it) 2005-03-03 19:51:29 +01:00
table.h Fix for BUG#5837 - attempt 3. 2004-12-11 15:51:52 +03:00
thr_malloc.cc
time.cc Fix for bug #7297 "Two digit year should be interpreted correctly 2004-12-16 16:31:50 +03:00
udf_example.cc
uniques.cc Fix for bug #1980 2003-12-02 21:05:40 +03:00
unireg.cc Fixed compiler failure 2005-05-14 17:08:43 +03:00
unireg.h Fix for BUG#1686 2003-10-29 14:23:35 +01:00
watchdog_mysqld