diff --git a/src/test/regress/input/sequence_cache_test.source b/src/test/regress/input/sequence_cache_test.source index 5b51ad3bf..d3f9985ab 100644 --- a/src/test/regress/input/sequence_cache_test.source +++ b/src/test/regress/input/sequence_cache_test.source @@ -16,6 +16,9 @@ select last_value from test_seq; \! @abs_bindir@/gsql -d regression -p @portstring@ -U test_user -W openGauss@123 -c "insert into test_tab(name) values('test7');" \! @abs_bindir@/gsql -d regression -p @portstring@ -U test_user -W openGauss@123 -c "select last_value from test_seq;" \! @abs_bindir@/gsql -d regression -p @portstring@ -U test_user -W openGauss@123 -c "select * from test_tab;" +\! @abs_bindir@/gsql -d regression -p @portstring@ -U test_user -W openGauss@123 -c "Alter sequence test_seq cache 3;" +\! @abs_bindir@/gsql -d regression -p @portstring@ -U test_user -W openGauss@123 -c "insert into test_tab(name) values('test9');" +\! @abs_bindir@/gsql -d regression -p @portstring@ -U test_user -W openGauss@123 -c "select last_value from test_seq;" drop user test_user cascade; drop table if exists test_tab; drop sequence if exists test_seq; \ No newline at end of file diff --git a/src/test/regress/output/sequence_cache_test.source b/src/test/regress/output/sequence_cache_test.source index 0b1fcdd31..f9345b409 100644 --- a/src/test/regress/output/sequence_cache_test.source +++ b/src/test/regress/output/sequence_cache_test.source @@ -69,6 +69,16 @@ INSERT 0 1 7 | test7 (5 rows) +\! @abs_bindir@/gsql -d regression -p @portstring@ -U test_user -W openGauss@123 -c "Alter sequence test_seq cache 3;" +ALTER SEQUENCE +\! @abs_bindir@/gsql -d regression -p @portstring@ -U test_user -W openGauss@123 -c "insert into test_tab(name) values('test9');" +INSERT 0 1 +\! @abs_bindir@/gsql -d regression -p @portstring@ -U test_user -W openGauss@123 -c "select last_value from test_seq;" + last_value +------------ + 11 +(1 row) + drop user test_user cascade; drop table if exists test_tab; drop sequence if exists test_seq;