mirror of
https://github.com/DBD-SQLite/DBD-SQLite
synced 2025-06-08 14:48:32 -04:00
DBD-SQLite: tentatively disabled collation_needed stuff as it leaks badly
This commit is contained in:
parent
976d04a682
commit
6cfea888c7
4 changed files with 18 additions and 4 deletions
|
@ -81,6 +81,7 @@ create_collation(dbh, name, func)
|
|||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
#if 0
|
||||
|
||||
static void
|
||||
collation_needed(dbh, callback)
|
||||
|
@ -93,6 +94,7 @@ collation_needed(dbh, callback)
|
|||
sqlite_db_collation_needed(aTHX_ dbh, callback );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static int
|
||||
progress_handler(dbh, n_opcodes, handler)
|
||||
|
|
2
dbdimp.c
2
dbdimp.c
|
@ -1300,6 +1300,7 @@ sqlite_db_create_collation(pTHX_ SV *dbh, const char *name, SV *func )
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
#if 0
|
||||
void
|
||||
sqlite_db_collation_needed_dispatcher (
|
||||
void *info,
|
||||
|
@ -1349,6 +1350,7 @@ sqlite_db_collation_needed(pTHX_ SV *dbh, SV *callback )
|
|||
sqlite_db_collation_needed_dispatcher );
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
int
|
||||
sqlite_db_generic_callback_dispatcher( void *callback )
|
||||
|
|
4
dbdimp.h
4
dbdimp.h
|
@ -78,11 +78,13 @@ struct aggrInfo {
|
|||
int inited;
|
||||
};
|
||||
|
||||
#if 0
|
||||
typedef struct collationNeededInfo collationNeededInfo;
|
||||
struct collationNeededInfo {
|
||||
SV *dbh;
|
||||
SV *callback;
|
||||
};
|
||||
#endif
|
||||
|
||||
int sqlite_db_create_function(pTHX_ SV *dbh, const char *name, int argc, SV *func);
|
||||
int sqlite_db_enable_load_extension(pTHX_ SV *dbh, int onoff);
|
||||
|
@ -95,7 +97,9 @@ int sqlite_db_busy_timeout (pTHX_ SV *dbh, int timeout );
|
|||
int sqlite_db_backup_from_file(pTHX_ SV *dbh, char *filename);
|
||||
int sqlite_db_backup_to_file(pTHX_ SV *dbh, char *filename);
|
||||
|
||||
#if 0
|
||||
void sqlite_db_collation_needed(pTHX_ SV *dbh, SV *callback );
|
||||
#endif
|
||||
SV* sqlite_db_commit_hook( pTHX_ SV *dbh, SV *hook );
|
||||
SV* sqlite_db_rollback_hook( pTHX_ SV *dbh, SV *hook );
|
||||
SV* sqlite_db_update_hook( pTHX_ SV *dbh, SV *hook );
|
||||
|
|
|
@ -46,7 +46,7 @@ sub driver {
|
|||
DBD::SQLite::db->install_method('sqlite_create_function');
|
||||
DBD::SQLite::db->install_method('sqlite_create_aggregate');
|
||||
DBD::SQLite::db->install_method('sqlite_create_collation');
|
||||
DBD::SQLite::db->install_method('sqlite_collation_needed');
|
||||
# DBD::SQLite::db->install_method('sqlite_collation_needed');
|
||||
DBD::SQLite::db->install_method('sqlite_progress_handler');
|
||||
DBD::SQLite::db->install_method('sqlite_commit_hook');
|
||||
DBD::SQLite::db->install_method('sqlite_rollback_hook');
|
||||
|
@ -120,9 +120,15 @@ sub connect {
|
|||
DBD::SQLite::db::_login($dbh, $real, $user, $auth) or return undef;
|
||||
|
||||
# Register the on-demand collation installer
|
||||
$DBI::VERSION >= 1.608
|
||||
? $dbh->sqlite_collation_needed(\&install_collation)
|
||||
: $dbh->func(\&install_collation, "collation_needed");
|
||||
# $DBI::VERSION >= 1.608
|
||||
# ? $dbh->sqlite_collation_needed(\&install_collation)
|
||||
# : $dbh->func(\&install_collation, "collation_needed");
|
||||
|
||||
# XXX: Current collation_needed implementation is leaking badly.
|
||||
# Don't use it before we fix the leak.
|
||||
foreach my $collation_name(keys %DBD::SQLite::COLLATION) {
|
||||
install_collation($dbh, $collation_name);
|
||||
}
|
||||
|
||||
# Register the REGEXP function
|
||||
$DBI::VERSION >= 1.608
|
||||
|
|
Loading…
Add table
Reference in a new issue