ISSUES-117 fix failed test

This commit is contained in:
zhang2014 2018-01-31 23:56:52 +08:00
parent 19e7c291db
commit bfd19965b5
4 changed files with 12 additions and 12 deletions

View File

@ -79,7 +79,7 @@ BlockInputStreams StorageSystemTables::read(
static_cast<UInt64>(database->getTableMetadataModificationTime(context, table_name))); static_cast<UInt64>(database->getTableMetadataModificationTime(context, table_name)));
res_columns[4]->insert(UInt64(0)); res_columns[4]->insert(UInt64(0));
} }
} else } else if (context.hasSessionContext())
{ {
Tables externalTables = context.getSessionContext().getExternalTables(); Tables externalTables = context.getSessionContext().getExternalTables();

View File

@ -1,8 +1,8 @@
drop table if exists temp_tab; DROP TEMPORARY TABLE IF EXISTS temp_tab;
create temporary table temp_tab (number UInt64); CREATE TEMPORARY TABLE temp_tab (number UInt64);
insert into temp_tab select number from system.numbers limit 1; INSERT INTO temp_tab SELECT number FROM system.numbers LIMIT 1;
select number from temp_tab; SELECT number FROM temp_tab;
drop table temp_tab; DROP TEMPORARY TABLE temp_tab;
create temporary table temp_tab (number UInt64); CREATE TEMPORARY TABLE temp_tab (number UInt64);
select number from temp_tab; SELECT number FROM temp_tab;
drop table temp_tab; DROP TEMPORARY TABLE temp_tab;

View File

@ -16,4 +16,4 @@ SELECT '---';
SELECT ID FROM readonly00542 ORDER BY ID; SELECT ID FROM readonly00542 ORDER BY ID;
DROP TABLE readonly00542; DROP TEMPORARY TABLE readonly00542;

View File

@ -51,7 +51,7 @@ $CLICKHOUSE_CLIENT -n --query="
ID Int ID Int
) Engine=Memory; ) Engine=Memory;
INSERT INTO readonly (ID) VALUES (1); INSERT INTO readonly (ID) VALUES (1);
DROP TABLE readonly; DROP TEMPORARY TABLE readonly;
" 2> /dev/null; " 2> /dev/null;
CODE=$?; CODE=$?;
[ "$CODE" -ne "0" ] && echo "Fail" && exit $CODE; [ "$CODE" -ne "0" ] && echo "Fail" && exit $CODE;
@ -83,7 +83,7 @@ $CLICKHOUSE_CLIENT -n --query="
ID Int ID Int
) Engine=Memory; ) Engine=Memory;
INSERT INTO readonly (ID) VALUES (1); INSERT INTO readonly (ID) VALUES (1);
DROP TABLE readonly; DROP TEMPORARY TABLE readonly;
" 2> /dev/null; " 2> /dev/null;
CODE=$?; CODE=$?;
[ "$CODE" -ne "0" ] && echo "Fail" && exit $CODE; [ "$CODE" -ne "0" ] && echo "Fail" && exit $CODE;