]> granicus.if.org Git - pdns/commitdiff
move sqlite3 to sqlite3_prepare_v2 which should bring improved error reporting. Close...
authorBert Hubert <bert.hubert@netherlabs.nl>
Tue, 22 Mar 2011 19:43:18 +0000 (19:43 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Tue, 22 Mar 2011 19:43:18 +0000 (19:43 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@2086 d19b8d6e-7fed-0310-83ef-9ca221ded41b

modules/gsqlite3backend/ssqlite3.cc

index 7d0f61a35ea5940a847dffe33a2e55c8ff61f8c4..1a850b4c80a4389edc3d2fbaacf0a394b4e920c7 100644 (file)
@@ -69,7 +69,7 @@ int SSQLite3::doQuery( const std::string & query )
   const char *pTail;
   // Execute the query.
   
-  if ( sqlite3_prepare( m_pDB, query.c_str(), -1, &m_pStmt, &pTail ) != SQLITE_OK )
+  if ( sqlite3_prepare_v2( m_pDB, query.c_str(), -1, &m_pStmt, &pTail ) != SQLITE_OK )
     throw sPerrorException( string("Unable to compile SQLite statement : ")+ sqlite3_errmsg( m_pDB ) );
   return 0;
 }