added getlock() method to mysqlwrapper