• unknown's avatar
    Bug#9112 - Merge table with composite index producing invalid results with some queries · 674c8165
    unknown authored
    The problem was an ab-use of last_rkey_length.
    Formerly we saved the packed key length (of the search key)
    in this element. But in certain cases it got replaced by 
    the (packed) result key length.
    Now we use a new element of MI_INFO to save the packed key 
    length of the search key.
    
    
    myisam/mi_dbug.c:
      Bug#9112 - Merge table with composite index producing invalid results with some queries
      Fixed the recognition of NULL values in _mi_print_key().
    myisam/mi_rkey.c:
      Bug#9112 - Merge table with composite index producing invalid results with some queries
      Saved the packed key length in a new element of MI_INFO.
    myisam/mi_search.c:
      Bug#9112 - Merge table with composite index producing invalid results with some queries
      Added a comment and trace prints.
    myisam/myisamdef.h:
      Bug#9112 - Merge table with composite index producing invalid results with some queries
      Added a new element to store the packed key length
      for use by the MyISAMMRG engine.
    myisammrg/myrg_rkey.c:
      Bug#9112 - Merge table with composite index producing invalid results with some queries
      Changed to use the new element of MI_INFO to get at the
      packed key length.
    mysql-test/r/merge.result:
      Bug#9112 - Merge table with composite index producing invalid results with some queries
      The test result.
    mysql-test/t/merge.test:
      Bug#9112 - Merge table with composite index producing invalid results with some queries
      The test case.
    674c8165
merge.test 10.1 KB