Increase default bison stack.

This commit is contained in:
totaj
2022-12-14 17:23:15 +08:00
parent 5d4ad6ccea
commit 417e617fee
3 changed files with 27 additions and 0 deletions

View File

@ -49,9 +49,11 @@ gram.cpp: gram.y
ifdef BISON
$(BISON) -d $(BISONFLAGS) -o $@ $<
sed -i 's/YY_NULL nullptr/YY_NULL 0/g' gram.cpp
sed -i 's/\# define YYINITDEPTH .*/\# define YYINITDEPTH 1000/g' gram.cpp
else
@$(missing) bison $< $@
sed -i 's/YY_NULL nullptr/YY_NULL 0/g' gram.cpp
sed -i 's/\# define YYINITDEPTH .*/\# define YYINITDEPTH 1000/g' gram.cpp
endif
scan.inc: scan.l

View File

@ -463,3 +463,17 @@ create table create_partition_table_059(score_1 timestamp,score_2 int) partition
partition create_partition_table_059_001 values less than ('2019-08-01')
);
ERROR: duplicate partition name: "create_partition_table_059_001"
-- Check that stack depth of bison
select ('aa'||(1||(2||(3)||(4||(5||(6||(7||(8||(9||(10||
('bb'||(1||(2||(3)||(4||(5||(6||(7||(8||(9||(10||
('cc'||(1||(2||(3)||(4||(5||(6||(7||(8||(9||(10||
('dd'||(1||(2||(3)||(4||(5||(6||(7||(8||(9||(10||
('ee'||(1||(2||(3)||(4||(5||(6||(7||(8||(9||(10||
('ff'||(1||(2||(3)||(4||(5||(6||(7||(8||(9||(10||
('gg'||(1||(2||(3||(4||(5||(6||(7||(8||(9||(10)))))))))))
))))))))))))))))))))))))))))))))))))))))))))))))))))))))))));
?column?
---------------------------------------------------------------------------------------------
aa12345678910bb12345678910cc12345678910dd12345678910ee12345678910ff12345678910gg12345678910
(1 row)

View File

@ -384,3 +384,14 @@ create table create_partition_table_059(score_1 timestamp,score_2 int) partition
partition create_partition_table_059_001 values less than ('2009-08-01'),
partition create_partition_table_059_001 values less than ('2019-08-01')
);
-- Check that stack depth of bison
select ('aa'||(1||(2||(3)||(4||(5||(6||(7||(8||(9||(10||
('bb'||(1||(2||(3)||(4||(5||(6||(7||(8||(9||(10||
('cc'||(1||(2||(3)||(4||(5||(6||(7||(8||(9||(10||
('dd'||(1||(2||(3)||(4||(5||(6||(7||(8||(9||(10||
('ee'||(1||(2||(3)||(4||(5||(6||(7||(8||(9||(10||
('ff'||(1||(2||(3)||(4||(5||(6||(7||(8||(9||(10||
('gg'||(1||(2||(3||(4||(5||(6||(7||(8||(9||(10)))))))))))
))))))))))))))))))))))))))))))))))))))))))))))))))))))))))));