mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 00:22:29 +00:00
Added a test
This commit is contained in:
parent
c4b6c780c6
commit
d10856cf07
12
tests/queries/0_stateless/01358_constexpr_constraint.sql
Normal file
12
tests/queries/0_stateless/01358_constexpr_constraint.sql
Normal 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 }
|
Loading…
Reference in New Issue
Block a user