Added a test

This commit is contained in:
Alexey Milovidov 2020-07-05 00:44:29 +03:00
parent c4b6c780c6
commit d10856cf07
2 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1,12 @@
CREATE TEMPORARY TABLE constrained
(
`URL` String,
CONSTRAINT is_yandex CHECK domainWithoutWWW(URL) = domainWithoutWWW(URL),
CONSTRAINT is_utf8 CHECK isValidUTF8(URL)
);
insert into constrained values ('a');
DROP TEMPORARY TABLE constrained;
CREATE TEMPORARY TABLE constrained (x UInt8, CONSTRAINT bogus CHECK 0);
INSERT INTO constrained VALUES (1); -- { serverError 469 }