You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I am trying to use the re extension for RegEx (on Windows, compiling for 32-bit). Functions all work, except for the regexp_replace function. It returns correctly when it doesn't find anything to replace, but there is a strange effect when something is replaced:
My Test case is select regexp_replace('The current year is AD 2025', '[0-9]+', '2050')
The result varies on each call. For example, here are ten calls: mainThe current year is AD
sqlThe current year is AD 2
The current year is AD 2050
The current year is AD 2050
sqlite_masterThe current ye
tbl_name='AAA' AND type!='t
mainThe current year is AD
sqlite_masterThe current ye
The current year is AD 2050
TEXTThe current year is AD
It behaves as if the call I make to sqlite_column_text() returns a pointer that is a variable number of bytes smaller than the actual start of the result string. I thus read some other bit of memory before the actual value starts, and loss the end of the value (I copy a number of bytes returned by sqlite3_column_bytes()).
Any ideas of what might be wrong?
-- James Powell
The text was updated successfully, but these errors were encountered:
Hello, I am trying to use the re extension for RegEx (on Windows, compiling for 32-bit). Functions all work, except for the regexp_replace function. It returns correctly when it doesn't find anything to replace, but there is a strange effect when something is replaced:
My Test case is
select regexp_replace('The current year is AD 2025', '[0-9]+', '2050')
The result varies on each call. For example, here are ten calls:
mainThe current year is AD
sqlThe current year is AD 2
The current year is AD 2050
The current year is AD 2050
sqlite_masterThe current ye
tbl_name='AAA' AND type!='t
mainThe current year is AD
sqlite_masterThe current ye
The current year is AD 2050
TEXTThe current year is AD
It behaves as if the call I make to sqlite_column_text() returns a pointer that is a variable number of bytes smaller than the actual start of the result string. I thus read some other bit of memory before the actual value starts, and loss the end of the value (I copy a number of bytes returned by sqlite3_column_bytes()).
Any ideas of what might be wrong?
-- James Powell
The text was updated successfully, but these errors were encountered: