bug #3998 Non-permanent SQL history not working