mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 00:30:49 +00:00
Merge pull request #69175 from azat/revert-client-log_comment-file
Revert "Merge pull request #57191 from azat/client-log_comment-file"
This commit is contained in:
commit
dd6e818c68
@ -2699,14 +2699,6 @@ bool ClientBase::processMultiQueryFromFile(const String & file_name)
|
||||
ReadBufferFromFile in(file_name);
|
||||
readStringUntilEOF(queries_from_file, in);
|
||||
|
||||
if (!getClientConfiguration().has("log_comment"))
|
||||
{
|
||||
Settings settings = client_context->getSettingsCopy();
|
||||
/// NOTE: cannot use even weakly_canonical() since it fails for /dev/stdin due to resolving of "pipe:[X]"
|
||||
settings.log_comment = fs::absolute(fs::path(file_name));
|
||||
client_context->setSettings(settings);
|
||||
}
|
||||
|
||||
return executeMultiQuery(queries_from_file);
|
||||
}
|
||||
|
||||
|
@ -1,6 +0,0 @@
|
||||
42
|
||||
4242
|
||||
424242
|
||||
select 42 clickhouse.default-1.sql
|
||||
select 4242 clickhouse.default-2.sql
|
||||
select 424242\n foo
|
@ -1,24 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
# reset --log_comment, because the test has to set its own
|
||||
CLICKHOUSE_LOG_COMMENT=
|
||||
# shellcheck source=../shell_config.sh
|
||||
. "$CUR_DIR"/../shell_config.sh
|
||||
|
||||
file1="$CUR_DIR/clickhouse.${CLICKHOUSE_DATABASE}-1.sql"
|
||||
echo -n 'select 42' >> "$file1"
|
||||
file2="$CUR_DIR/clickhouse.${CLICKHOUSE_DATABASE}-2.sql"
|
||||
echo -n 'select 4242' >> "$file2"
|
||||
|
||||
$CLICKHOUSE_CLIENT --queries-file "$file1" "$file2" <<<'select 42'
|
||||
$CLICKHOUSE_CLIENT --log_comment foo --queries-file /dev/stdin <<<'select 424242'
|
||||
|
||||
$CLICKHOUSE_CLIENT -m -q "
|
||||
system flush logs;
|
||||
select query, log_comment from system.query_log where current_database = '$CLICKHOUSE_DATABASE' and event_date >= yesterday() and query = 'select 42' and type != 'QueryStart';
|
||||
select query, log_comment from system.query_log where current_database = '$CLICKHOUSE_DATABASE' and event_date >= yesterday() and query = 'select 4242' and type != 'QueryStart';
|
||||
select query, log_comment from system.query_log where current_database = '$CLICKHOUSE_DATABASE' and event_date >= yesterday() and query = 'select 424242\n' and type != 'QueryStart';
|
||||
" | sed "s#$CUR_DIR/##"
|
||||
|
||||
rm "$file1" "$file2"
|
Loading…
Reference in New Issue
Block a user