mirror of
https://github.com/DBD-SQLite/DBD-SQLite
synced 2025-06-07 22:28:47 -04:00
use SQLITE_STATIC instead of SQLITE_TRANSIENT in execute()
This makes execute() a little bit faster, because SQLite no longer has to copy binded params.
This commit is contained in:
parent
b8c5535548
commit
992ae4650d
1 changed files with 2 additions and 2 deletions
4
dbdimp.c
4
dbdimp.c
|
@ -954,7 +954,7 @@ sqlite_st_execute(SV *sth, imp_sth_t *imp_sth)
|
||||||
else if (sql_type == SQLITE_BLOB) {
|
else if (sql_type == SQLITE_BLOB) {
|
||||||
STRLEN len;
|
STRLEN len;
|
||||||
char * data = SvPVbyte(value, len);
|
char * data = SvPVbyte(value, len);
|
||||||
rc = sqlite3_bind_blob(imp_sth->stmt, i+1, data, len, SQLITE_TRANSIENT);
|
rc = sqlite3_bind_blob(imp_sth->stmt, i+1, data, len, SQLITE_STATIC);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
STRLEN len;
|
STRLEN len;
|
||||||
|
@ -1003,7 +1003,7 @@ sqlite_st_execute(SV *sth, imp_sth_t *imp_sth)
|
||||||
(sql_type == SQLITE_INTEGER ? "integer" : "float")
|
(sql_type == SQLITE_INTEGER ? "integer" : "float")
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
rc = sqlite3_bind_text(imp_sth->stmt, i+1, data, len, SQLITE_TRANSIENT);
|
rc = sqlite3_bind_text(imp_sth->stmt, i+1, data, len, SQLITE_STATIC);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue