Fixed missing return in process_pollq and added mysql.h to get rid of
warning about mysql_thread calls
Performance improvement