MySQL Forums
Forum List  »  Router & Proxy

Re: How to get row count by lua in resultset exactly?
Posted by: Chris Calender
Date: May 25, 2010 04:26PM

What version of the proxy are you using?

I tested this using 0.8.0 and it works fine for me.

Here is my code snippet:

local row_count = 0
for row in inj.resultset.rows do
row_count = row_count + 1
end
print("row_count = " .. row_count)


I tried selecting froma number of tables and using various LIMITs and it always returned the correct row size.


Note that I did see an older bug where nils are inadvertently returned to lua instead of values. I wonder if this is somehow affecting you, should you be using any version of proxy older than 0.8.0.

So if you are using an older version, I'd definitely test this on 0.8.0.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: How to get row count by lua in resultset exactly?
4730
May 25, 2010 04:26PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.