mariadb/myisam
unknown 6866ca008c BUG#24342 - Incorrect results with query over MERGE table
MERGE engine may return incorrect values when several representations
of equal keys are present in the index. For example "groß" and "gross"
or "gross" and "gross " (trailing space), which are considered equal,
but have different lengths.

The problem was that key length was not recalculated after key lookup.

Only MERGE engine is affected.


myisam/mi_rkey.c:
  info->lastkey gets rewritten by mi_search. Later we recalculate found lastkey
  length. This is done to make sure that mi_rnext_same gets true, found (not
  searched) lastkey length. Searched and found key lengths may be different,
  for example in case searched key is "groß" and found is "gross" or in case
  a key has trailing spaces.
  
  Unfortunately we recalculate found lastkey length only for first
  underlying table. To recalculate found key length for non-first underlying
  table we need to know how much key segments were used to create this key.
  
  When mi_rkey is called for first underlying table of a merge table, store
  offset to last used key segment.
  
  Restore last_used_keyseg variable when mi_rkey is called for non-first
  underlying table.
myisam/myisamdef.h:
  Added last_used_keyseg variable to MI_INFO. It is used by merge engine to calculate
  key length.
myisammrg/myrg_rkey.c:
  Pass last used key segment returned by first table key read to other
  table key reads.
mysql-test/r/merge.result:
  A test case for bug#24342.
mysql-test/t/merge.test:
  A test case for bug#24342.
