mariadb/sql
gkodinov/kgeorge@macbook.gmz 0e954d2c1a Bug #22342: No results returned for query using max and group by
When using index for group by and range access the server isolates    
 a set of ranges based on the conditions over the key parts of the
 index used. Then it uses only the ranges over the GROUP BY fields to
 jump from one group to another. Since the GROUP BY fields may form a
 prefix over the index, we may use only a prefix of the ranges produced
 by the range optimizer.
 Each range contains a notion on whether it includes its border values.
 The problem is that when using a range prefix, the last range is open
 because it assumes that there is a range on the next keypart. Thus when
 we use a prefix range as it is, it excludes all border values.
 The solution is when ignoring the suffix of the range conditions 
 (to jump over the GROUP BY prefix only) the server must change the 
 remaining intervals so they always contain their borders, e.g. 
 if the whole range was :
 (1,-inf) <= (<group_by_col>,<min_max_arg_col>) < (1, 3) we must make
 (1) <= (<group_by_col>) <= (1) because (a,b) < (c1,c2) means :
 a < c1 OR (a = c1 AND b < c2).
2006-10-16 19:30:19 +03:00
..
examples Additional files for cmake support 2006-08-31 19:52:42 +02:00
share Merge bk-internal.mysql.com:/home/bk/mysql-5.0 2006-08-30 00:45:33 +04:00
.cvsignore
add_errmsg
client_settings.h
CMakeLists.txt Additional files for cmake support 2006-08-31 19:52:42 +02:00
custom_conf.h
derror.cc
des_key_file.cc Many files: 2005-09-30 14:03:55 +02:00
discover.cc
field.cc Merge bk-internal.mysql.com:/home/bk/mysql-5.0 2006-08-30 00:45:33 +04:00
field.h Merge rurik.mysql.com:/home/igor/mysql-4.1-opt 2006-09-20 09:47:36 -07:00
field_conv.cc Bug#17226: Variable set in cursor on first iteration is assigned 2006-06-30 18:14:22 +04:00
filesort.cc Fixed bug #22015: crash with GROUP_CONCAT over a derived table 2006-09-20 08:08:57 -07:00
frm_crypt.cc
gen_lex_hash.cc Merge zippy.cornsilk.net:/home/cmiller/work/mysql/merge/mysql-5.0-maint-gca 2006-08-23 18:37:04 -04:00
gstream.cc fixes for windows 64-bit compiler warnings 2005-06-13 12:41:15 +02:00
gstream.h
ha_archive.cc Fixes for crashes and test failures 2006-09-01 14:34:37 +02:00
ha_archive.h Dean noticed that constant flush calls caused the archive stream file to flush empty buffers. This patch removes that behavior. 2006-04-20 18:23:04 -07:00
ha_berkeley.cc BUG#6554 Problem Building MySql on Fedora Core 3 2006-01-16 12:17:30 +01:00
ha_berkeley.h Fixes during review of new code 2005-11-03 22:42:25 +02:00
ha_blackhole.cc Revoking patch for Bug#10952 on behalf of Brian. 2006-07-10 20:46:05 +02:00
ha_blackhole.h Merge a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-4.1 2005-08-26 15:56:52 +03:00
ha_federated.cc autopush test - sorry for the commit messages, ignore 2006-08-09 17:41:35 -07:00
ha_federated.h BUG #15133 "unique index with nullable value not accepted in federated table" 2006-07-25 18:38:09 -04:00
ha_heap.cc Manual merge 2006-03-30 17:14:55 +04:00
ha_heap.h Merge mysql.com:/opt/local/work/mysql-4.1-root 2006-02-02 18:17:18 +03:00
ha_innodb.cc innodb r702 2006-08-18 14:16:11 +02:00
ha_innodb.h foo2 2006-04-13 17:22:56 +09:30
ha_myisam.cc bug #15860 (SPATIAL keys in INNODB) 2006-04-12 22:05:23 +05:00
ha_myisam.h A fix and a test case for Bug#10760 and complementary cleanups. 2005-07-19 22:21:12 +04:00
ha_myisammrg.cc Merge bk-internal:/home/bk/mysql-5.0-engines 2006-07-18 10:25:04 -07:00
ha_myisammrg.h Bug#19648 2006-05-30 17:10:53 -07:00
ha_ndbcluster.cc Fix for BUG#11151 "LOAD DATA INFILE commits transaction in 5.0". 2006-09-05 16:52:05 +02:00
ha_ndbcluster.h Fix for bug #21059 Server crashes on join query with large dataset with NDB tables: do not release operation records for on-going read_multi_range 2006-08-15 14:31:21 +02:00
handler.cc Merge bk://anubis/mysql-5.0-engines 2006-07-21 10:14:25 -07:00
handler.h Merge dl145k.mysql.com:/data0/mkindahl/bkroot/mysql-5.0 2006-07-12 10:05:55 +02:00
hash_filo.cc a compiler must see '#pragma implementation' *before* 2005-06-05 19:38:52 +02:00
hash_filo.h forgotten s/__GNUC__/USE_PRAGMA_INTERFACE/ causes compilation faliures 2005-05-27 14:15:08 +02:00
hostname.cc Merge mysql.com:/usr/home/ram/work/mysql-4.1 2006-03-03 15:32:00 +04:00
init.cc Fixes during review of new pushed code 2005-08-12 13:54:42 +03:00
item.cc Merge dl145s.mysql.com:/data/bk/team_tree_merge/CLEAN/mysql-5.0 2006-09-15 11:52:49 +02:00
item.h Merge dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-4.1-opt 2006-09-15 14:14:38 +02:00
item_buff.cc Fix for bug#19667 group by a decimal expression yields wrong result 2006-06-15 16:24:02 +05:00
item_cmpfunc.cc merge fixes 2006-09-18 12:14:27 +02:00
item_cmpfunc.h Merge polly.local:/tmp/20924/bug20294/my50-bug20294 2006-09-13 16:06:59 +04:00
item_create.cc Bug#16172 DECIMAL data type processed incorrectly 2006-08-08 14:40:07 +05:00
item_create.h Bug#20570: CURRENT_USER() in a VIEW with SQL SECURITY DEFINER returns 2006-07-02 14:35:45 +04:00
item_func.cc Merge bk-internal:/home/bk/mysql-5.0 2006-09-18 19:01:07 +04:00
item_func.h Merge bk-internal:/home/bk/mysql-5.0 2006-09-18 19:01:07 +04:00
item_geofunc.cc bug #14807 (GeomFromText() should return MYSQL_TYPE_GEOMETRY) 2006-07-04 12:56:53 +05:00
item_geofunc.h Merge mysql.com:/home/mydev/mysql-4.1-bug14400 2006-07-05 11:20:10 +02:00
item_row.cc BUG#21166: Prepared statement causes signal 11 on second execution 2006-08-24 15:49:12 +04:00
item_row.h Merge mysql.com:/opt/local/work/mysql-4.1-16365 2006-04-12 18:30:54 +04:00
item_strfunc.cc Merge maint1.mysql.com:/data/localhome/cmiller/bug15583/my50-bug15583 2006-09-13 15:07:06 +02:00
item_strfunc.h Merge shellback.(none):/home/msvensson/mysql/mysql-5.0 2006-08-31 11:57:36 +02:00
item_subselect.cc BUG#16255: Merge to 5.0 2006-08-24 20:56:28 +04:00
item_subselect.h Merge mysql.com:/home/psergey/mysql-4.1-opt 2006-07-21 23:45:34 +04:00
item_sum.cc Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt 2006-09-19 19:18:52 +03:00
item_sum.h Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0-maint 2006-07-23 12:58:26 +05:00
item_timefunc.cc Merge salvation.intern.azundris.com:/home/tnurnberg/work/mysql-4.1-maint-20987 2006-08-22 14:03:52 +02:00
item_timefunc.h Manually merged 2006-06-17 02:11:12 +04:00
item_uniq.cc Merge with 4.1 2005-06-07 00:31:53 +03:00
item_uniq.h Inefficient usage of String::append() fixed. 2005-11-20 20:47:07 +02:00
key.cc Bug #13601: Wrong int type for bit 2006-04-04 17:54:58 -07:00
lex.h Fixed BUG#18949: Test case sp-goto is disabled 2006-04-18 11:07:34 +02:00
lex_symbol.h
lock.cc Fix for bug#21216 "Simultaneous DROP TABLE and SHOW OPEN TABLES causes 2006-08-21 12:18:59 +04:00
log.cc Merge perch.ndb.mysql.com:/home/jonas/src/41-work 2006-09-04 14:45:13 +02:00
log_event.cc Fixed the faulty merge 2006-09-13 19:32:21 +04:00
log_event.h Bug #16206: Superfluous COMMIT event in binlog when updating BDB in autocommit 2006-06-12 08:54:45 -04:00
Makefile.am make dist changes for Cmake build 2006-09-01 10:32:12 +02:00
matherr.c
message.mc make dist changes for Cmake build 2006-09-01 10:32:12 +02:00
mf_iocache.cc
my_decimal.cc Fix for bug #13573 (wrong data inserted for too big decimals) 2005-10-15 21:57:32 +05:00
my_decimal.h Fix for bug #13573 (wrong data inserted for too big decimals) 2005-10-15 21:57:32 +05:00
my_lock.c
mysql_priv.h Merge dl145s.mysql.com:/data/bk/team_tree_merge/CLEAN/mysql-5.0 2006-09-15 11:52:49 +02:00
mysqld.cc Use the enum/define SHUT_RDWR instead of heardcoded "2" to shutdown 2006-09-15 14:27:45 +02:00
mysqld_suffix.h
net_serv.cc Merge maint2.mysql.com:/data/localhome/tsmith/bk/41 2006-09-01 08:53:56 +02:00
nt_servc.cc
nt_servc.h
opt_range.cc Bug #22342: No results returned for query using max and group by 2006-10-16 19:30:19 +03:00
opt_range.h Bug #22342: No results returned for query using max and group by 2006-10-16 19:30:19 +03:00
opt_sum.cc Merge macbook.gmz:/Users/kgeorge/mysql/work/B16792-4.1-opt 2006-09-05 17:09:12 +03:00
parse_file.cc Fix for BUG#15921: DROP TRIGGER - can't be drop trigger created 2006-03-28 01:01:51 +04:00
parse_file.h Fix for BUG#15921: DROP TRIGGER - can't be drop trigger created 2006-03-28 01:01:51 +04:00
password.c Merge mysql.com:/opt/local/work/mysql-4.1-root 2006-01-11 17:49:56 +03:00
procedure.cc Merge with 4.1 2005-06-07 00:31:53 +03:00
procedure.h Merge neptunus.(none):/home/msvensson/mysql/bug10241 2005-05-09 11:26:48 +02:00
protocol.cc Bug#8153 (Stored procedure with subquery and continue handler, wrong result) 2006-08-22 18:58:14 -07:00
protocol.h Fixes to embedded server to be able to run tests with it 2006-02-24 18:34:15 +02:00
records.cc Merge ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-4.1 2005-10-27 23:43:20 +03:00
repl_failsafe.cc Bug #18607: LOAD DATA FROM MASTER fails because of INFORMATION_SCHEMA database 2006-04-21 18:26:39 -07:00
repl_failsafe.h pthread_handler_decl() changed to be ctags-friendly 2005-10-08 16:39:55 +02:00
set_var.cc Merge maint2.mysql.com:/data/localhome/tsmith/bk/41 2006-09-01 03:44:03 +02:00
set_var.h A post-merge fix. 2006-07-08 04:07:43 +04:00
slave.cc Manual merge 2006-08-23 15:46:57 -06:00
slave.h after merge fix 2006-09-08 16:16:39 +05:00
sp.cc after merge fix 2006-09-07 18:09:49 +05:00
sp.h A fix and a test case for 2006-06-27 00:47:52 +04:00
sp_cache.cc Fix use of "%*s" *printf() specifiers that were really meant to be 2005-10-06 17:37:24 -07:00
sp_cache.h BUG#12228: Post review fixes: Added test case, code cleanup. 2005-08-10 21:17:02 +00:00
sp_head.cc after merge fix 2006-09-07 18:09:49 +05:00
sp_head.h Fix for bug#21795: SP: sp_head::is_not_allowed_in_function() contains 2006-08-25 15:51:29 +02:00
sp_pcontext.cc Fixed BUG#18949: Test case sp-goto is disabled 2006-04-18 11:07:34 +02:00
sp_pcontext.h Fixed BUG#18949: Test case sp-goto is disabled 2006-04-18 11:07:34 +02:00
sp_rcontext.cc Bug#8153 (Stored procedure with subquery and continue handler, wrong result) 2006-08-02 22:18:49 -07:00
sp_rcontext.h Bug#8153 (Stored procedure with subquery and continue handler, wrong result) 2006-08-02 22:18:49 -07:00
spatial.cc Merge sanja.is.com.ua:/home/bell/mysql/bk/work-bug1-5.0 2005-11-21 21:15:48 +02:00
spatial.h gcc 4.1 linux warning fixes backported from 5.0. 2006-06-28 16:28:29 +03:00
sql_acl.cc after merge fix 2006-09-07 18:09:49 +05:00
sql_acl.h Reapply fix for bug#16372 (Server crashes when test 'conc_sys' is running) 2006-05-06 11:25:59 +04:00
sql_analyse.cc Porting fix that allows others to include compiled code with different parsers. 2006-03-09 10:09:52 -08:00
sql_analyse.h Merge from 4.1 2005-05-26 21:01:55 +02:00
sql_array.h Fix for BUG#12335 (SP replication) : New binlogging strategy for stored PROCEDUREs/FUNCTIONs. 2005-08-25 17:34:34 +04:00
sql_base.cc Fix for BUG#21774: Column count doesn't match value count at row x 2006-09-12 17:50:24 +03:00
sql_bitmap.h Bug#10932 - Building server with key limit of 128, makes test cases fail 2005-07-19 14:13:56 +02:00
sql_cache.cc BUG#21051: RESET QUERY CACHE very slow when query_cache_type=0 2006-08-22 11:47:52 +04:00
sql_cache.h BUG#21051: RESET QUERY CACHE very slow when query_cache_type=0 2006-08-22 11:47:52 +04:00
sql_class.cc Merge bk-internal.mysql.com:/home/bk/mysql-5.0 2006-08-30 00:45:33 +04:00
sql_class.h Fixed the faulty merge 2006-09-13 19:32:21 +04:00
sql_client.cc
sql_crypt.cc a compiler must see '#pragma implementation' *before* 2005-06-05 19:38:52 +02:00
sql_crypt.h Add ifdefs to control when "#pragma implementation" should be used 2005-05-26 12:09:14 +02:00
sql_cursor.cc Fixed BUG#15758: "Holding adaptive search latch in 2006-04-07 23:58:17 +04:00
sql_cursor.h A fix and a test case for Bug#6513 "Test Suite: Values inserted by using 2005-09-22 02:11:21 +04:00
sql_db.cc Fix for BUG#16211: Stored function return type for strings is ignored. 2006-07-27 17:57:43 +04:00
sql_delete.cc Fixed bug #21493: crash for the second execution of a function 2006-09-16 09:50:48 -07:00
sql_derived.cc support of view underlying tables and SP functions security check added (BUG#9505) (WL#2787) 2005-10-28 00:18:23 +03:00
sql_do.cc Name resolution context added (BUG#6443) 2005-07-01 07:05:42 +03:00
sql_error.cc Bug#8153 (Stored procedure with subquery and continue handler, wrong result) 2006-08-02 22:18:49 -07:00
sql_error.h
sql_handler.cc Bug#16986 - Deadlock condition with MyISAM tables 2006-06-26 19:14:35 +02:00
sql_help.cc many warnings (practically safe but annoying) corrected 2006-01-03 17:54:54 +01:00
sql_insert.cc Merge bk-internal:/home/bk/mysql-5.0-opt 2006-09-18 12:20:20 +02:00
sql_lex.cc Merge bk-internal:/home/bk/mysql-5.0-opt 2006-09-18 12:20:20 +02:00
sql_lex.h Merge bk-internal:/home/bk/mysql-5.0-opt 2006-09-18 12:20:20 +02:00
sql_list.cc a compiler must see '#pragma implementation' *before* 2005-06-05 19:38:52 +02:00
sql_list.h Fixed bug #16081: row equalities were not taken into 2006-09-01 04:23:04 -07:00
sql_load.cc Fix for BUG#11151 "LOAD DATA INFILE commits transaction in 5.0". 2006-09-05 16:52:05 +02:00
sql_locale.cc Fix compile errors in VC++ 7.0 2006-08-21 16:21:48 +04:00
sql_manager.cc Merge bk-internal.mysql.com:/home/bk/mysql-5.0 2005-10-12 00:59:52 +03:00
sql_manager.h
sql_map.cc WL#2286 - Compile MySQL w/YASSL support 2005-06-22 14:08:28 +05:00
sql_map.h Add ifdefs to control when "#pragma implementation" should be used 2005-05-26 12:09:14 +02:00
sql_olap.cc Implementation of WL#2486 - 2005-08-12 17:57:19 +03:00
sql_parse.cc Merge dl145s.mysql.com:/data/bk/team_tree_merge/CLEAN/mysql-5.0 2006-09-15 11:52:49 +02:00
sql_prepare.cc Bug#21813 An attacker has the opportunity to bypass query logging, part2 2006-08-30 17:11:00 +02:00
sql_rename.cc Fix for bug #13525 "Rename table does not keep info of triggers". 2006-02-24 23:50:36 +03:00
sql_repl.cc Merge perch.ndb.mysql.com:/home/jonas/src/41-work 2006-09-04 13:46:56 +02:00
sql_repl.h after merge fix 2006-09-07 18:09:49 +05:00
sql_select.cc Merge bk-internal:/home/bk/mysql-5.0-opt 2006-09-18 12:20:20 +02:00
sql_select.h gcc 4.1 linux warning fixes backported from 5.0. 2006-06-28 16:28:29 +03:00
sql_show.cc bug #20910 (NOT NULL reported as NULL for TIMESTAMP) 2006-08-08 13:34:27 +05:00
sql_sort.h
sql_state.c
sql_string.cc Merge salvation.intern.azundris.com:/home/tnurnberg/21913/my41-21913 2006-09-04 07:01:15 +02:00
sql_string.h Bug#19006: 4.0 valgrind problems (in test func_str) 2006-07-01 14:31:52 -04:00
sql_table.cc Merge maint2.mysql.com:/data/localhome/tsmith/bk/41 2006-09-01 08:53:56 +02:00
sql_test.cc Post-review changes. 2006-05-03 21:35:27 -07:00
sql_trigger.cc Polishing (was the part of original patch for BUG#16899): 2006-08-24 18:48:26 +04:00
sql_trigger.h Polishing (was the part of original patch for BUG#16899): 2006-08-24 18:48:26 +04:00
sql_udf.cc Merge bk-internal:/home/bk/mysql-5.0-maint 2006-07-18 09:32:49 +02:00
sql_udf.h Fix compiler warnings in sql_udf.h: ISO C++ forbids casting 2006-07-09 13:03:51 +04:00
sql_union.cc Post merge fixes 2006-04-21 08:19:38 -07:00
sql_update.cc Fixed bug #21493: crash for the second execution of a function 2006-09-16 09:50:48 -07:00
sql_view.cc Merge bk-internal.mysql.com:/home/bk/mysql-5.0 2006-08-30 00:45:33 +04:00
sql_view.h sql_base.cc, unireg.h, sql_lex.h, table.cc, sql_view.h, sql_view.cc: 2006-08-09 00:05:42 +04:00
sql_yacc.yy Merge dl145s.mysql.com:/data/bk/team_tree_merge/CLEAN/mysql-5.0 2006-09-15 11:52:49 +02:00
stacktrace.c Merge maint1.mysql.com:/data/localhome/tsmith/bk/bfx/my41-bfx 2006-09-07 00:59:08 +02:00
stacktrace.h Merge maint1.mysql.com:/data/localhome/tsmith/bk/bfx/my41-bfx 2006-09-07 00:59:08 +02:00
strfunc.cc
structs.h Manually merged 2006-06-14 23:54:08 +04:00
table.cc Merge mysql.com:/home/gluh/MySQL/Merge/4.1-merge 2006-09-07 15:17:46 +05:00
table.h Merge bk-internal.mysql.com:/data0/bk/mysql-5.0 2006-08-03 16:54:06 +02:00
thr_malloc.cc
time.cc Bug#20729: Bad date_format() call makes mysql server crash 2006-07-11 13:06:29 -04:00
tzfile.h
tztime.cc A fix and a test case for 2006-06-27 00:47:52 +04:00
tztime.h Fix for bug#11081 "Using a CONVERT_TZ function in a stored function or 2006-04-24 18:57:00 +04:00
udf_example.c Fix a compilation failiure on QNX 2006-08-02 13:25:13 +04:00
uniques.cc many warnings (practically safe but annoying) corrected 2006-01-03 17:54:54 +01:00
unireg.cc Merge rurik.mysql.com:/home/igor/mysql-4.1-opt 2006-09-20 09:47:36 -07:00
unireg.h sql_base.cc, unireg.h, sql_lex.h, table.cc, sql_view.h, sql_view.cc: 2006-08-09 00:05:42 +04:00
watchdog_mysqld