Subject Possible bug with CHECK constraint
Author Roman Rokytskyy
CREATE DATABASE 'test.fdb' USER 'sysdba' PASSWORD 'masterkey';

CREATE TABLE test_master (
id INTEGER NOT NULL PRIMARY KEY,
CHECK(COALESCE((SELECT max(id) FROM test_master), 0) < 10)
);

COMMIT;

INSERT INTO test_master VALUES (1);
INSERT INTO test_master VALUES (20);

COMMIT;

This script succeeds. Is it normal?

Roman