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)));
res_columns[4]->insert(UInt64(0));
}
} else
} else if (context.hasSessionContext())
{
Tables externalTables = context.getSessionContext().getExternalTables();

View File

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

View File

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