--sourceinclude/have_debug.inc## Bug #37627: Killing query with sum(exists()) or avg(exists()) reproducibly# crashes server#CREATETABLEt1(idINT);INSERTINTOt1VALUES(1),(2),(3),(4);INSERTINTOt1SELECTa.idFROMt1a,t1b,t1c,t1d;# Setup the mysqld to crash at certain pointSET@orig_debug=@@debug;SETSESSIONdebug="d,subselect_exec_fail";SELECTSUM(EXISTS(SELECTRAND()FROMt1))FROMt1;SELECTREVERSE(EXISTS(SELECTRAND()FROMt1));SETSESSIONdebug=@orig_debug;DROPTABLEt1;