ClickHouse/tests/integration/test_SYSTEM_FLUSH_LOGS
Azat Khuzhin 103eb17107 Force table creation on SYSTEM FLUSH LOGS (v2)
After this patch SYSTEM FLUSH LOGS will force system.*_log table
creatoins (only for enabled tables of course).

This will avoid such hacks like:

   set log_queries=1;
   select 1;
   system flush logs;

This is the second version of the patch, since first has a deadlock [1]
(reported by @alesapin). This version does not use separate lock and do
not issue CREATE TABLE from the query execution thread, instead it
activate flushing thread to do so, hence this should be the same as if
the table will be created during flush.

  [1]: https://gist.github.com/alesapin/d915d1deaa27d49aa31223daded02be2

Fixes: #11563
Cc: @alesapin
Cc: @nikitamikhaylov
2020-06-11 23:12:23 +03:00
..
test.py Force table creation on SYSTEM FLUSH LOGS (v2) 2020-06-11 23:12:23 +03:00