Merge pull request #21629 from ucasFL/errorcode

redefine some errorcode
This commit is contained in:
Alexander Kuzmenkov 2021-03-12 16:25:13 +03:00 committed by GitHub
commit 122790efd1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View File

@ -543,13 +543,13 @@
M(574, DISTRIBUTED_TOO_MANY_PENDING_BYTES) \
M(575, UNKNOWN_SNAPSHOT) \
M(576, KERBEROS_ERROR) \
M(577, INVALID_SHARD_ID) \
M(578, INVALID_FORMAT_INSERT_QUERY_WITH_DATA) \
\
M(999, KEEPER_EXCEPTION) \
M(1000, POCO_EXCEPTION) \
M(1001, STD_EXCEPTION) \
M(1002, UNKNOWN_EXCEPTION) \
M(1003, INVALID_SHARD_ID) \
M(1004, INVALID_FORMAT_INSERT_QUERY_WITH_DATA)
/* See END */

View File

@ -28,8 +28,8 @@ INSERT INTO x_dist SELECT * FROM numbers(10); -- { serverError 55 }
INSERT INTO y_dist SELECT * FROM numbers(10); -- { serverError 55 }
-- invalid shard id
INSERT INTO x_dist SELECT * FROM numbers(10) settings insert_shard_id = 3; -- { serverError 1003 }
INSERT INTO y_dist SELECT * FROM numbers(10) settings insert_shard_id = 3; -- { serverError 1003 }
INSERT INTO x_dist SELECT * FROM numbers(10) settings insert_shard_id = 3; -- { serverError 577 }
INSERT INTO y_dist SELECT * FROM numbers(10) settings insert_shard_id = 3; -- { serverError 577 }
DROP TABLE x;
DROP TABLE x_dist;

View File

@ -8,4 +8,4 @@ echo "select 1; select 1 union all (select 1 union distinct select 1); " | $CL
echo "select 1; select 1 union all (select 1 union distinct select 1); -- comment " | $CLICKHOUSE_FORMAT -n;
echo "insert into t values (1); " | $CLICKHOUSE_FORMAT -n 2>&1 \ | grep -F -q "Code: 1004" && echo 'OK' || echo 'FAIL'
echo "insert into t values (1); " | $CLICKHOUSE_FORMAT -n 2>&1 \ | grep -F -q "Code: 578" && echo 'OK' || echo 'FAIL'