Make sqlite table modification with thread safe.