mariadb/sql
unknown 7a703d6ace Fix for BUG#8532.
The problem was in that the code that analyses the applicability of the
QUICK_GROUP_MIN_MAX access method for DISTINC queries assumed that there
are no duplicate column references in the DISTINCT clause, and it added
non-exiting key parts for the duplicate column references. 

The solution adds a test to check whether the select list already contained
a field with the same name. If such field was already present, then it was
already decided to use its key part for index access. In this such case we
must skip the duplicate field instead of counting it as a new field.


mysql-test/r/group_min_max.result:
  Added test results for BUG#8532.
mysql-test/t/group_min_max.test:
  Added tests for BUG#8532.
sql/opt_range.cc:
  The problem was in that the code that analyses the applicability of the
  QUICK_GROUP_MIN_MAX access method for DISTINC queries assumed that there
  are no duplicate column references in the DISTINCT clause, and it added
  non-exiting key parts for the duplicate column references. 
  
  The solution adds a test to check whether the select list already contained
  a field with the same name. If such field was already present, then it was
  already decided to use its key part for index access. In this such case we
  must skip the duplicate field instead of counting it as a new field.
2005-02-28 16:20:02 +02:00
..
examples Merge with global tree 2005-02-25 17:12:06 +02:00
share Fix badly spelled symbol. 2005-02-23 13:15:03 -06:00
.cvsignore
add_errmsg
client_settings.h
custom_conf.h
derror.cc Remove compiler warnings and remove not used variables 2005-02-25 16:53:22 +02:00
des_key_file.cc
discover.cc
field.cc Remove compiler warnings and remove not used variables 2005-02-25 16:53:22 +02:00
field.h Fixed failing test cases 'row.test' when running with --ps-protocol 2005-02-15 16:45:00 +02:00
field_conv.cc Precision Math implementation 2005-02-09 02:50:45 +04:00
filesort.cc Remove compiler warnings and remove not used variables 2005-02-25 16:53:22 +02:00
frm_crypt.cc
gen_lex_hash.cc After merge fixes 2004-12-31 00:44:00 +02:00
gstream.cc
gstream.h
ha_berkeley.cc windows compilation fixes 2005-02-19 12:15:30 +01:00
ha_berkeley.h XA (not completely polished out yet) 2005-01-16 13:16:23 +01:00
ha_federated.cc Fix confusing comments. 2005-02-20 22:52:28 +03:00
ha_federated.h compilation fixes 2005-02-18 14:42:14 +01:00
ha_heap.cc Remove compiler warnings and remove not used variables 2005-02-25 16:53:22 +02:00
ha_heap.h Output 'MEMORY' as table type for tables using the memory (nee heap) storage 2005-01-13 17:38:13 -08:00
ha_innodb.cc Remove compiler warnings and remove not used variables 2005-02-25 16:53:22 +02:00
ha_innodb.h manually merged 2005-02-14 21:50:09 +01:00
ha_myisam.cc Precision Math implementation 2005-02-09 02:50:45 +04:00
ha_myisam.h Merge changes 2005-02-04 11:59:02 -08:00
ha_myisammrg.cc First stage of table definition cache 2005-01-06 13:00:13 +02:00
ha_myisammrg.h Fix for BUG#7377. This fix adds the same implementation for ha_myisammgr::index_type as in version 5.0. 2004-12-27 14:05:35 +02:00
ha_ndbcluster.cc Merge joreland@bk-internal.mysql.com:/home/bk/mysql-5.0 2005-02-25 09:17:55 +01:00
ha_ndbcluster.h making XA tree to compile (and pass tests) in -max build 2005-02-17 22:52:40 +01:00
handler.cc Remove compiler warnings and remove not used variables 2005-02-25 16:53:22 +02:00
handler.h don't log BEGIN in auto-commit mode 2005-02-23 18:26:49 +01:00
hash_filo.cc
hash_filo.h
hostname.cc
init.cc
item.cc Fixes while during review of last pull 2005-02-26 12:19:02 +02:00
item.h Backport my_strntod() from 5.0 2005-02-22 12:51:23 +02:00
item_buff.cc Fixed failing test cases 'row.test' when running with --ps-protocol 2005-02-15 16:45:00 +02:00
item_cmpfunc.cc Fix - to not to call val_xxx in Item_func_interval twice 2005-02-16 11:19:47 +04:00
item_cmpfunc.h Precision Math implementation 2005-02-09 02:50:45 +04:00
item_create.cc Precision Math implementation 2005-02-09 02:50:45 +04:00
item_create.h Precision Math implementation 2005-02-09 02:50:45 +04:00
item_func.cc Merge with 4.1 2005-02-22 15:47:00 +02:00
item_func.h Backport my_strntod() from 5.0 2005-02-22 12:51:23 +02:00
item_geofunc.cc Merge with 4.1 2004-12-22 13:54:39 +02:00
item_geofunc.h Rename: Item::val -> Item::val_real(). 2004-11-11 21:39:35 +03:00
item_row.cc Merge with 4.1 2005-02-10 02:27:37 +02:00
item_row.h Precision Math implementation 2005-02-09 02:50:45 +04:00
item_strfunc.cc Merge gluh.mysql.r18.ru:/home/gluh/MySQL-MERGE/mysql-4.1 2005-02-23 18:47:00 +03:00
item_strfunc.h Precision Math implementation 2005-02-09 02:50:45 +04:00
item_subselect.cc Remove compiler warnings and remove not used variables 2005-02-25 16:53:22 +02:00
item_subselect.h Precision Math implementation 2005-02-09 02:50:45 +04:00
item_sum.cc Merge svojtovich@bk-internal.mysql.com:/home/bk/mysql-5.0 2005-02-27 13:33:20 +04:00
item_sum.h Merge svojtovich@bk-internal.mysql.com:/home/bk/mysql-5.0 2005-02-27 13:33:20 +04:00
item_timefunc.cc Manual merge of fixes for bugs #7899 "CREATE TABLE .. SELECT .. and 2005-01-28 10:22:50 +03:00
item_timefunc.h Precision Math implementation 2005-02-09 02:50:45 +04:00
item_uniq.cc Precision Math implementation 2005-02-09 02:50:45 +04:00
item_uniq.h Precision Math implementation 2005-02-09 02:50:45 +04:00
key.cc Fixes for windows compilation bugs 2005-01-26 15:19:20 +01:00
lex.h BUG#3190 fix (request for STDDEV_SAMP, VAR_SAMP). 2005-02-25 22:19:04 +04:00
lex_symbol.h
lock.cc Merge mysql.com:/home/mysql_src/mysql-4.1-clean 2005-02-23 18:52:15 +01:00
log.cc Merge with global tree 2005-02-25 17:12:06 +02:00
log_event.cc Merge with global tree 2005-02-25 17:12:06 +02:00
log_event.h don't log BEGIN in auto-commit mode 2005-02-23 18:26:49 +01:00
Makefile.am Precision Math implementation 2005-02-09 02:50:45 +04:00
matherr.c
mf_iocache.cc
my_decimal.cc use dbug_print_decimal instead of DBUG_EXECUTE 2005-02-20 00:24:30 +02:00
my_decimal.h More changes to make 5.0.3 compile on Windows 2005-02-23 22:55:46 -06:00
my_lock.c
mysql_priv.h Merge with global tree 2005-02-25 17:12:06 +02:00
mysqld.cc Merge with global tree 2005-02-25 17:12:06 +02:00
mysqld_suffix.h
net_serv.cc Fixed problem of sending ERROR to client after OK or EOF (BUG#6804) 2005-01-20 10:41:37 +02:00
nt_servc.cc
nt_servc.h cleaned up mysql installation code for windows. 2005-02-09 22:02:48 +02:00
opt_range.cc Fix for BUG#8532. 2005-02-28 16:20:02 +02:00
opt_range.h Post WL#2126 fixes: 2004-12-29 16:07:27 +03:00
opt_sum.cc First stage of table definition cache 2005-01-06 13:00:13 +02:00
parse_file.cc now my_printf_error is not better then my_error, but my_error call is shorter 2004-11-13 19:35:51 +02:00
parse_file.h fixed & added comments (according to Igor's review and a bit more) 2004-10-07 01:45:06 +03:00
password.c Merge with 4.1 2004-12-22 13:54:39 +02:00
procedure.cc Precision Math implementation 2005-02-09 02:50:45 +04:00
procedure.h Merge with 4.1 2005-02-22 15:47:00 +02:00
protocol.cc Fixes while during review of last pull 2005-02-26 12:19:02 +02:00
protocol.h Precision Math implementation 2005-02-09 02:50:45 +04:00
protocol_cursor.cc Fixed BUILD script to use --with-berkeley-db instead of --with-bdb 2005-02-19 18:58:27 +02:00
records.cc Merge 2005-01-20 07:51:00 +03:00
repl_failsafe.cc First stage of table definition cache 2005-01-06 13:00:13 +02:00
repl_failsafe.h merge 2004-11-12 15:36:31 +02:00
set_var.cc Fix badly spelled symbol. 2005-02-23 13:15:03 -06:00
set_var.h Merge serg.mylan:/usr/home/serg/Abk/mysql-5.0 2005-02-18 12:02:46 +01:00
slave.cc Remove compiler warnings and remove not used variables 2005-02-25 16:53:22 +02:00
slave.h manually merged 2005-02-14 21:50:09 +01:00
sp.cc WL#2130: Table locking for stored FUNCTIONs 2005-02-08 20:52:50 +01:00
sp.h WL#2130: Table locking for stored FUNCTIONs 2005-02-08 20:52:50 +01:00
sp_cache.cc
sp_cache.h
sp_head.cc Fixed BUG#7620: Stored procedure packet error if show mutex status 2005-02-25 15:21:05 +01:00
sp_head.h WL#2130: Table locking for stored FUNCTIONs 2005-02-08 20:52:50 +01:00
sp_pcontext.cc Merge bk-internal.mysql.com:/home/bk/mysql-5.0 2005-02-25 19:51:29 +02:00
sp_pcontext.h Fix warnings and compilation failures (Windows). 2004-11-17 13:45:05 +03:00
sp_rcontext.cc Fixed BUILD script to use --with-berkeley-db instead of --with-bdb 2005-02-19 18:58:27 +02:00
sp_rcontext.h Fixed BUG#6029: Stored procedure specific handlers should have priority. 2004-10-23 14:23:32 +02:00
spatial.cc Fix for bug #6117 (Centroid() crashes server) 2004-10-22 20:32:02 +05:00
spatial.h Fix compiler warnings (detected by Intel's C++ compiler) 2004-10-22 18:44:51 +03:00
sql_acl.cc Merge with global tree 2005-02-25 17:12:06 +02:00
sql_acl.h merged 2005-01-24 19:41:42 +01:00
sql_analyse.cc Remove compiler warnings and remove not used variables 2005-02-25 16:53:22 +02:00
sql_analyse.h Precision Math implementation 2005-02-09 02:50:45 +04:00
sql_base.cc Remove compiler warnings and remove not used variables 2005-02-25 16:53:22 +02:00
sql_bitmap.h
sql_cache.cc postreview changes 2005-02-21 17:07:40 +02:00
sql_cache.h merge 2005-02-07 21:39:37 +02:00
sql_class.cc Show all generated warnings in SHOW ERROR 2005-02-24 23:33:42 +02:00
sql_class.h Merge with global tree 2005-02-25 17:12:06 +02:00
sql_client.cc
sql_crypt.cc
sql_crypt.h
sql_db.cc Merge with global tree 2005-02-25 17:12:06 +02:00
sql_delete.cc Merge serg.mylan:/usr/home/serg/Abk/mysql-5.0 2005-02-18 12:02:46 +01:00
sql_derived.cc Merge with 4.1 2005-02-22 15:47:00 +02:00
sql_do.cc Merge with 4.1 2004-12-22 13:54:39 +02:00
sql_error.cc Show all generated warnings in SHOW ERROR 2005-02-24 23:33:42 +02:00
sql_handler.cc Precision Math implementation 2005-02-09 02:50:45 +04:00
sql_help.cc Remove compiler warnings and remove not used variables 2005-02-25 16:53:22 +02:00
sql_insert.cc Remove compiler warnings and remove not used variables 2005-02-25 16:53:22 +02:00
sql_lex.cc Merge serg.mylan:/usr/home/serg/Abk/mysql-5.0 2005-02-18 12:02:46 +01:00
sql_lex.h Merge serg.mylan:/usr/home/serg/Abk/mysql-5.0 2005-02-17 14:00:44 +01:00
sql_list.cc
sql_list.h Merge with 4.1 2005-02-15 17:12:13 +02:00
sql_load.cc Remove compiler warnings and remove not used variables 2005-02-25 16:53:22 +02:00
sql_manager.cc
sql_manager.h
sql_map.cc A fix (mysql_priv.h should be included first) 2005-02-24 12:17:59 +04:00
sql_map.h
sql_olap.cc post-merge fix 2004-11-25 02:23:13 +02:00
sql_parse.cc Fixes while during review of last pull 2005-02-26 12:19:02 +02:00
sql_prepare.cc Remove compiler warnings and remove not used variables 2005-02-25 16:53:22 +02:00
sql_rename.cc First stage of table definition cache 2005-01-06 13:00:13 +02:00
sql_repl.cc Review of new pushed code (XA & other) 2005-02-21 14:47:57 +02:00
sql_repl.h manually merged 2005-02-14 21:50:09 +01:00
sql_select.cc Merge with global tree 2005-02-25 17:12:06 +02:00
sql_select.h Merge with global tree 2004-12-19 20:25:19 +02:00
sql_show.cc Remove compiler warnings and remove not used variables 2005-02-25 16:53:22 +02:00
sql_sort.h
sql_state.c
sql_string.cc Add support for up to VARCHAR (size up to 65535) 2004-12-06 02:00:37 +02:00
sql_string.h Fixing failing -debug build. 2005-02-15 22:06:55 +03:00
sql_table.cc Remove compiler warnings and remove not used variables 2005-02-25 16:53:22 +02:00
sql_test.cc Fixed Bug#8042, "mysqld crashes on sighup". 2005-02-17 14:07:28 +02:00
sql_trigger.cc manually merged 2005-02-14 21:50:09 +01:00
sql_trigger.h Fix for bug #5888 "Triggers with nonexistent columns cause packets 2004-11-24 12:24:02 +03:00
sql_udf.cc First stage of table definition cache 2005-01-06 13:00:13 +02:00
sql_udf.h Precision Math implementation 2005-02-09 02:50:45 +04:00
sql_union.cc Remove compiler warnings and remove not used variables 2005-02-25 16:53:22 +02:00
sql_update.cc Remove compiler warnings and remove not used variables 2005-02-25 16:53:22 +02:00
sql_view.cc Merge 2005-02-09 00:31:56 +02:00
sql_view.h post-merge fix 2004-11-25 02:23:13 +02:00
sql_yacc.yy Merge svojtovich@bk-internal.mysql.com:/home/bk/mysql-5.0 2005-02-27 13:33:20 +04:00
stacktrace.c Merge with 4.0 for 4.1 release 2004-10-06 19:14:33 +03:00
stacktrace.h
strfunc.cc Remove compiler warnings and remove not used variables 2005-02-25 16:53:22 +02:00
structs.h Manual merge of patch implementing WL#1339 with main tree. 2004-12-29 22:35:16 +03:00
table.cc Fixes while during review of last pull 2005-02-26 12:19:02 +02:00
table.h Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.0 2005-02-07 11:57:14 +03:00
thr_malloc.cc Simpler arena swapping code 2004-11-08 01:13:54 +02:00
time.cc Fix for bug #7297 "Two digit year should be interpreted correctly 2004-12-16 16:31:50 +03:00
tzfile.h
tztime.cc Manual merge of fixes for bugs #7899 "CREATE TABLE .. SELECT .. and 2005-01-28 10:22:50 +03:00
tztime.h Merge with global tree 2004-12-31 00:50:30 +02:00
udf_example.cc Merge with 4.1 2004-12-22 13:54:39 +02:00
uniques.cc
unireg.cc First stage of table definition cache 2005-01-06 13:00:13 +02:00
unireg.h Merge with 4.1 to get bug fix 2005-02-07 19:42:03 +02:00
watchdog_mysqld