Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:11.4
libvpd2
libvpd.async.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File libvpd.async.patch of Package libvpd2
--- src/vpddbenv.cpp | 16 ++++++++++++++++ src/vpddbenv_c.c | 9 +++++++++ 2 files changed, 25 insertions(+) --- a/src/vpddbenv.cpp +++ b/src/vpddbenv.cpp @@ -77,6 +77,22 @@ namespace lsvpd goto CON_ERR; } + { + sqlite3_stmt *pstmt; + const char *out; + ostringstream sql; + sql << "PRAGMA synchronous = OFF;"; + string stmt = sql.str( ); + rc = SQLITE3_PREPARE( mpVpdDb, stmt.c_str( ), + stmt.length( ) + 1, &pstmt, &out ); + if( rc != SQLITE_OK ) + { + message << "SQLITE Error setting pragma " << rc << ": " << + sqlite3_errmsg( mpVpdDb ) << endl; + } + sqlite3_finalize( pstmt ); + } + if( !dbExists ) { sqlite3_stmt *pstmt; --- a/src/vpddbenv_c.c +++ b/src/vpddbenv_c.c @@ -28,6 +28,9 @@ struct vpddbenv * new_vpddbenv( const char *dir, const char *file ) { + sqlite3_stmt *pstmt = NULL; + const char *out; + char sql[ QUERY_BUF_LENGTH ]; struct vpddbenv *ret = NULL; int rc = 0; @@ -55,6 +58,12 @@ struct vpddbenv * new_vpddbenv( const ch if( rc != SQLITE_OK ) goto newerr; + memset( sql, 0, QUERY_BUF_LENGTH ); + snprintf(sql, QUERY_BUF_LENGTH, "PRAGMA synchronous = OFF;"); + rc = SQLITE3_PREPARE(&(ret->db), sql, strlen(sql)+1, &pstmt, &out); + if( rc != SQLITE_OK ) + fprintf( stderr, "sqlite pragma async %d '%s'\n",rc, sqlite3_errmsg( ret->db ) ); + sqlite3_finalize( pstmt ); return ret; newerr:
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor