Closed CortexPE closed 4 years ago
SQLite3::escapeString() currently is not binary-safe, which causes blob data to be encoded into the final query incorrectly.
SQLite3::escapeString()
This can be tested by inserting binary data (with \0 a.k.a. the NULL character) into a blob column.
\0
NULL
Without this patch, it would only insert the first-n bytes before a \0 is encountered.
Before:
After:
To be precise, this is binary string support, not blob data support.
Please update the CHANGELOG.md, then I will merge this.
SQLite3::escapeString()
currently is not binary-safe, which causes blob data to be encoded into the final query incorrectly.This can be tested by inserting binary data (with
\0
a.k.a. theNULL
character) into a blob column.Without this patch, it would only insert the first-n bytes before a
\0
is encountered.Before:![image](https://user-images.githubusercontent.com/17762324/85442253-8e114200-b5c2-11ea-9746-1879d4ff63df.png)
After:![image](https://user-images.githubusercontent.com/17762324/85442295-a1241200-b5c2-11ea-9442-7417fc1c71aa.png)