From 8556b2cee31a83c453fb73d198dac2fa20358659 Mon Sep 17 00:00:00 2001 From: Vladimir Chebotarev Date: Tue, 5 Nov 2019 01:47:26 +0300 Subject: [PATCH] Added tests to check that ClickHouse don't crash on insufficient arguments of S3, URL and HDFS storages. --- .../0_stateless/01030_storage_hdfs_syntax.reference | 0 .../queries/0_stateless/01030_storage_hdfs_syntax.sql | 8 ++++++++ .../queries/0_stateless/01030_storage_s3_syntax.reference | 0 .../tests/queries/0_stateless/01030_storage_s3_syntax.sql | 8 ++++++++ .../0_stateless/01030_storage_url_syntax.reference | 0 .../queries/0_stateless/01030_storage_url_syntax.sql | 8 ++++++++ 6 files changed, 24 insertions(+) create mode 100644 dbms/tests/queries/0_stateless/01030_storage_hdfs_syntax.reference create mode 100644 dbms/tests/queries/0_stateless/01030_storage_hdfs_syntax.sql create mode 100644 dbms/tests/queries/0_stateless/01030_storage_s3_syntax.reference create mode 100644 dbms/tests/queries/0_stateless/01030_storage_s3_syntax.sql create mode 100644 dbms/tests/queries/0_stateless/01030_storage_url_syntax.reference create mode 100644 dbms/tests/queries/0_stateless/01030_storage_url_syntax.sql diff --git a/dbms/tests/queries/0_stateless/01030_storage_hdfs_syntax.reference b/dbms/tests/queries/0_stateless/01030_storage_hdfs_syntax.reference new file mode 100644 index 00000000000..e69de29bb2d diff --git a/dbms/tests/queries/0_stateless/01030_storage_hdfs_syntax.sql b/dbms/tests/queries/0_stateless/01030_storage_hdfs_syntax.sql new file mode 100644 index 00000000000..9b16141338c --- /dev/null +++ b/dbms/tests/queries/0_stateless/01030_storage_hdfs_syntax.sql @@ -0,0 +1,8 @@ +drop table if exists test_table_hdfs_syntax +; +create table test_table_hdfs_syntax (id UInt32) ENGINE = HDFS('') +; -- { serverError 42 } +create table test_table_hdfs_syntax (id UInt32) ENGINE = HDFS('','','') +; -- { serverError 42 } +drop table if exists test_table_hdfs_syntax +; diff --git a/dbms/tests/queries/0_stateless/01030_storage_s3_syntax.reference b/dbms/tests/queries/0_stateless/01030_storage_s3_syntax.reference new file mode 100644 index 00000000000..e69de29bb2d diff --git a/dbms/tests/queries/0_stateless/01030_storage_s3_syntax.sql b/dbms/tests/queries/0_stateless/01030_storage_s3_syntax.sql new file mode 100644 index 00000000000..504b5375b38 --- /dev/null +++ b/dbms/tests/queries/0_stateless/01030_storage_s3_syntax.sql @@ -0,0 +1,8 @@ +drop table if exists test_table_s3_syntax +; +create table test_table_s3_syntax (id UInt32) ENGINE = S3('') +; -- { serverError 42 } +create table test_table_s3_syntax (id UInt32) ENGINE = S3('','','') +; -- { serverError 42 } +drop table if exists test_table_s3_syntax +; diff --git a/dbms/tests/queries/0_stateless/01030_storage_url_syntax.reference b/dbms/tests/queries/0_stateless/01030_storage_url_syntax.reference new file mode 100644 index 00000000000..e69de29bb2d diff --git a/dbms/tests/queries/0_stateless/01030_storage_url_syntax.sql b/dbms/tests/queries/0_stateless/01030_storage_url_syntax.sql new file mode 100644 index 00000000000..11c4b01f1ca --- /dev/null +++ b/dbms/tests/queries/0_stateless/01030_storage_url_syntax.sql @@ -0,0 +1,8 @@ +drop table if exists test_table_url_syntax +; +create table test_table_url_syntax (id UInt32) ENGINE = URL('') +; -- { serverError 42 } +create table test_table_url_syntax (id UInt32) ENGINE = URL('','','') +; -- { serverError 42 } +drop table if exists test_table_url_syntax +;