diff --git a/dbms/tests/queries/0_stateless/00386_has_column_in_table.sql b/dbms/tests/queries/0_stateless/00386_has_column_in_table.sql index 4302d1c72ce..797521fae44 100644 --- a/dbms/tests/queries/0_stateless/00386_has_column_in_table.sql +++ b/dbms/tests/queries/0_stateless/00386_has_column_in_table.sql @@ -1,11 +1,16 @@ -DROP TABLE IF EXISTS has_column_in_table_test; -CREATE TABLE has_column_in_table_test (i Int64, s String, nest Nested(x UInt8, y UInt32)) ENGINE = Memory; +CREATE DATABASE IF NOT EXISTS test; +DROP TABLE IF EXISTS test.has_column_in_table; +CREATE TABLE test.has_column_in_table (i Int64, s String, nest Nested(x UInt8, y UInt32)) ENGINE = Memory; -SELECT hasColumnInTable('default', 'has_column_in_table_test', 'i'); -SELECT hasColumnInTable('default', 'has_column_in_table_test', 's'); -SELECT hasColumnInTable('default', 'has_column_in_table_test', 'nest.x'); -SELECT hasColumnInTable('default', 'has_column_in_table_test', 'nest.y'); +/* existing column */ +SELECT hasColumnInTable('test', 'has_column_in_table', 'i'); +SELECT hasColumnInTable('test', 'has_column_in_table', 's'); +SELECT hasColumnInTable('test', 'has_column_in_table', 'nest.x'); +SELECT hasColumnInTable('test', 'has_column_in_table', 'nest.y'); -SELECT hasColumnInTable('default', 'has_column_in_table_test', 'nest'); -SELECT hasColumnInTable('default', 'has_column_in_table_test', 'nest.not_existing'); -SELECT hasColumnInTable('default', 'has_column_in_table_test', 'not_existing'); +/* not existing column */ +SELECT hasColumnInTable('test', 'has_column_in_table', 'nest'); +SELECT hasColumnInTable('test', 'has_column_in_table', 'nest.not_existing'); +SELECT hasColumnInTable('test', 'has_column_in_table', 'not_existing'); + +DROP TABLE test.has_column_in_table;