If I bind an empty string which happens to point at null, the sqlite3 C library thinks I am setting it to null.
Given how the d2sqlite3 library tries at all costs to build a string if the thing isn't exactly a string, this results in it being very likely the pointer will be null.
The third argument is the value to bind to the parameter. If the third parameter to sqlite3_bind_text() or sqlite3_bind_text16() or sqlite3_bind_blob() is a NULL pointer then the fourth parameter is ignored and the end result is the same as sqlite3_bind_null()
This is causing problems where I'm saving a string that is empty in a non-null field. The library should pass in a non-null pointer when the pointer is null and the length is 0 to avoid this situation.
If I bind an empty string which happens to point at
null
, the sqlite3 C library thinks I am setting it to null.Given how the d2sqlite3 library tries at all costs to build a string if the thing isn't exactly a string, this results in it being very likely the pointer will be null.
Read this note from sqlite.org
This is causing problems where I'm saving a string that is empty in a non-null field. The library should pass in a non-null pointer when the pointer is null and the length is 0 to avoid this situation.