Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita8ce5c8

Browse files
committed
Remember to reset yy_start state when firing up repl_scanner.l.
Without this, we get odd behavior when the previous cycle oflexing exited in a non-default exclusive state. Every othercopy of this code is aware that it has to do BEGIN(INITIAL),but repl_scanner.l did not get that memo.The real-world impact of this is probably limited, since mostreplication clients would abandon their connection after gettinga syntax error. Still, it's a bug.This mistake is old, so back-patch to all supported branches.Discussion:https://postgr.es/m/1874781.1643035952@sss.pgh.pa.us
1 parent68cc72d commita8ce5c8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

‎src/backend/replication/repl_scanner.l

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,9 @@ replication_scanner_init(const char *str)
243243
memcpy(scanbuf, str, slen);
244244
scanbuf[slen] = scanbuf[slen +1] = YY_END_OF_BUFFER_CHAR;
245245
scanbufhandle =yy_scan_buffer(scanbuf, slen +2);
246+
247+
/* Make sure we start in proper state */
248+
BEGIN(INITIAL);
246249
}
247250

248251
void

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp