-
MikkoJaakola authored
galera_toi_truncate test launches a long term INSERT statement in node 2, and then submits an offending TRUNCATE through node 1. The idea is that the replicated TRUNCATE will conflict with INSERT in node 2, and force the INSERT to abort. The test first issues --send INSERT in node 2, and then switches to node 1 to launch --send TRUNCATE. As the INSERT is launched asynchronously by --send, it may happen that INSERT has not yet started to process, before the TRUNCATE is replicated. The net effect may be that TRUCATE processes to completion in node 2, and only after that INSERT starts to execute. As the INSERT is very long query, it will last longer than mtr test suite max test time, the test will fail for timeout. The fix in this commit uses another connection in node 2, to wait until the INSERT has started to process in node 2. TRUNCATE in node 1, will be submitted in node 1 after this wait condition.
7b8319f3