ownSql: Always use SQLITE_TRANSIENT

More safe.
This commit is contained in:
Markus Goetz 2014-10-16 15:30:50 +02:00
parent 707d6880a8
commit 2d420cd72c

View File

@ -192,7 +192,7 @@ void SqlQuery::bindValue(int pos, const QVariant& value)
// lifetime of string == lifetime of its qvariant
const QString *str = static_cast<const QString*>(value.constData());
res = sqlite3_bind_text16(_stmt, pos, str->utf16(),
(str->size()) * sizeof(QChar), SQLITE_STATIC);
(str->size()) * sizeof(QChar), SQLITE_TRANSIENT);
} else {
// unbound value create a null entry.
res = SQLITE_OK;