mariadb/myisammrg
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
..
.cvsignore Import changeset 2000-07-31 21:29:14 +02:00
make-ccc Import changeset 2000-07-31 21:29:14 +02:00
Makefile.am Makefile.am: 2005-07-05 23:24:48 +02:00
myrg_close.c Update copyright 2001-12-06 14:10:51 +02:00
myrg_create.c Fixes for bugs reported by Stefano Di Paola (stefano.dipaola@wisec.it) 2005-03-03 19:51:29 +01:00
myrg_def.h replace mi_rrnd() in myrg_rkey family to more intelligent (HA_KEYREAD-aware) read function 2003-08-01 14:58:03 +02:00
myrg_delete.c Indentation cleanup & new comments 2002-06-28 09:18:23 +03:00
myrg_extra.c Fix to remove compiler warnings 2003-04-28 19:05:57 +03:00
myrg_info.c ANALYZE for MERGE 2002-12-10 00:06:05 +01:00
myrg_locking.c do not crash on myrg_rprev/myrg_rnext if no current table 2002-06-25 16:32:16 +02:00
myrg_open.c Merge mysql.com:/home/svoj/devel/bk/mysql-4.1-engines 2006-09-28 22:14:31 +05:00
myrg_panic.c Update copyright 2001-12-06 14:10:51 +02:00
myrg_queue.c BUG#21617 - crash when selecting from merge table with inconsistent indexes 2006-09-28 22:10:06 +05:00
myrg_range.c key_cmp -> key_cmp_if_same 2004-05-16 14:48:32 +03:00
myrg_rfirst.c replace mi_rrnd() in myrg_rkey family to more intelligent (HA_KEYREAD-aware) read function 2003-08-01 14:58:03 +02:00
myrg_rkey.c BUG#24342 - Incorrect results with query over MERGE table 2007-04-11 01:40:35 +05:00
myrg_rlast.c replace mi_rrnd() in myrg_rkey family to more intelligent (HA_KEYREAD-aware) read function 2003-08-01 14:58:03 +02:00
myrg_rnext.c replace mi_rrnd() in myrg_rkey family to more intelligent (HA_KEYREAD-aware) read function 2003-08-01 14:58:03 +02:00
myrg_rnext_same.c Fix and testcase for BUG#6699 2004-11-29 06:51:30 +03:00
myrg_rprev.c replace mi_rrnd() in myrg_rkey family to more intelligent (HA_KEYREAD-aware) read function 2003-08-01 14:58:03 +02:00
myrg_rrnd.c New SET syntax & system variables. 2002-07-23 18:31:22 +03:00
myrg_rsame.c Indentation cleanup & new comments 2002-06-28 09:18:23 +03:00
myrg_static.c Fixed compiler warnings 2005-07-28 21:25:05 +03:00
myrg_update.c Indentation cleanup & new comments 2002-06-28 09:18:23 +03:00
myrg_write.c bug#4008 - merge table cannot determine what key caused "dupl. key" error 2004-06-25 15:12:13 +02:00