MySQL Forums
Forum List  »  Router & Proxy

How to get row count by lua in resultset exactly?
Posted by: wang zone
Date: May 23, 2010 01:55AM

I use script as following to get the row count,

local row_count = 0
for row in res.rows do
row_count = row_count + 1

I found the row_count is error,some times. for example. There is 1 row result in the DB and I can get 1 row result in the client but the row_count is 0 in lua script. it will repeat in condition of many clients querying synchronously and loadblance between more than 2 backends in proxy 0.6.1 and proxy 0.7.2. How can I get a exactly row count in lua ?

Options: ReplyQuote

Written By
How to get row count by lua in resultset exactly?
May 23, 2010 01:55AM

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.