Worked around logging error when LOCK TABLES is used.