The following error was encountered while bootstrapping a new table with the MySQLConnector.
When a new table is detected, a ChainedReader is instantiated. The ChainedReader will included a UnifiedReader, which is instantiated but not used until bootstrapping is completed (i.e. last reader in the chain). However, the instantiation of the UnifiedReader requires establishing a connection via jdbc ( to get lower_case_table_names variable from MySQL). This connection is held on while bootstrapping is happening, and at the end of the bootstrap when another query is executed, it throws the above-mentioned error due to wait_timeout.
The proposed solution is that when establishing jdbc connection, check if connection is closed, and create a new connection if existing one is closed.