| От | Andrew Gierth |
|---|---|
| Тема | pgsql: Reduce an unnecessary O(N^3) loop in lexer. |
| Дата | |
| Msg-id | E1fswXG-0001Op-QL@gemulon.postgresql.org обсуждение исходный текст |
| Список | pgsql-committers |
Reduce an unnecessary O(N^3) loop in lexer. The lexer's handling of operators contained an O(N^3) hazard when dealing with long strings of + or - characters; it seems hard to prevent this case from being O(N^2), but the additional N multiplier was not needed. Backpatch all the way since this has been there since 7.x, and it presents at least a mild hazard in that trying to do Bind, PREPARE or EXPLAIN on a hostile query could take excessive time (without honouring cancels or timeouts) even if the query was never executed. Branch ------ REL9_4_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/6c5ed6836340a801d522f620dceca1469b5bfbbc Modified Files -------------- src/backend/parser/scan.l | 29 +++++++++++++++++++++-------- src/bin/psql/psqlscan.l | 29 +++++++++++++++++++++-------- src/interfaces/ecpg/preproc/pgc.l | 29 +++++++++++++++++++++-------- 3 files changed, 63 insertions(+), 24 deletions(-)
В списке pgsql-committers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера