Lasso Soft Inc. > Home

RhinoTrac

LassoSoft Ticket Tracking System

NOTE: If you are using Lasso Server 9.3 please Log your ticket directly via the LUX admin as this will give us more information about your issue.

Lasso 9 Issues



Ticket #7342: Incorrect ResultSet_Count

Reported by:
Paul Higgins
Date:
14 Dec, 2010
Priority:
minor
Component:
Lasso 9
Version:
Keywords:
Platform:
ResultSet_Count giving inconsistent (and incorrect) result set count.

Comments

14 Dec, 2010 by Paul Higgins
See below :-) Might be the connector

On Dec 14, 2010, at 12:08 PM, Jonathan Guthrie wrote:

OK so my investigation in 9 gives me this:

select id, author FROM a where author = "x";
select id, author FROM a where author = "y";
'2 selects: '+ResultSet_Count
=> 2 selects: 2

mysql: 2
lasso 8: 2

set @a:= 1;
select id, author FROM a where author = "x";
select id, author FROM a where author = "y";
'1 set followed by 2 selects: '+ResultSet_Count
=> 1 set followed by 2 selects: 2

mysql: 3
lasso 8: 2
select id, author FROM a where author = "x";
select id, author FROM a where author = "y";
set @a:= 1;
'2 selects followed by 1 set: '+ResultSet_Count
=> 2 selects followed by 1 set: 3

mysql: 3
lasso 8: 2
set @a:= 1;
set @b:= 1;
select id, author FROM a where author = "x";
select id, author FROM a where author = "y";
'2 set followed by 2 selects: '+ResultSet_Count
=> 2 set followed by 2 selects: 3

mysql: 4
lasso 8: 2
set @a:= 1, @b:= 1;
select id, author FROM a where author = "x";
select id, author FROM a where author = "y";
'2 set combined followed by 2 selects: '+ResultSet_Count
=> 2 set combined followed by 2 selects: 2

mysql: 3
lasso 8: 2
select id, author FROM a where author = "x";
select id, author FROM a where author = "y";
set @a:= 1;
set @b:= 1;
'2 selects followed by 2 set: '+ResultSet_Count
=> 2 selects followed by 2 set: 4

mysql: 4
lasso 8: 2
So what I would suggest is happening is that MySQL is not reporting the SET as having a result if it's first in the statement string, but any subsequent SET is in the count, even if it's at the end.

I was able to find out remarkably little online, including directly in MySQL C-API docs with respect to how it reports the number of result sets, but at least the behaviour is consistent (ie if SET is the first statement it's not counted but it always is after that).

Does that answer your question?

If it's an impediment to code, I can enter it as an issue in the queue for Kyle to investigate, so let me know if it needs following up further :)

Jono

On 2010-12-14, at 9:41 AM, Deco Rior wrote:

Hi, Jono:

No problem. I was just worried I was the only one using resultset's and set statements LOL

I am more interested in what the desired behavior is so I can code for it in the future.

I had thought that 1 was the right answer, but now I think 3 :-)

The "set" statements should return a status, but this would be different than Lasso 8.

In MANY cases I am taking the last resultset, so it won't affect things. But not always!
Please log in to your LassoSoft account to comment

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft