From c58481a663f950fc4fb42a0d9240e7fb645964cd Mon Sep 17 00:00:00 2001 From: luozihao <1165977584@qq.com> Date: Wed, 31 Mar 2021 10:57:36 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=85=85=E6=B5=8B=E8=AF=95=E7=94=A8?= =?UTF-8?q?=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/test/regress/input/sequence_cache_test.source | 3 +++ src/test/regress/output/sequence_cache_test.source | 10 ++++++++++ 2 files changed, 13 insertions(+) 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;