mirror of https://github.com/citusdata/citus.git
Add regression test for issue 7887 related to invalid string enlargement
parent
43f3786c1f
commit
4a2cc7b644
|
@ -103,7 +103,7 @@ test: multi_dropped_column_aliases foreign_key_restriction_enforcement
|
||||||
test: binary_protocol
|
test: binary_protocol
|
||||||
test: alter_table_set_access_method
|
test: alter_table_set_access_method
|
||||||
test: alter_distributed_table
|
test: alter_distributed_table
|
||||||
test: issue_5248 issue_5099 issue_5763 issue_6543 issue_6758 issue_7477 issue_7891
|
test: issue_5248 issue_5099 issue_5763 issue_6543 issue_6758 issue_7477 issue_7891 issue_7887
|
||||||
test: object_propagation_debug
|
test: object_propagation_debug
|
||||||
test: undistribute_table
|
test: undistribute_table
|
||||||
test: run_command_on_all_nodes
|
test: run_command_on_all_nodes
|
||||||
|
|
|
@ -0,0 +1,33 @@
|
||||||
|
CREATE SCHEMA issue_7887;
|
||||||
|
CREATE SCHEMA issue_7887;
|
||||||
|
|
||||||
|
CREATE TABLE local1 (
|
||||||
|
id text not null primary key
|
||||||
|
);
|
||||||
|
|
||||||
|
CREATE TABLE reference1 (
|
||||||
|
id int not null primary key,
|
||||||
|
reference_col1 text not null
|
||||||
|
);
|
||||||
|
SELECT create_reference_table('reference1');
|
||||||
|
|
||||||
|
CREATE TABLE local2 (
|
||||||
|
id int not null generated always as identity,
|
||||||
|
local1fk text not null,
|
||||||
|
reference1fk int not null,
|
||||||
|
constraint loc1fk foreign key (local1fk) references local1(id),
|
||||||
|
constraint reference1fk foreign key (reference1fk) references reference1(id),
|
||||||
|
constraint testlocpk primary key (id)
|
||||||
|
);
|
||||||
|
|
||||||
|
INSERT INTO local1(id) VALUES ('aaaaa'), ('bbbbb'), ('ccccc');
|
||||||
|
INSERT INTO reference1(id, reference_col1) VALUES (1, 'test'), (2, 'test2'), (3, 'test3');
|
||||||
|
|
||||||
|
-- The statement that triggers the bug:
|
||||||
|
INSERT INTO local2(local1fk, reference1fk)
|
||||||
|
SELECT id, 1
|
||||||
|
FROM local1;
|
||||||
|
|
||||||
|
-- If you want to see the error in the regression output, you might do something like:
|
||||||
|
-- NOTE: The next line is typically how you'd test for an error in a .sql regression test
|
||||||
|
-- but with a custom "expected" file you'll confirm you get the "invalid string enlargement request size: -4" text
|
Loading…
Reference in New Issue