|
|
Choosing A Webhost: |
CVS update of libmysequoia/src (CarobMySQL.cpp): msg#00227db.carob.cvs
Date: Tuesday, January 31, 2006 @ 14:58:20 Author: zsolt Path: /cvsroot/carob/libmysequoia/src Modified: CarobMySQL.cpp (1.40 -> 1.41) - correcting behaviour of CarobMYSQL::execute(). The field_count is now filled after the execution if there query results a result set. ----------------+ CarobMySQL.cpp | 12 ++++-------- 1 files changed, 4 insertions(+), 8 deletions(-) Index: libmysequoia/src/CarobMySQL.cpp diff -u libmysequoia/src/CarobMySQL.cpp:1.40 libmysequoia/src/CarobMySQL.cpp:1.41 --- libmysequoia/src/CarobMySQL.cpp:1.40 Tue Jan 31 13:14:45 2006 +++ libmysequoia/src/CarobMySQL.cpp Tue Jan 31 14:58:20 2006 @@ -260,6 +260,8 @@ if (stmtPtr->execute(fromString(std::string(query,length)))) { mysqlPtr->affected_rows = 0; + drsPtr = stmtPtr->getResultSet(); + mysqlPtr->field_count = drsPtr ? drsPtr->getNumberOfColumns() : 0; mysqlPtr->status = MYSQL_STATUS_GET_RESULT; FREE_AND_NULL_ARRAY(mysqlPtr->info); } @@ -267,6 +269,7 @@ { mysqlPtr->affected_rows = stmtPtr->getUpdateCount(); mysqlPtr->status = MYSQL_STATUS_READY; + mysqlPtr->field_count = 0; char info[100]; snprintf(info, sizeof(info), "Records: %llu Duplicates: 0 Warnings: 0", mysqlPtr->affected_rows); @@ -298,19 +301,12 @@ return 0; } - //If we already stored or used the results, we are not allowed to use it again - if (drsPtr) - { - set_error(CR_FETCH_CANCELED, SQLT_UNKNOWN); - LOG4CXX_DEBUG(logger, "Leaving get_results."); - return 0; - } try { if (stmtPtr) { MYSQL_RES *result = 0; - drsPtr = stmtPtr->getResultSet(); +// drsPtr = stmtPtr->getResultSet(); if (drsPtr) { //TODO handle not enough memory (std::nothrow)
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | CVS update of libmysequoia/src (MySQLAPI.cpp), zsolt-Tt5JLJuBijYiZlD9aYmxOGD2FQJk+8+b |
|---|---|
| Next by Date: | CVS update of libmysequoia/src (CarobMySQL.cpp), zsolt-Tt5JLJuBijYiZlD9aYmxOGD2FQJk+8+b |
| Previous by Thread: | CVS update of libmysequoia/src (CarobMySQL.cpp), zsolt-Tt5JLJuBijYiZlD9aYmxOGD2FQJk+8+b |
| Next by Thread: | CVS update of libmysequoia/src (CarobMySQL.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.
|