Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitamikhaylov committed Feb 10, 2024
1 parent b769a88 commit 06ef0d2
Show file tree
Hide file tree
Showing 16 changed files with 51 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ SET allow_experimental_analyzer = 0;
SET allow_experimental_window_view = 1;
DROP DATABASE IF EXISTS {CLICKHOUSE_DATABASE:Identifier};
set allow_deprecated_database_ordinary=1;
-- Creation of a database with ENGINE=Ordinary results in a warning in server logs
SET send_logs_level='fatal';
CREATE DATABASE {CLICKHOUSE_DATABASE:Identifier} ENGINE=Ordinary;
SET send_logs_level='warning';

DROP TABLE IF EXISTS {CLICKHOUSE_DATABASE:Identifier}.mt;
DROP TABLE IF EXISTS {CLICKHOUSE_DATABASE:Identifier}.mt_2;
Expand Down
3 changes: 3 additions & 0 deletions tests/queries/0_stateless/01048_window_view_parser.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ SET allow_experimental_analyzer = 0;
SET allow_experimental_window_view = 1;
DROP DATABASE IF EXISTS test_01048;
set allow_deprecated_database_ordinary=1;
-- Creation of a database with ENGINE=Ordinary results in a warning in server logs
SET send_logs_level='fatal';
CREATE DATABASE test_01048 ENGINE=Ordinary;
SET send_logs_level='warning';

DROP TABLE IF EXISTS test_01048.mt;
DROP TABLE IF EXISTS test_01048.mt_2;
Expand Down
3 changes: 3 additions & 0 deletions tests/queries/0_stateless/01053_drop_database_mat_view.sql
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@

DROP DATABASE IF EXISTS {CLICKHOUSE_DATABASE:Identifier};
set allow_deprecated_database_ordinary=1;
-- Creation of a database with ENGINE=Ordinary results in a warning in server logs
SET send_logs_level='fatal';
CREATE DATABASE {CLICKHOUSE_DATABASE:Identifier} ENGINE=Ordinary; -- Different inner table name with Atomic
SET send_logs_level='warning';

set allow_deprecated_syntax_for_merge_tree=1;
create table {CLICKHOUSE_DATABASE:Identifier}.my_table ENGINE = MergeTree(day, (day), 8192) as select today() as day, 'mystring' as str;
Expand Down
3 changes: 3 additions & 0 deletions tests/queries/0_stateless/01085_window_view_attach.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ SET allow_experimental_window_view = 1;

DROP DATABASE IF EXISTS {CLICKHOUSE_DATABASE:Identifier};
set allow_deprecated_database_ordinary=1;
-- Creation of a database with ENGINE=Ordinary results in a warning in server logs
SET send_logs_level='fatal';
CREATE DATABASE {CLICKHOUSE_DATABASE:Identifier} ENGINE=Ordinary;
SET send_logs_level='warning';

DROP TABLE IF EXISTS {CLICKHOUSE_DATABASE:Identifier}.mt;
DROP TABLE IF EXISTS {CLICKHOUSE_DATABASE:Identifier}.wv;
Expand Down
6 changes: 3 additions & 3 deletions tests/queries/0_stateless/01109_exchange_tables.sql
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ DROP DATABASE IF EXISTS test_01109_other_atomic;
DROP DATABASE IF EXISTS test_01109_ordinary;
CREATE DATABASE test_01109_other_atomic;
set allow_deprecated_database_ordinary=1;
-- Creation of a database with ENGINE=Ordinary results in a warning in server logs
SET send_logs_level='fatal';
CREATE DATABASE test_01109_ordinary ENGINE=Ordinary;
SET send_logs_level='warning';

CREATE TABLE test_01109_other_atomic.t3 ENGINE=MergeTree() ORDER BY tuple()
AS SELECT rowNumberInAllBlocks() + (SELECT max((*,*).1.1) + 1 FROM (SELECT (*,) FROM t1 UNION ALL SELECT (*,) FROM t2)), *
Expand Down Expand Up @@ -63,6 +66,3 @@ DROP DATABASE test_01109;
DROP DATABASE test_01109_other_atomic;
DROP DATABASE test_01109_ordinary;
DROP DATABASE test_01109_rename_exists;



Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ SHOW CREATE TABLE test_01148_atomic.rmt3;

