• unknown's avatar
    Fix for bug #33758: Got query result when using ORDER BY ASC, but · 863b86db
    unknown authored
    empty result when using DESC
    
    Problem: fetching MyISAM keys we copy a key block pointer to the end of the key buffer.
    However, we don't take into account the pointer length calculatig the buffer size,
    that may leads to memory overwriting and in turn to unpredictable results.
    
    Fix: increase key buffer size by length of the key block pointer.
    
    Note: no simple test case.
    
    
    myisam/mi_open.c:
      Fix for bug #33758: Got query result when using ORDER BY ASC, but 
      empty result when using DESC
        - increase possible maximum key length by size of the key block pointer,
          as it's copied into the key buffer in the get_key() MyISAM functions.
    863b86db
mi_open.c 41.3 KB