diff options
author | Jiri Moskovcak <jmoskovc@redhat.com> | 2009-02-20 14:42:34 +0100 |
---|---|---|
committer | Jiri Moskovcak <jmoskovc@redhat.com> | 2009-02-20 14:42:34 +0100 |
commit | 344018eb919c48c333bdf6aa1479b82c9a457a5c (patch) | |
tree | ddfcd566b44f4f9314457949347516ca669fc9c5 /lib/Plugins/SQLite3.cpp | |
parent | 51b8a58f3b49661f5b97a714571d6caa77ec25d0 (diff) | |
download | abrt-344018eb919c48c333bdf6aa1479b82c9a457a5c.tar.gz abrt-344018eb919c48c333bdf6aa1479b82c9a457a5c.tar.xz abrt-344018eb919c48c333bdf6aa1479b82c9a457a5c.zip |
Fixed table indices in sqlite plugin.
Diffstat (limited to 'lib/Plugins/SQLite3.cpp')
-rw-r--r-- | lib/Plugins/SQLite3.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/Plugins/SQLite3.cpp b/lib/Plugins/SQLite3.cpp index f96f3fa..6553fda 100644 --- a/lib/Plugins/SQLite3.cpp +++ b/lib/Plugins/SQLite3.cpp @@ -23,6 +23,7 @@ #include <sqlite3.h> #include "SQLite3.h" #include <string> +#include <iostream> #define TABLE_NAME "CrashCatcher" @@ -75,23 +76,24 @@ void CSQLite3::GetTable(const std::string& pCommand, vector_database_rows_t& pTa { switch(jj) { - case 0: row.m_sUUID = table[jj + ncol]; + case 0: row.m_sUUID = table[jj +(ncol*ii) + ncol]; break; - case 1: row.m_sUID = table[jj + ncol]; + case 1: row.m_sUID = table[jj +(ncol*ii) + ncol]; break; - case 2: row.m_sDebugDumpDir = table[jj + ncol]; + case 2: row.m_sDebugDumpDir = table[jj +(ncol*ii) + ncol]; break; - case 3: row.m_sCount = table[jj + ncol]; + case 3: row.m_sCount = table[jj +(ncol*ii) + ncol]; break; - case 4: row.m_sReported = table[jj + ncol]; + case 4: row.m_sReported = table[jj +(ncol*ii) + ncol]; break; - case 5: row.m_sTime = table[jj + ncol]; + case 5: row.m_sTime = table[jj +(ncol*ii) + ncol]; break; default: break; } } pTable.push_back(row); + } sqlite3_free_table(table); } |