-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[pg15] test: re-port many tests in TestPgRegressPgMiscIndependent
Summary: Re-port pg_regress tests in TestPgRegressPgMiscIndependent = yb_pg_misc_independent_serial_schedule: - yb_pg_copydml: identical to original - yb_pg_index_including: move YB-introduced queries out to new yb_index_including in yb_index_serial_schedule - yb_pg_create_function_sql: some differences - yb_pg_create_cast: identical to original - yb_pg_drop_if_exists: run failing queries - yb_pg_case: skip since porting this may be easier after the work to generate ybrowid sequentially - yb_pg_namespace: some differences - yb_pg_security_label: identical to original - yb_pg_lock: skip since LOCK is not well supported - yb_pg_drop_operator: some differences - yb_pg_alter_generic: some differences - yb_pg_alter_operator: move YB-introduced queries out to new yb_alter_operator in yb_misc_independent_schedule - yb_pg_dbsize: identical to original - yb_pg_indirect_toast: skip since toast is likely not well supported - yb_pg_conversion: port up to CREATE CONVERSION failure - yb_pg_truncate: delete some YB-introduced queries that are don't seem very important - yb_pg_sequence: some differences - yb_pg_identity: crashes ever since YB pg15 merge 4e08225 merging in YB master 02998f5. It also has parts that could benefit from the work to generate ybrowid sequentially. Port some error message changes, but leave it failing besides that. Split up test_D31292.sh to move the TestPgRegressPgMiscIndependent portion to a new test_pg_misc_independent.sh. Then, change it to expect all regress tests to pass except yb_pg_identity. Test Plan: On Almalinux 8: #!/usr/bin/env bash set -eu ./yb_build.sh fastdebug --gcc11 yes "$(pg15_tests/get_shell_test_specs.sh | grep pg_misc_independent)" | head -50 | pg15_tests/run_tests.sh pg15_tests/test_D31292.sh Manually check Java tests TestPgRegressMisc#testPgRegressMiscIndependent and TestPgRegressIndex pass yb_index_including and yb_alter_operator regress tests. Jenkins: rebase: pg15, test regex: TestPgRegress Reviewers: fizaa, tfoucher Reviewed By: tfoucher Subscribers: yql Differential Revision: https://phorge.dev.yugabyte.com/D35842
- Loading branch information
Showing
33 changed files
with
1,724 additions
and
805 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env bash | ||
source "${BASH_SOURCE[0]%/*}"/common.sh | ||
|
||
failing_java_test TestPgRegressPgMiscIndependent | ||
grep_in_java_test \ | ||
"failed tests: [yb_pg_identity]" \ | ||
TestPgRegressPgMiscIndependent |
49 changes: 49 additions & 0 deletions
49
src/postgres/src/test/regress/expected/yb_alter_operator.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
CREATE FUNCTION alter_op_test_fn(boolean, boolean) | ||
RETURNS boolean AS $$ SELECT NULL::BOOLEAN; $$ LANGUAGE sql IMMUTABLE; | ||
CREATE FUNCTION customcontsel(internal, oid, internal, integer) | ||
RETURNS float8 AS 'contsel' LANGUAGE internal STABLE STRICT; | ||
CREATE OPERATOR === ( | ||
LEFTARG = boolean, | ||
RIGHTARG = boolean, | ||
PROCEDURE = alter_op_test_fn, | ||
COMMUTATOR = ===, | ||
NEGATOR = !==, | ||
RESTRICT = customcontsel, | ||
JOIN = contjoinsel, | ||
HASHES, MERGES | ||
); | ||
CREATE USER regress_alter_op_user; | ||
ALTER OPERATOR === (boolean, boolean) OWNER TO regress_alter_op_user; | ||
DROP USER regress_alter_op_user; -- error | ||
ERROR: role "regress_alter_op_user" cannot be dropped because some objects depend on it | ||
DETAIL: owner of operator ===(boolean,boolean) | ||
SET SESSION AUTHORIZATION regress_alter_op_user; | ||
ALTER OPERATOR === (boolean, boolean) SET (RESTRICT = NONE); | ||
SELECT oprrest FROM pg_operator WHERE oprname = '===' | ||
AND oprleft = 'boolean'::regtype AND oprright = 'boolean'::regtype; | ||
oprrest | ||
--------- | ||
- | ||
(1 row) | ||
|
||
-- Cleanup | ||
RESET SESSION AUTHORIZATION; | ||
ALTER OPERATOR === (boolean, boolean) OWNER TO yugabyte; | ||
DROP USER regress_alter_op_user; | ||
-- | ||
-- Test SET SCHEMA | ||
-- | ||
CREATE SCHEMA op_schema; | ||
ALTER OPERATOR === (boolean, boolean) SET SCHEMA op_schema; | ||
SELECT ns.nspname FROM pg_operator op | ||
INNER JOIN pg_namespace ns ON ns.oid = op.oprnamespace | ||
WHERE op.oprname = '===' | ||
AND op.oprleft = 'boolean'::regtype AND op.oprright = 'boolean'::regtype; | ||
nspname | ||
----------- | ||
op_schema | ||
(1 row) | ||
|
||
-- Cleanup | ||
ALTER OPERATOR op_schema.=== (boolean, boolean) SET SCHEMA public; | ||
DROP SCHEMA op_schema; |
16 changes: 16 additions & 0 deletions
16
src/postgres/src/test/regress/expected/yb_index_including.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
-- Unique index and unique constraint. Must fail setting non-unique index as constraint. | ||
CREATE TABLE tbl_include_non_unique (c1 int, c2 int, c3 int, c4 int); | ||
CREATE INDEX tbl_include_non_unique_idx on tbl_include_non_unique (c1); | ||
ALTER TABLE tbl_include_non_unique ADD CONSTRAINT constr_non_unique UNIQUE USING INDEX tbl_include_non_unique_idx; | ||
ERROR: "tbl_include_non_unique_idx" is not a unique index | ||
LINE 1: ALTER TABLE tbl_include_non_unique ADD CONSTRAINT constr_non... | ||
^ | ||
DETAIL: Cannot create a primary key or unique constraint using such an index. | ||
-- Unique index and unique constraint. Must fail setting DESC unique index as constraint. | ||
CREATE TABLE tbl_include_desc_unique (c1 int, c2 int, c3 int, c4 int); | ||
CREATE UNIQUE INDEX tbl_include_desc_unique_idx on tbl_include_desc_unique (c1 DESC); | ||
ALTER TABLE tbl_include_desc_unique ADD CONSTRAINT constr_desc_unique UNIQUE USING INDEX tbl_include_desc_unique_idx; | ||
ERROR: index "tbl_include_desc_unique_idx" column number 1 does not have default sorting behavior | ||
LINE 1: ALTER TABLE tbl_include_desc_unique ADD CONSTRAINT constr_de... | ||
^ | ||
DETAIL: Cannot create a primary key or unique constraint using such an index. |
262 changes: 212 additions & 50 deletions
262
src/postgres/src/test/regress/expected/yb_pg_alter_generic.out
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.