Repository navigation
Commit 5f3ddfe
committed
Retry a REGEXP match without JIT when its stack runs out
PHP's JIT stack is small, so a repeated group like '(a|b)*' failed
with "exceeded internal limits" on a subject of about 6,000
characters. MySQL matches such subjects, and trunk silently treated
them as not matching.
On PHP 7.3+, retry such a match with "(*NO_JIT)", which raises the
limit to about 50,000 characters. PHP 7.2 has no "(*NO_JIT)", and
matching without JIT can crash it, so it keeps the JIT limit of about
2,000 characters. Document the remaining limit.1 parent 28e562d commit 5f3ddfe
2 files changed
Lines changed: 65 additions & 10 deletions
File tree
- packages/mysql-on-sqlite
- src/sqlite
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
610 | 610 | | |
611 | 611 | | |
612 | 612 | | |
613 | | - | |
614 | | - | |
615 | | - | |
616 | | - | |
617 | | - | |
| 613 | + | |
618 | 614 | | |
619 | 615 | | |
620 | 616 | | |
| |||
634 | 630 | | |
635 | 631 | | |
636 | 632 | | |
637 | | - | |
638 | | - | |
639 | | - | |
640 | | - | |
641 | | - | |
| 633 | + | |
642 | 634 | | |
643 | 635 | | |
644 | 636 | | |
| |||
1078 | 1070 | | |
1079 | 1071 | | |
1080 | 1072 | | |
| 1073 | + | |
| 1074 | + | |
1081 | 1075 | | |
1082 | 1076 | | |
1083 | 1077 | | |
| |||
1209 | 1203 | | |
1210 | 1204 | | |
1211 | 1205 | | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
1212 | 1231 | | |
1213 | 1232 | | |
1214 | 1233 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
363 | 363 | | |
364 | 364 | | |
365 | 365 | | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
366 | 402 | | |
367 | 403 | | |
368 | 404 | | |
| |||
0 commit comments