added test

This commit is contained in:
yariks5s 2023-07-27 18:11:52 +00:00
parent bae407e958
commit 6687f37329
2 changed files with 20 additions and 0 deletions

View File

@ -49,6 +49,14 @@ static void createInformationSchemaView(ContextMutablePtr context, IDatabase & d
database.getTableDataPath(ast_create), context, true).second;
database.createTable(context, ast_create.getTable(), view, ast);
if (ast_create.getTable() == "tables")
{
database.createTable(context, Poco::toUpper(ast_create.getTable()), view, ast);
}
else if (ast_create.getTable() == "TABLES")
{
database.createTable(context, Poco::toLower(ast_create.getTable()), view, ast);
}
}
catch (...)
{

View File

@ -190,3 +190,15 @@ def test_information_schema():
)
== "1\n"
)
assert (
node.query(
"SELECT count() FROM information_schema.TABLES WHERE table_name='TABLES'"
)
== "3\n"
)
assert (
node.query(
"SELECT count() FROM INFORMATION_SCHEMA.tables WHERE table_name='tables'"
)
== "3\n"
)