resetHasPartitionComment before raw_parser

This commit is contained in:
wuyuechuan
2022-09-22 14:53:43 +08:00
parent 967eafed4e
commit 953ca9a25f
3 changed files with 13 additions and 1 deletions

View File

@ -33,6 +33,11 @@ static void resetIsTimeCapsuleFlag()
u_sess->parser_cxt.isTimeCapsule = false;
}
static void resetHasPartitionComment()
{
u_sess->parser_cxt.hasPartitionComment = false;
}
static void resetCreateFuncFlag()
{
u_sess->parser_cxt.isCreateFuncOrProc = false;
@ -57,7 +62,10 @@ List* raw_parser(const char* str, List** query_string_locationlist)
/* reset u_sess->parser_cxt.stmt_contains_operator_plus */
resetOperatorPlusFlag();
/* reset u_sess->parser_cxt.hasPartitionComment */
resetHasPartitionComment();
/* reset u_sess->parser_cxt.isTimeCapsule */
resetIsTimeCapsuleFlag();

View File

@ -81,6 +81,9 @@ create table partition_test(c1 int, c2 int, logdate date not null) comment 'part
PARTITION partition_test_p1 VALUES LESS THAN ('2020-04-01'),
PARTITION partition_test_p2 VALUES LESS THAN ('2020-05-01')
);
alter table partition_test add partition p4 values LESS THAN ('2020-06-01') comment 'p4';
WARNING: comment is not allowed in partition/subpartition.
ERROR: can not add partition against interval partitioned table
create index partition_test_index on partition_test (logdate) local
(
partition sip1_index_local,

View File

@ -62,6 +62,7 @@ create table partition_test(c1 int, c2 int, logdate date not null) comment 'part
PARTITION partition_test_p1 VALUES LESS THAN ('2020-04-01'),
PARTITION partition_test_p2 VALUES LESS THAN ('2020-05-01')
);
alter table partition_test add partition p4 values LESS THAN ('2020-06-01') comment 'p4';
create index partition_test_index on partition_test (logdate) local
(
partition sip1_index_local,