Skip to content

Commit e60fcba

Browse files
committed
sql/copy: deflake copy datadriven test
One of the `copy_from` test cases for RLS could previously fail if the copy batch size was metamorphically set to 1 and the test was using nonatomic copy. This commit fixes the flake by re-ordering the copied rows so that the failing one is copied first. Fixes #154418 Release note: None
1 parent 4b9c7ab commit e60fcba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/sql/copy/testdata/copy_from

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -800,8 +800,8 @@ CREATE POLICY p_sel ON rls_table FOR SELECT USING (true);
800800
# Deny some
801801
copy-from-error
802802
COPY rls_table FROM STDIN WITH CSV
803-
20,"twenty"
804803
4,"four (violates rls policy)"
804+
20,"twenty"
805805
----
806806
ERROR: new row violates row-level security policy for table "rls_table" (SQLSTATE 42501)
807807

0 commit comments

Comments
 (0)