• Sergey Glukhov's avatar
    Fix for bug #54575: crash when joining tables with unique set column(backport from 5.1) · 0a29baba
    Sergey Glukhov authored
    Problem: a flaw (derefencing a NULL pointer) in the LIKE optimization
    code may lead to a server crash in some rare cases.
    
    Fix: check the pointer before its dereferencing.
    
    
    mysql-test/r/func_like.result:
      Fix for bug #54575: crash when joining tables with unique set column
        - test result.
    mysql-test/t/func_like.test:
      Fix for bug #54575: crash when joining tables with unique set column
        - test case.
    sql/item_cmpfunc.cc:
      Fix for bug #54575: crash when joining tables with unique set column
      - check res2 buffer pointer before its dereferencing 
        as it may be NULL in some cases.
    0a29baba
func_like.test 3.54 KB