Skip to content

Commit 6f6d168

Browse files
committed
Fix problem with CREATE DATABASE and PAGE_SIZE. Thanks Pavel Zotov.
1 parent b1becab commit 6f6d168

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/yvalve/preparse.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ enum pp_vals {
3838
PP_CREATE = 0,
3939
PP_DATABASE,
4040
PP_PAGE_SIZE,
41+
// Do not change order of above symbols. See usage of PP_PAGE_SIZE below for DPB creation.
4142
PP_USER,
4243
PP_PASSWORD,
4344
PP_PAGESIZE,
@@ -242,7 +243,7 @@ bool PREPARSE_execute(CheckStatusWrapper* status, Why::YAttachment** ptrAtt,
242243
}
243244

244245
matched = false;
245-
for (int i = 3; pp_symbols[i].symbol[0] && !matched; i++)
246+
for (int i = PP_PAGE_SIZE; pp_symbols[i].symbol[0] && !matched; i++)
246247
{
247248
if (token == pp_symbols[i].symbol)
248249
{

0 commit comments

Comments
 (0)