|
|
Choosing A Webhost: |
CVS update of libmysequoia/src (CarobStmt.cpp): msg#00075db.carob.cvs
Date: Wednesday, February 22, 2006 @ 16:55:29 Author: zsolt Path: /cvsroot/carob/libmysequoia/src Modified: CarobStmt.cpp (1.25 -> 1.26) - fixed memory duplication error, when the metadata was requested for a prepared statement. ---------------+ CarobStmt.cpp | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-) Index: libmysequoia/src/CarobStmt.cpp diff -u libmysequoia/src/CarobStmt.cpp:1.25 libmysequoia/src/CarobStmt.cpp:1.26 --- libmysequoia/src/CarobStmt.cpp:1.25 Wed Feb 22 15:23:57 2006 +++ libmysequoia/src/CarobStmt.cpp Wed Feb 22 16:55:29 2006 @@ -560,8 +560,17 @@ result->data = new MYSQL_DATA; memset(result->data, 0, sizeof(MYSQL_DATA)); //duplicate fields to the dummy resultset - result->fields = new MYSQL_FIELD[m_stmt->field_count]; - memcpy(result->fields, m_stmt->fields, m_stmt->field_count * sizeof(MYSQL_FIELD)); + int field_count = m_stmt->field_count; + result->fields = new MYSQL_FIELD[field_count]; + memcpy(result->fields, m_stmt->fields, field_count * sizeof(MYSQL_FIELD)); + for (MYSQL_FIELD *colPtr=result->fields; field_count; colPtr++, field_count--) + { + colPtr->name = cstrdup(colPtr->name); + colPtr->org_name = cstrdup(colPtr->org_name); + colPtr->table = cstrdup(colPtr->table); + colPtr->db = cstrdup(colPtr->db); + colPtr->catalog = cstrdup(colPtr->catalog); + } result->data->fields = result->field_count = m_stmt->field_count; result->eof = true; }
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | CVS update of libmysequoia (5 files), zsolt-Tt5JLJuBijYiZlD9aYmxOGD2FQJk+8+b |
|---|---|
| Next by Date: | CVS update of carob (include/DriverSocket.hpp src/DriverSocket.cpp), zsolt-Tt5JLJuBijYiZlD9aYmxOGD2FQJk+8+b |
| Previous by Thread: | CVS update of libmysequoia/src (CarobStmt.cpp), zsolt-Tt5JLJuBijYiZlD9aYmxOGD2FQJk+8+b |
| Next by Thread: | CVS update of libmysequoia/src (MySQLAPI.cpp), zsolt-Tt5JLJuBijYiZlD9aYmxOGD2FQJk+8+b |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |
Home
| advertise | OSDir is
an inevitable website.
|