removed unlock tables query