Stricter enforcement of the LIKE_PATTERN_LENGTH for the regexp extension.
FossilOrigin-Name: c94b1e9c5674f7d0ad75d91085262f38cba6036979e8a0f9d39edc7db841915f
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
#!sqlite3
|
||||
#
|
||||
# 2025-12-16
|
||||
#
|
||||
# The author disclaims copyright to this source code. In place of
|
||||
# a legal notice, here is a blessing:
|
||||
#
|
||||
# May you do good and not evil.
|
||||
# May you find forgiveness for yourself and forgive others.
|
||||
# May you share freely, never taking more than you give.
|
||||
#
|
||||
#***********************************************************************
|
||||
#
|
||||
# Test cases for the oversized patterns in the REGEXP extension found
|
||||
# at ext/misc/regexp.c.
|
||||
#
|
||||
.mode list
|
||||
.testcase 100
|
||||
-- 0 1 2 3 4
|
||||
-- 123456789 123456789 123456789 123456789 123
|
||||
SELECT 'abcdefg' REGEXP '((((((((((((((((((abcdefg))))))))))))))))))';
|
||||
.check "1\n"
|
||||
|
||||
.limit like_pattern_length 42
|
||||
.testcase 110
|
||||
SELECT 'abcdefg' REGEXP '((((((((((((((((((abcdefg))))))))))))))))))';
|
||||
.check -glob "Error near line #: REGEXP pattern too big*"
|
||||
|
||||
.limit like_pattern_length 43
|
||||
.testcase 120
|
||||
SELECT 'abcdefg' REGEXP '((((((((((((((((((abcdefg))))))))))))))))))';
|
||||
.check "1\n"
|
||||
@@ -42,5 +42,6 @@ proc do_clitest {name} {
|
||||
do_clitest modeA.sql
|
||||
do_clitest dblwidth-a.sql
|
||||
do_clitest vt100-a.sql
|
||||
do_clitest regexp1.sql
|
||||
|
||||
finish_test
|
||||
|
||||
Reference in New Issue
Block a user