diff Core/SQLite/Statement.cpp @ 137:0e97abc7b950

fix of a bug in older versions of sqlite
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 10 Oct 2012 13:13:14 +0200
parents 6212bf978584
children bdd72233b105
line wrap: on
line diff
--- a/Core/SQLite/Statement.cpp	Tue Oct 09 18:21:01 2012 +0200
+++ b/Core/SQLite/Statement.cpp	Wed Oct 10 13:13:14 2012 +0200
@@ -42,6 +42,7 @@
 #include <boost/lexical_cast.hpp>
 #include <sqlite3.h>
 #include <string.h>
+#include <glog/logging.h>
 
 namespace Orthanc
 {
@@ -106,11 +107,13 @@
 
     bool Statement::Run()
     {
+      VLOG(1) << "SQLite::Statement::Run " << sqlite3_sql(GetStatement());
       return CheckError(sqlite3_step(GetStatement())) == SQLITE_DONE;
     }
 
     bool Statement::Step()
     {
+      VLOG(1) << "SQLite::Statement::Step " << sqlite3_sql(GetStatement());
       return CheckError(sqlite3_step(GetStatement())) == SQLITE_ROW;
     }
 
@@ -121,6 +124,7 @@
       // spurious error callback.
       if (clear_bound_vars)
         sqlite3_clear_bindings(GetStatement());
+      //VLOG(1) << "SQLite::Statement::Reset";
       sqlite3_reset(GetStatement());
     }