Skip to content

Commit

Permalink
Add test related to issue #4704
Browse files Browse the repository at this point in the history
It is ok now, but I didn't bissect to known when it was fixed precisely.
  • Loading branch information
c2main committed Feb 27, 2025
1 parent 0282aa7 commit 3ec3561
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/test/regress/expected/distributed_types.out
Original file line number Diff line number Diff line change
Expand Up @@ -610,3 +610,21 @@ SET client_min_messages TO error; -- suppress cascading objects dropping
DROP SCHEMA type_tests CASCADE;
DROP SCHEMA type_tests2 CASCADE;
DROP USER typeuser;
RESET client_min_messages;
CREATE SCHEMA issue_4704;
SET search_path TO issue_4704;
-- https://github.com/citusdata/citus/issues/4704
-- known to have crash citus before
CREATE TYPE comptype as (r float8, i float8);
CREATE DOMAIN dcomptypea as comptype[];
CREATE TABLE dcomptable (d1 dcomptypea unique);
SELECT create_distributed_table('dcomptable', 'd1');
create_distributed_table
---------------------------------------------------------------------

(1 row)

insert into dcomptable values (array[row(1,2)]::dcomptypea);
SET client_min_messages TO error; -- suppress cascading objects dropping
DROP TABLE dcomptable;
DROP SCHEMA issue_4704 CASCADE;
16 changes: 16 additions & 0 deletions src/test/regress/sql/distributed_types.sql
Original file line number Diff line number Diff line change
Expand Up @@ -366,3 +366,19 @@ SET client_min_messages TO error; -- suppress cascading objects dropping
DROP SCHEMA type_tests CASCADE;
DROP SCHEMA type_tests2 CASCADE;
DROP USER typeuser;

RESET client_min_messages;
CREATE SCHEMA issue_4704;
SET search_path TO issue_4704;

-- https://github.com/citusdata/citus/issues/4704
-- known to have crash citus before
CREATE TYPE comptype as (r float8, i float8);
CREATE DOMAIN dcomptypea as comptype[];
CREATE TABLE dcomptable (d1 dcomptypea unique);
SELECT create_distributed_table('dcomptable', 'd1');
insert into dcomptable values (array[row(1,2)]::dcomptypea);

SET client_min_messages TO error; -- suppress cascading objects dropping
DROP TABLE dcomptable;
DROP SCHEMA issue_4704 CASCADE;

0 comments on commit 3ec3561

Please sign in to comment.