ClickHouse/tests/queries/0_stateless/01093_cyclic_defaults_filimonov.sql

20 lines
525 B
MySQL
Raw Normal View History

2020-03-05 18:24:31 +00:00
CREATE TABLE test
(
2020-11-03 10:24:51 +00:00
`a0` UInt64 DEFAULT a1 + 1,
`a1` UInt64 DEFAULT a0 + 1,
2020-03-05 18:24:31 +00:00
`a2` UInt64 DEFAULT a3 + a4,
`a3` UInt64 DEFAULT a2 + 1,
`a4` UInt64 ALIAS a3 + 1
)
ENGINE = Log; -- { serverError 174 }
CREATE TABLE pythagoras
(
`a` Float64 DEFAULT sqrt((c * c) - (b * b)),
`b` Float64 DEFAULT sqrt((c * c) - (a * a)),
`c` Float64 DEFAULT sqrt((a * a) + (b * b))
)
ENGINE = Log; -- { serverError 174 }
-- TODO: It works but should not: CREATE TABLE test (a DEFAULT b, b DEFAULT a) ENGINE = Memory