version 0.1.5
authorSomeDude <SomeDude@NuBL7aaJ6Cn4fB7GXFb9Zfi8w1FhPyW3oKgU9TweZMw>
Fri, 1 Feb 2008 08:40:00 +0000 (09:40 +0100)
committerDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Fri, 1 Feb 2008 08:40:00 +0000 (09:40 +0100)
include/db/sqlite3db/sqlite3statement.h
include/global.h
include/pthreadwrapper/deadlockexception.h
src/db/sqlite3statement.cpp
src/global.cpp

index 04b24a0..bdca9dc 100644 (file)
@@ -58,7 +58,7 @@ private:
 \r
        static std::map<sqlite3_stmt *, long> m_statementcount;\r
        //std::vector<char *> textptrs;\r
-       std::vector<std::vector<char>> m_boundtext;\r
+       //std::vector<std::vector<char> > m_boundtext;\r
 \r
 };     //class\r
 \r
index b2df48f..6f5445f 100644 (file)
@@ -5,7 +5,7 @@
 //#include <zthread/Thread.h>\r
 #include "pthreadwrapper/thread.h"\r
 \r
-#define FMS_VERSION    "0.1.4"\r
+#define FMS_VERSION    "0.1.5"\r
 \r
 // opens database and creates tables and initial inserts if necessary\r
 void SetupDB();\r
index 3f83736..9aa12ff 100644 (file)
@@ -9,7 +9,7 @@ namespace PThread
 class DeadlockException:public std::exception\r
 {\r
 public:\r
-       const char *what() const        { return "Deadlock Exception"; }\r
+       const char *what() const throw()        { return "Deadlock Exception"; }\r
 };\r
        \r
 }      // namespace\r
index 538ed06..60762f0 100644 (file)
@@ -54,6 +54,7 @@ Statement::~Statement()
                }\r
        }\r
        */\r
+\r
 }\r
 \r
 const bool Statement::Bind(const int column)\r
@@ -130,9 +131,10 @@ const bool Statement::Bind(const int column, const std::string &value)
                \r
                //ZThread::Guard<ZThread::Mutex> g(DB::instance()->m_mutex);\r
                PThread::Guard g(DB::Instance()->m_mutex);\r
-               m_boundtext.push_back(std::vector<char>(value.begin(),value.end()));\r
+               //m_boundtext.push_back(std::vector<char>(value.begin(),value.end()));\r
                //if(sqlite3_bind_text(m_statement,column+1,text,value.size(),NULL)==SQLITE_OK)\r
-               if(sqlite3_bind_text(m_statement,column+1,&m_boundtext[m_boundtext.size()-1][0],m_boundtext[m_boundtext.size()-1].size(),NULL)==SQLITE_OK)              \r
+               //if(sqlite3_bind_text(m_statement,column+1,&(m_boundtext[m_boundtext.size()-1][0]),(m_boundtext[m_boundtext.size()-1]).size(),NULL)==SQLITE_OK)                \r
+               if(sqlite3_bind_text(m_statement,column+1,value.c_str(),value.size(),SQLITE_TRANSIENT)==SQLITE_OK)\r
                {\r
                        return true;\r
                }\r
@@ -153,7 +155,7 @@ const bool Statement::Bind(const int column, const void *data, const int length)
        {\r
                //ZThread::Guard<ZThread::Mutex> g(DB::instance()->m_mutex);\r
                PThread::Guard g(DB::Instance()->m_mutex);\r
-               if(sqlite3_bind_blob(m_statement,column+1,data,length,NULL)==SQLITE_OK)\r
+               if(sqlite3_bind_blob(m_statement,column+1,data,length,SQLITE_TRANSIENT)==SQLITE_OK)\r
                {\r
                        return true;\r
                }\r
index d4cc101..291f06b 100644 (file)
@@ -426,13 +426,13 @@ void SetupDefaultOptions()
        st.Reset();\r
 \r
        st.Bind(0,"MessageDownloadMaxDaysBackward");\r
-       st.Bind(1,"3");\r
+       st.Bind(1,"5");\r
        st.Bind(2,"The maximum number of days backward that messages will be downloaded from each identity");\r
        st.Step();\r
        st.Reset();\r
 \r
        st.Bind(0,"MessageListDaysBackward");\r
-       st.Bind(1,"3");\r
+       st.Bind(1,"5");\r
        st.Bind(2,"The number of days backward that messages you have inserted will appear in your MessageLists");\r
        st.Step();\r
        st.Reset();\r