DROP DATABASE IF EXISTS test_01148_ordinary;
set allow_deprecated_database_ordinary=1;
-- Creation of a database with ENGINE=Ordinary results in a warning in server logs
SET send_logs_level='fatal';
CREATE DATABASE test_01148_ordinary ENGINE=Ordinary;
SET send_logs_level='warning';
RENAME TABLE test_01148_atomic.rmt3 to test_01148_ordinary.rmt3; -- { serverError 48 }
DROP DATABASE test_01148_ordinary;
DROP DATABASE test_01148_atomic;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ DROP DATABASE IF EXISTS test_01155_ordinary;
DROP DATABASE IF EXISTS test_01155_atomic;

set allow_deprecated_database_ordinary=1;
-- Creation of a database with ENGINE=Ordinary results in a warning in server logs
SET send_logs_level='fatal';
CREATE DATABASE test_01155_ordinary ENGINE=Ordinary;
SET send_logs_level='warning';
CREATE DATABASE test_01155_atomic ENGINE=Atomic;

USE test_01155_ordinary;
Expand Down Expand Up @@ -70,7 +73,10 @@ RENAME DATABASE test_01155_ordinary TO test_01155_atomic;
SET check_table_dependencies=1;

set allow_deprecated_database_ordinary=1;
-- Creation of a database with ENGINE=Ordinary results in a warning in server logs
SET send_logs_level='fatal';
CREATE DATABASE test_01155_ordinary ENGINE=Ordinary;
SET send_logs_level='warning';
SHOW CREATE DATABASE test_01155_atomic;

RENAME TABLE test_01155_atomic.mv1 TO test_01155_ordinary.mv1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
DROP DATABASE IF EXISTS dict_db_01224;
DROP DATABASE IF EXISTS dict_db_01224_dictionary;
set allow_deprecated_database_ordinary=1;
-- Creation of a database with ENGINE=Ordinary results in a warning in server logs
SET send_logs_level='fatal';
CREATE DATABASE dict_db_01224 ENGINE=Ordinary; -- Different internal dictionary name with Atomic
SET send_logs_level='warning';
CREATE DATABASE dict_db_01224_dictionary Engine=Dictionary;

CREATE TABLE dict_db_01224.dict_data (key UInt64, val UInt64) Engine=Memory();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
DROP DATABASE IF EXISTS dict_db_01225;
DROP DATABASE IF EXISTS dict_db_01225_dictionary;
set allow_deprecated_database_ordinary=1;
-- Creation of a database with ENGINE=Ordinary results in a warning in server logs
SET send_logs_level='fatal';
CREATE DATABASE dict_db_01225 ENGINE=Ordinary; -- Different internal dictionary name with Atomic
SET send_logs_level='warning';
CREATE DATABASE dict_db_01225_dictionary Engine=Dictionary;

CREATE TABLE dict_db_01225.dict_data (key UInt64, val UInt64) Engine=Memory();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

DROP DATABASE IF EXISTS test_01249;
set allow_deprecated_database_ordinary=1;
-- Creation of a database with ENGINE=Ordinary results in a warning in server logs
SET send_logs_level='fatal';
CREATE DATABASE test_01249 ENGINE=Ordinary; -- Full ATTACH requires UUID with Atomic
SET send_logs_level='warning';
USE test_01249;

CREATE TABLE bloom_filter_idx_good(`u64` UInt64, `i32` Int32, `f64` Float64, `d` Decimal(10, 2), `s` String, `e` Enum8('a' = 1, 'b' = 2, 'c' = 3), `dt` Date, INDEX bloom_filter_a i32 TYPE bloom_filter(0, 1) GRANULARITY 1) ENGINE = MergeTree() ORDER BY u64 SETTINGS index_granularity = 8192; -- { serverError 42 }
Expand Down
3 changes: 3 additions & 0 deletions tests/queries/0_stateless/01516_create_table_primary_key.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

