ClickHouse/tests/queries/0_stateless/02322_sql_insert_format.sql
Azat Khuzhin bc2921d1f1 tests: fix 02322_sql_insert_format flakiness
02322_sql_insert_format failed from time to time [1] and I found only
one reason - structure cache, I guess it may fail when the mtime was the
same.

  [1]: https://s3.amazonaws.com/clickhouse-test-reports/59857/46a9ced0f9031153538446f4b625e0cc34532a90/fast_test.html

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-02-12 13:49:46 +01:00

16 lines
1.5 KiB
SQL

-- Tags: no-parallel
set schema_inference_use_cache_for_file=0;
select number as x, number % 3 as y, 'Hello' as z from numbers(5) format SQLInsert;
select number as x, number % 3 as y, 'Hello' as z from numbers(5) format SQLInsert settings output_format_sql_insert_max_batch_size=1;
select number as x, number % 3 as y, 'Hello' as z from numbers(5) format SQLInsert settings output_format_sql_insert_max_batch_size=2;
select number as x, number % 3 as y, 'Hello' as z from numbers(5) format SQLInsert settings output_format_sql_insert_include_column_names=0;
select number as x, number % 3 as y, 'Hello' as z from numbers(5) format SQLInsert settings output_format_sql_insert_use_replace=1;
select number as x, number % 3 as y, 'Hello' as z from numbers(5) format SQLInsert settings output_format_sql_insert_table_name='test';
select number as x, number % 3 as y, 'Hello' as z from numbers(5) format SQLInsert settings output_format_sql_insert_table_name='test', output_format_sql_insert_quote_names=0;
insert into function file(02322_data.sql, 'SQLInsert') select number as x, number % 3 as y, 'Hello' as z from numbers(5) settings output_format_sql_insert_max_batch_size=2, output_format_sql_insert_quote_names=0, engine_file_truncate_on_insert=1;
select * from file(02322_data.sql, 'MySQLDump');
insert into function file(02322_data.sql, 'SQLInsert') select number, number % 3, 'Hello' from numbers(5) settings output_format_sql_insert_max_batch_size=2, engine_file_truncate_on_insert=1;
select * from file(02322_data.sql, 'MySQLDump');