aboutsummaryrefslogtreecommitdiff
path: root/src/shared/Database/QueryResultMysql.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-06-01 21:52:17 -0500
committermegamage <none@none>2009-06-01 21:52:17 -0500
commit7344a5ef6f776f355cda34da77d2aed01f228b47 (patch)
tree8f02e0317c9a53de26f59f64f43456f397a4724c /src/shared/Database/QueryResultMysql.cpp
parentb05ebfa8e90def21baa98707a1d5e9185950de74 (diff)
[7935] Move seldom used access to query data by field names to independent object. Author: VladimirMangos
This let not do preparation code for unused later functionlity. --HG-- branch : trunk
Diffstat (limited to 'src/shared/Database/QueryResultMysql.cpp')
-rw-r--r--src/shared/Database/QueryResultMysql.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/shared/Database/QueryResultMysql.cpp b/src/shared/Database/QueryResultMysql.cpp
index 5bc11ae308f..2e4738469c9 100644
--- a/src/shared/Database/QueryResultMysql.cpp
+++ b/src/shared/Database/QueryResultMysql.cpp
@@ -22,20 +22,15 @@
#include "DatabaseEnv.h"
-QueryResultMysql::QueryResultMysql(MYSQL_RES *result, uint64 rowCount, uint32 fieldCount) :
-QueryResult(rowCount, fieldCount), mResult(result)
+QueryResultMysql::QueryResultMysql(MYSQL_RES *result, MYSQL_FIELD *fields, uint64 rowCount, uint32 fieldCount) :
+ QueryResult(rowCount, fieldCount), mResult(result)
{
mCurrentRow = new Field[mFieldCount];
ASSERT(mCurrentRow);
- MYSQL_FIELD *fields = mysql_fetch_fields(mResult);
-
for (uint32 i = 0; i < mFieldCount; i++)
- {
- mFieldNames[i] = fields[i].name;
mCurrentRow[i].SetType(ConvertNativeType(fields[i].type));
- }
}
QueryResultMysql::~QueryResultMysql()