1
0
Fork 0
mirror of https://github.com/DBD-SQLite/DBD-SQLite synced 2025-06-08 14:48:32 -04:00

DBD-SQLite: applied an enable_load_extension patch from RT #32998

This commit is contained in:
Kenichi Ishigaki 2009-04-05 13:04:56 +00:00
parent 0f85d36044
commit 6b8dc80622
3 changed files with 26 additions and 2 deletions

View file

@ -42,6 +42,15 @@ create_function(dbh, name, argc, func)
sqlite3_db_create_function( dbh, name, argc, func );
}
void
enable_load_extension(dbh, onoff)
SV *dbh
int onoff
CODE:
{
sqlite3_db_enable_load_extension( dbh, onoff );
}
void
create_aggregate(dbh, name, argc, aggr)
SV *dbh

View file

@ -939,6 +939,20 @@ sqlite3_db_create_function( SV *dbh, const char *name, int argc, SV *func )
}
}
void
sqlite3_db_enable_load_extension( SV *dbh, int onoff )
{
D_imp_dbh(dbh);
int rv;
rv = sqlite3_enable_load_extension( imp_dbh->db, onoff );
if ( rv != SQLITE_OK )
{
croak( "sqlite_enable_load_extension failed with error %s",
sqlite3_errmsg(imp_dbh->db) );
}
}
typedef struct aggrInfo aggrInfo;
struct aggrInfo {
SV *aggr_inst;

View file

@ -72,9 +72,10 @@ struct imp_sth_st {
#define dbd_st_bind_col sqlite_bind_col
void sqlite3_db_create_function(SV *dbh, const char *name, int argc, SV *func);
void sqlite3_db_enable_load_extension(SV *dbh, int onoff);
void sqlite3_db_create_aggregate( SV *dbh, const char *name, int argc, SV *aggr );
void sqlite_db_create_collation(SV *dbh, const char *name, SV *func);
void sqlite_db_progress_handler(SV *dbh, int n_opcodes, SV *handler);
void sqlite3_db_create_collation(SV *dbh, const char *name, SV *func);
void sqlite3_db_progress_handler(SV *dbh, int n_opcodes, SV *handler);
void sqlite_st_reset( SV *sth );
int sqlite_bind_col( SV *sth, imp_sth_t *imp_sth, SV *col, SV *ref, IV sql_type, SV *attribs );
int dbd_set_sqlite3_busy_timeout ( SV *dbh, int timeout );