• unknown's avatar
    Fixed BUG#11529: crash server after use stored procedure · a95bb38a
    unknown authored
    Make sure to cleanup the items for a cursor query after each open, otherwise
    it's done too late, after the run-time mem_root is freed.
    
    
    mysql-test/r/sp.result:
      New test case for BUG#11529.
    mysql-test/t/sp.test:
      New test case for BUG#11529.
    sql/sp_head.cc:
      Add a back pointer from a sp_cursor to its cpush instruction, and use it to set
      the arena and cleanup the items for the cursor's query when opening it.
    sql/sp_rcontext.cc:
      Store pointer in sp_cursor to its cpush instruction.
    sql/sp_rcontext.h:
      Store pointer in sp_cursor to its cpush instruction.
    a95bb38a
sp_rcontext.h 4.85 KB