diff options
author | drh <> | 2021-12-31 22:53:15 +0000 |
---|---|---|
committer | drh <> | 2021-12-31 22:53:15 +0000 |
commit | 017e36378716dade19b23bde94cd3678ca2fdd4c (patch) | |
tree | 8cd453c683896ce87f2866f94290f2b5d5b7563f /ext/misc/regexp.c | |
parent | 54bc63815a14bc0c47d3d3f1bbecdf9eddd4feff (diff) | |
download | sqlite-017e36378716dade19b23bde94cd3678ca2fdd4c.tar.gz sqlite-017e36378716dade19b23bde94cd3678ca2fdd4c.zip |
Mark the REGEXP operator in the built-in extension as deterministic.
FossilOrigin-Name: e654b57a9fc32021453eed48d1c1bba65c833fb1aac3946567968c877e4cbd10
Diffstat (limited to 'ext/misc/regexp.c')
-rw-r--r-- | ext/misc/regexp.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/ext/misc/regexp.c b/ext/misc/regexp.c index f282e777f..b626ca424 100644 --- a/ext/misc/regexp.c +++ b/ext/misc/regexp.c @@ -759,13 +759,15 @@ int sqlite3_regexp_init( int rc = SQLITE_OK; SQLITE_EXTENSION_INIT2(pApi); (void)pzErrMsg; /* Unused */ - rc = sqlite3_create_function(db, "regexp", 2, SQLITE_UTF8|SQLITE_INNOCUOUS, - 0, re_sql_func, 0, 0); + rc = sqlite3_create_function(db, "regexp", 2, + SQLITE_UTF8|SQLITE_INNOCUOUS|SQLITE_DETERMINISTIC, + 0, re_sql_func, 0, 0); if( rc==SQLITE_OK ){ /* The regexpi(PATTERN,STRING) function is a case-insensitive version ** of regexp(PATTERN,STRING). */ - rc = sqlite3_create_function(db, "regexpi", 2, SQLITE_UTF8|SQLITE_INNOCUOUS, - (void*)db, re_sql_func, 0, 0); + rc = sqlite3_create_function(db, "regexpi", 2, + SQLITE_UTF8|SQLITE_INNOCUOUS|SQLITE_DETERMINISTIC, + (void*)db, re_sql_func, 0, 0); } return rc; } |