bug #4604 Query history not being deleted

Signed-off-by: Marc Delisle <marc@infomarc.info>
Merge branch 'QA_4_2' into QA_4_3