Fixed problems in Windows when locking tables with LOCK TABLE.
Quicker kill of SELECT DISTINCT queries.