DROP DATABASE IF EXISTS test_01516;
set allow_deprecated_database_ordinary=1;
-- Creation of a database with ENGINE=Ordinary results in a warning in server logs
SET send_logs_level='fatal';
CREATE DATABASE test_01516 ENGINE=Ordinary; -- Full ATTACH requires UUID with Atomic
SET send_logs_level='warning';
USE test_01516;

DROP TABLE IF EXISTS primary_key_test;
Expand Down
3 changes: 3 additions & 0 deletions tests/queries/0_stateless/01517_drop_mv_with_inner_table.sql
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ show tables from db_01517_atomic_sync;
---
drop database if exists db_01517_ordinary;
set allow_deprecated_database_ordinary=1;
-- Creation of a database with ENGINE=Ordinary results in a warning in server logs
SET send_logs_level='fatal';
create database db_01517_ordinary Engine=Ordinary;
SET send_logs_level='warning';

create table db_01517_ordinary.source (key Int) engine=Null;
create materialized view db_01517_ordinary.mv engine=Null as select * from db_01517_ordinary.source;
Expand Down
3 changes: 3 additions & 0 deletions tests/queries/0_stateless/01601_detach_permanently.sql
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ SELECT 'database ordinary tests';

DROP DATABASE IF EXISTS test1601_detach_permanently_ordinary;
set allow_deprecated_database_ordinary=1;
-- Creation of a database with ENGINE=Ordinary results in a warning in server logs
SET send_logs_level='fatal';
CREATE DATABASE test1601_detach_permanently_ordinary Engine=Ordinary;
SET send_logs_level='warning';

create table test1601_detach_permanently_ordinary.test_name_reuse (number UInt64) engine=MergeTree order by tuple();

Expand Down
3 changes: 3 additions & 0 deletions tests/queries/0_stateless/01603_rename_overwrite_bug.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

DROP database IF EXISTS test_1603_rename_bug_ordinary;
set allow_deprecated_database_ordinary=1;
-- Creation of a database with ENGINE=Ordinary results in a warning in server logs
SET send_logs_level='fatal';
create database test_1603_rename_bug_ordinary engine=Ordinary;
SET send_logs_level='warning';
create table test_1603_rename_bug_ordinary.foo engine=Memory as select * from numbers(100);
create table test_1603_rename_bug_ordinary.bar engine=Log as select * from numbers(200);
detach table test_1603_rename_bug_ordinary.foo;
Expand Down
3 changes: 3 additions & 0 deletions tests/queries/0_stateless/02096_rename_atomic_hang.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
drop database if exists db_hang;
drop database if exists db_hang_temp;
set allow_deprecated_database_ordinary=1;
-- Creation of a database with ENGINE=Ordinary results in a warning in server logs
SET send_logs_level='fatal';
create database db_hang engine=Ordinary;
SET send_logs_level='warning';
use db_hang;
create table db_hang.test(A Int64) Engine=MergeTree order by A;
create materialized view db_hang.test_mv(A Int64) Engine=MergeTree order by A as select * from db_hang.test;
Expand Down
3 changes: 3 additions & 0 deletions tests/queries/0_stateless/02988_ordinary_database_warning.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ DROP DATABASE IF EXISTS 02988_ordinary;

SET allow_deprecated_database_ordinary = 1;
SET send_logs_level='fatal';
-- Creation of a database with ENGINE=Ordinary results in a warning in server logs
SET send_logs_level='fatal';
CREATE DATABASE 02988_ordinary ENGINE=Ordinary;
SET send_logs_level='warning';

SELECT 'Ok.' FROM system.warnings WHERE message ILIKE '%Ordinary%' and message ILIKE '%deprecated%';

Expand Down

0 comments on commit 06ef0d2

Please sign in to comment.