diff options
author | vvvv <vvvv@yandex-team.ru> | 2022-02-17 21:51:54 +0300 |
---|---|---|
committer | vvvv <vvvv@yandex-team.ru> | 2022-02-17 21:51:54 +0300 |
commit | af4af5b490ed7283af1288054d4581b1dbc64660 (patch) | |
tree | b415281886c4204cf7814c0a6c7407d383af8248 | |
parent | 455a394c254b2a060a469927fdfd64ebfbd0a628 (diff) | |
download | ydb-af4af5b490ed7283af1288054d4581b1dbc64660.tar.gz |
YQL-13710 more patches
ref:f7f115ba1d015bea4ed06219b534def1941a9de5
-rw-r--r-- | ydb/library/yql/parser/pg_query_wrapper/copy_src.py | 10 | ||||
-rw-r--r-- | ydb/library/yql/parser/pg_query_wrapper/postgresql/src/backend/access/transam/twophase.c | 4 |
2 files changed, 12 insertions, 2 deletions
diff --git a/ydb/library/yql/parser/pg_query_wrapper/copy_src.py b/ydb/library/yql/parser/pg_query_wrapper/copy_src.py index 4ced17c4ba..e087a8e9a6 100644 --- a/ydb/library/yql/parser/pg_query_wrapper/copy_src.py +++ b/ydb/library/yql/parser/pg_query_wrapper/copy_src.py @@ -9,6 +9,7 @@ all_vars = set() thread_funcs = [] define_for_yylval = None skip_func = False +split_def = False def fix_line(line): global define_for_yylval @@ -20,6 +21,15 @@ def fix_line(line): skip_func = True return line + global split_def + if line.startswith("static struct xllist"): + split_def = True + return "typedef struct xllist\n"; + + if split_def and line.startswith("}"): + split_def = False; + return "} xllist; static __thread xllist records;\n" + if "ConfigureNames" in line and line.strip().endswith("[] ="): skip_func = True return line diff --git a/ydb/library/yql/parser/pg_query_wrapper/postgresql/src/backend/access/transam/twophase.c b/ydb/library/yql/parser/pg_query_wrapper/postgresql/src/backend/access/transam/twophase.c index b52f17aae4..6622764d9b 100644 --- a/ydb/library/yql/parser/pg_query_wrapper/postgresql/src/backend/access/transam/twophase.c +++ b/ydb/library/yql/parser/pg_query_wrapper/postgresql/src/backend/access/transam/twophase.c @@ -994,14 +994,14 @@ typedef struct StateFileChunk struct StateFileChunk *next; } StateFileChunk; -static struct xllist +typedef struct xllist { StateFileChunk *head; /* first data block in the chain */ StateFileChunk *tail; /* last block in chain */ uint32 num_chunks; uint32 bytes_free; /* free bytes left in tail block */ uint32 total_len; /* total data bytes in chain */ -} records; +} xllist; static __thread xllist records; /* |