2007-04-11 01:40:35 +05:00
..
ftbench ftbench fixes 2003-10-23 23:33:06 +02:00
.cvsignore
ChangeLog
ft_boolean_search.c Fixed compiler warnings 2005-07-28 21:25:05 +03:00
ft_eval.c
ft_eval.h
ft_nlq_search.c Fix for BUG#13582. Theoretically possible to try to overallocate RAM in some fulltext queries. 2005-09-28 19:03:35 -05:00
ft_parser.c followup for for the bug#5686 2005-11-26 19:36:11 +01:00
ft_static.c indexless boolean fulltext search was depending on default_charset_info - Bug#8159 2005-02-04 15:24:06 +01:00
ft_stem.c
ft_stopwords.c Fix for the bug #7344 (multiple server_init/server_end lead to crash) 2005-02-18 15:51:55 +04:00
ft_test1.c
ft_test1.h
ft_update.c BUG#16489 - utf8 + fulltext leads to corrupt index file. 2006-01-23 17:15:33 +04:00
ftdefs.h indexless boolean fulltext search was depending on default_charset_info - Bug#8159 2005-02-04 15:24:06 +01:00
fulltext.h ft1->ft2 auto-conversion on INSERT (WL#725) 2003-10-02 20:22:29 +02:00
make-ccc
Makefile.am Makefile.am: 2005-07-05 23:24:48 +02:00
mi_cache.c enadling out-of-cache reads for shared IO_CACHE 2003-01-26 14:20:43 +01:00
mi_changed.c
mi_check.c Bug#22119 - Changing MI_KEY_BLOCK_LENGTH makes a wrong myisamchk 2006-10-25 13:39:40 +02:00
mi_checksum.c CLIENT_MULTI_QUERIES -> CLIENT_MULTI_STATEMENTS 2003-11-18 13:47:27 +02:00
mi_close.c Merge with 4.0 for 4.1 release 2004-10-06 19:14:33 +03:00
mi_create.c BUG#26881 - Large MERGE tables report incorrect specification when no 2007-03-13 18:02:06 +04:00
mi_dbug.c Merge mysql.com:/home/mydev/mysql-4.0-4000 2005-09-23 10:49:08 +02:00
mi_delete.c Merge chilla.local:/home/mydev/mysql-4.0-bug22384 2006-09-28 21:47:42 +02:00
mi_delete_all.c Merge key cache structures to one 2003-11-20 22:06:25 +02:00
mi_delete_table.c Bug#11824 - internal /tmp/*.{MYD,MYI} files remain, causing subsequent queries to fail 2006-06-27 11:26:41 +02:00
mi_dynrec.c BUG#23196 - MySQL server does not exit / shutdown when 2006-12-01 19:11:43 +04:00
mi_extra.c Add test for madvise() being declared in C++ code, because it is not 2005-08-31 10:08:55 -07:00
mi_info.c myisam_data_pointer_size 2004-05-01 15:41:59 +02:00
mi_key.c Bug#22052 Trailing spaces are not removed from UNICODE fields in an index 2006-10-03 14:11:57 +05:00
mi_keycache.c mi_keycache.c: 2003-11-25 22:20:31 -08:00
mi_locking.c Merge mysql.com:/home/my/mysql-4.0 into mysql.com:/home/my/mysql-4.1 2004-10-07 12:51:32 +03:00
mi_log.c Code cleanup 2004-01-19 23:51:17 +01:00
mi_open.c BUG#24401 - MySQL server crashes if you try to retrieve data from 2007-01-22 16:34:58 +04:00
mi_packrec.c Bug#25505 Myisam library compiler error on Windows 2007-01-17 11:51:52 +01:00
mi_page.c Code cleanup 2004-01-19 23:51:17 +01:00
mi_panic.c Merge key cache structures to one 2003-11-20 22:06:25 +02:00
mi_preload.c make LOAD INDEX to work 2005-02-12 00:05:13 +01:00
mi_range.c Bug#26231 - select count(*) on myisam table returns wrong value 2007-03-16 10:28:48 +01:00
mi_rename.c Code cleanup 2004-01-19 23:51:17 +01:00
mi_rfirst.c
mi_rkey.c BUG#24342 - Incorrect results with query over MERGE table 2007-04-11 01:40:35 +05:00
mi_rlast.c
mi_rnext.c Merging 2004-05-27 16:32:49 +05:00
mi_rnext_same.c Bug#14980 - COUNT(*) incorrect on MyISAM table with certain INDEX 2006-03-10 15:03:04 +01:00
mi_rprev.c Fixed many compiler warnings 2004-04-05 13:56:05 +03:00
mi_rrnd.c just tried to find all 'skipp' and replace it with 'skip'. 2004-02-02 20:25:39 +04:00
mi_rsame.c
mi_rsamepos.c
mi_scan.c
mi_search.c Bug#26231 - select count(*) on myisam table returns wrong value 2007-03-16 10:28:48 +01:00
mi_static.c a fix (bug #4214: Table corruption with myisampack and large BLOB objects). 2005-09-05 16:31:42 +05:00
mi_statrec.c just tried to find all 'skipp' and replace it with 'skip'. 2004-02-02 20:25:39 +04:00
mi_test1.c Bug#25213 - Compiler warnings in MyISAM code 2006-12-20 15:32:02 +01:00
mi_test2.c Bug#12920 - key_read_requests counter appears to re-set 2005-09-14 13:18:16 +02:00
mi_test3.c harmless "buffer overflow" fixed 2004-11-24 11:01:54 +01:00
mi_test_all.res Better bug fix for #14400 "Query joins wrong rows from table which is subject of "concurrent insert"" 2006-08-10 22:41:19 +03:00
mi_test_all.sh Better bug fix for #14400 "Query joins wrong rows from table which is subject of "concurrent insert"" 2006-08-10 22:41:19 +03:00
mi_unique.c Fix for bug #20709: Collation not used in group by on 4.1. 2006-08-10 15:06:22 +05:00
mi_update.c BUG#23196 - MySQL server does not exit / shutdown when 2006-12-01 19:11:43 +04:00
mi_write.c Merge svojtovich@bk-internal.mysql.com:/home/bk/mysql-4.1-engines 2006-12-30 02:30:19 +04:00
myisam_ftdump.c myisam_ftdump.c: 2006-04-23 19:26:56 -05:00
myisamchk.c Merge a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-4.0 2005-12-04 15:34:47 +02:00
myisamdef.h BUG#24342 - Incorrect results with query over MERGE table 2007-04-11 01:40:35 +05:00
myisamlog.c Several fixes for Netware. 2005-08-24 22:03:34 +03:00
myisampack.c Merge a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-4.0 2005-12-04 15:34:47 +02:00
NEWS
rt_index.c Bug#25673 - spatial index corruption, error 126 incorrect key file for table 2007-03-09 16:19:42 +01:00
rt_index.h Merging 2004-06-02 19:17:35 +05:00
rt_key.c Bug#25673 - spatial index corruption, error 126 2007-03-08 09:54:37 +01:00
rt_key.h Merging 2004-06-02 19:17:35 +05:00
rt_mbr.c Bug#17877 - Corrupted spatial index 2006-06-28 14:27:37 +02:00
rt_mbr.h Merging 2004-06-02 19:17:35 +05:00
rt_split.c Bug#25673 - spatial index corruption, error 126 2007-03-08 09:54:37 +01:00
rt_test.c Review of all code pushed since last review 2004-10-20 01:28:42 +03:00
sort.c Merge trift2.:/MySQL/M41/clone-4.1 2006-11-10 15:52:53 +01:00
sp_defs.h WL#1163 To make spatial code optional 2004-03-12 18:51:03 +04:00
sp_key.c a fix (bug #10757: gis-rtree.test fails) 2005-05-20 18:48:18 +05:00
sp_test.c Merging 2004-05-27 16:32:49 +05:00
test_pack
TODO