• unknown's avatar
    Fixed BUG#18787: Server crashed when calling a stored procedure containing · 9381c8a0
    unknown authored
                     a misnamed function
      ... in the presence of a continue handler. The problem was that with a
      handler, it continued to execute as if function existed and had set a
      useful return value (which it hadn't).
      The fix is to set a null return value and do an error return when a function
      wasn't found.
    
    
    mysql-test/r/sp.result:
      Updated results for a new test case (BUG#18787).
    mysql-test/t/sp.test:
      New testcase for BUG#18787.
    sql/item_func.cc:
      Don't set "out of resources" error in Item_func_sp::execute() if no
      result field is returned, it's simply wrong, it can be sometthing else,
      like a function not found. Instead set null_value and return error.
      Also, set "out of resources" when field creation fails in
      Item_func_sp::sp_result_field() and Item_func_sp::tmp_table_field().
    9381c8a0
sp.test 119 KB