mirror of
https://github.com/DBD-SQLite/DBD-SQLite
synced 2025-06-08 22:58:17 -04:00
DBD-SQLite: applied an enable_load_extension patch from RT #32998
This commit is contained in:
parent
0f85d36044
commit
6b8dc80622
3 changed files with 26 additions and 2 deletions
|
@ -42,6 +42,15 @@ create_function(dbh, name, argc, func)
|
||||||
sqlite3_db_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
|
void
|
||||||
create_aggregate(dbh, name, argc, aggr)
|
create_aggregate(dbh, name, argc, aggr)
|
||||||
SV *dbh
|
SV *dbh
|
||||||
|
|
14
dbdimp.c
14
dbdimp.c
|
@ -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;
|
typedef struct aggrInfo aggrInfo;
|
||||||
struct aggrInfo {
|
struct aggrInfo {
|
||||||
SV *aggr_inst;
|
SV *aggr_inst;
|
||||||
|
|
5
dbdimp.h
5
dbdimp.h
|
@ -72,9 +72,10 @@ struct imp_sth_st {
|
||||||
#define dbd_st_bind_col sqlite_bind_col
|
#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_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 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 sqlite3_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_progress_handler(SV *dbh, int n_opcodes, SV *handler);
|
||||||
void sqlite_st_reset( SV *sth );
|
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 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 );
|
int dbd_set_sqlite3_busy_timeout ( SV *dbh, int timeout );
|
||||||
|
|
Loading…
Add table
Reference in a new issue