mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-18 13:42:02 +00:00
FunctionSleep exception message fix
This commit is contained in:
parent
c391527c86
commit
8b4619fd5f
@ -112,13 +112,15 @@ public:
|
||||
if (size > 0)
|
||||
{
|
||||
/// When sleeping, the query cannot be cancelled. For ability to cancel query, we limit sleep time.
|
||||
UInt64 microseconds = static_cast<UInt64>(seconds * 1e6);
|
||||
if (max_microseconds && seconds * 1e6 > max_microseconds)
|
||||
throw Exception(ErrorCodes::TOO_SLOW, "The maximum sleep time is {} microseconds. Requested: {}", max_microseconds, seconds);
|
||||
throw Exception(ErrorCodes::TOO_SLOW, "The maximum sleep time is {} microseconds. Requested: {} microseconds",
|
||||
max_microseconds, microseconds);
|
||||
|
||||
if (!dry_run)
|
||||
{
|
||||
UInt64 count = (variant == FunctionSleepVariant::PerBlock ? 1 : size);
|
||||
UInt64 microseconds = static_cast<UInt64>(seconds * count * 1e6);
|
||||
microseconds = static_cast<UInt64>(seconds * count * 1e6);
|
||||
|
||||
if (max_microseconds && microseconds > max_microseconds)
|
||||
throw Exception(ErrorCodes::TOO_SLOW,
|
||||
|
Loading…
Reference in New Issue
Block a user