• Magne Mahre's avatar
    Bug#58199 name_const in the having clause crashes · 4aeee64f
    Magne Mahre authored
          
    NAME_CONST(..) was used wrongly in a HAVING clause, and
    should have caused a user error.  Instead, it caused a
    segmentation fault.
          
    During parsing, the value parameter to NAME_CONST was
    specified to be an uninitialized Item_ref object (it
    would be resolved later).   During the semantic analysis,
    the object is tested, and since it was not initialied,
    the server seg.faulted.
          
    The fix is to check if the object is initialized
    before testing it.  The same pattern has already been
    applied to most other methods in the Item_ref class.
          
    Bug was introduced by the optimization done as part of
    Bug#33546.
    4aeee64f
func_misc.test 16 KB