Added flow control to mysql initialization, changed some ouput messages.
Added functionality and tests to prepare Update SQL queries, and added tests for cached queries.