List:MySQL++« Previous MessageNext Message »
From:Arnon Jalon Date:July 7 2005 11:30pm
Subject:RE: Stored Procedures & Multiple Result Sets
View as plain text  
Hi, I've created a patch for the ability to handle multi statement
queries that return multiple result sets.  I'm attaching that, as well
as multiquery.cpp, which is intended to go in the examples directory.
This is helpful in the case where the user wishes to execute multiple
statements in one query, and then iterate through the result sets, as
seen in the c api documentation at:

http://dev.mysql.com/doc/mysql/en/c-api-multiple-queries.html

Mysql seems to treat a call to a stored procedure that returns a result
set, even if it is just one, as a multi-statement query.  If you are
calling such a stored procedure, you should use these methods to make
sure you clean up properly after the call.  The multiquery.cpp
illustrates this, as well as other multi-statement types of calls.

I also modified the copy method of the ResUse class to make sure that a
ResUse object gets properly purged if an un-initialized ResUse object-
one with a null result_- gets assigned to it.

--Arnon

Arnon Jalon / Software Engineer
T: +1.212.231.7159 / F: +1.212.760.1774
arnon.jalon@stripped
24/7 Real Media, Inc. (NASDAQ: TFSM)
132 West 31st Street, 9th floor
New York, NY 10001
WWW.247REALMEDIA.COM
>DELIVERING TODAY >DEFINING TOMORROW 


Thread
Stored Procedures & Multiple Result SetsArnon Jalon30 Jun
  • Re: Stored Procedures & Multiple Result SetsWarren Young30 Jun
RE: Stored Procedures & Multiple Result SetsArnon Jalon30 Jun
  • Re: Stored Procedures & Multiple Result SetsWarren Young1 Jul
RE: Stored Procedures & Multiple Result SetsArnon Jalon1 Jul
RE: Stored Procedures & Multiple Result SetsArnon Jalon8 Jul
  • Re: Stored Procedures & Multiple Result SetsWarren Young8 Jul
RE: Stored Procedures & Multiple Result SetsArnon Jalon8 Jul
RE: Stored Procedures & Multiple Result SetsArnon Jalon11 Jul
  • Re: Stored Procedures & Multiple Result SetsWarren Young11 Jul
RE: Stored Procedures & Multiple Result SetsArnon Jalon13 Jul
  • Re: Stored Procedures & Multiple Result SetsWarren Young18 Jul
RE: Stored Procedures & Multiple Result SetsArnon Jalon18 Jul