Fixed bad translation [#CLICKHOUSE-2].

This commit is contained in:
Alexey Milovidov 2017-08-29 21:51:48 +03:00
parent 8d7937cc30
commit 04af7a3349
2 changed files with 7 additions and 9 deletions

View File

@ -57,16 +57,14 @@ namespace
if (!user_pw_end || !colon)
throw Exception{
"Shard address '" + address + "' does not match to 'user[:password]@host:port#default_database' pattern",
ErrorCodes::INCORRECT_FILE_NAME
};
ErrorCodes::INCORRECT_FILE_NAME};
const bool has_pw = colon < user_pw_end;
const char * host_end = has_pw ? strchr(user_pw_end + 1, ':') : colon;
if (!host_end)
throw Exception{
"Shard address '" + address + "' does not contain port",
ErrorCodes::INCORRECT_FILE_NAME
};
ErrorCodes::INCORRECT_FILE_NAME};
const char * has_db = strchr(address.data(), '#');
const char * port_end = has_db ? has_db : address_end;

View File

@ -20,7 +20,7 @@ class IFunction;
using FunctionPtr = std::shared_ptr<IFunction>;
/** Range with open or closed ends; Perhaps unlimited.
/** Range with open or closed ends; possibly unbounded.
*/
struct Range
{
@ -31,12 +31,12 @@ private:
public:
Field left; /// the left border, if any
Field right; /// the right border, if any
bool left_bounded = false; /// limited to the left
bool right_bounded = false; /// limited to the right
bool left_bounded = false; /// bounded at the left
bool right_bounded = false; /// bounded at the right
bool left_included = false; /// includes the left border, if any
bool right_included = false; /// includes the right border, if any
/// The whole set.
/// The whole unversum.
Range() {}
/// One point.
@ -148,7 +148,7 @@ public:
/// r to the right of me.
if (r.left_bounded
&& right_bounded
&& (less(right, r.left) /// ...} {...
&& (less(right, r.left) /// ...} {...
|| ((!right_included || !r.left_included) /// ...) [... or ...] (...
&& equals(r.left, right))))
return false;