summaryrefslogtreecommitdiff
path: root/src/modules/extra/m_mysql.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/extra/m_mysql.cpp')
-rw-r--r--src/modules/extra/m_mysql.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/modules/extra/m_mysql.cpp b/src/modules/extra/m_mysql.cpp
index 9c8e43a31..512780318 100644
--- a/src/modules/extra/m_mysql.cpp
+++ b/src/modules/extra/m_mysql.cpp
@@ -346,10 +346,16 @@ class MySQLresult : public SQLresult
virtual SQLfieldList* GetRowPtr()
{
+ SQLfieldList* fieldlist = new SQLfieldList();
+
if (currentrow < rows)
- return &fieldlists[currentrow++];
- else
- return &emptyfieldlist;
+ {
+ for (int i = 0; i < Rows(); i++)
+ {
+ fieldlist->push_back(fieldlists[currentrow][i]);
+ }
+ }
+ return fieldlist;
}
virtual SQLfieldMap* GetRowMapPtr()
@@ -380,6 +386,7 @@ class MySQLresult : public SQLresult
* destruct the object. Unlike the pgsql module,
* we only have the one.
*/
+ delete fl;
}
};