MySQL Forums
Forum List  »  Router & Proxy

Re: Strange error messages with example script code
Posted by: Kay Roepke
Date: January 09, 2008 09:24AM

Hi Cameron!

Cameron Guill Wrote:
-------------------------------------------------------
> (read_query_result) logging.lua:54: attempt to concatenate field '?' (a nil value)
> [[ snipped ]]
> function read_query_result(inj)
> if inj.id == 2 then
> for row in inj.resultset.rows do
> print("injected query returned: " .. row[0])
> end
> return proxy.PROXY_IGNORE_RESULT
> else
> print("query-time: " .. (inj.query_time / 1000) .. "ms")
> print("response-time: " .. (inj.response_time / 1000) .. "ms")
> end
> end

Lua uses 1-based indices, so row[0] should be nil. That's probably where the error comes from. (I guess that's line 54, right?)

Hope that helps,

Kay

--
Kay Roepke
Enterprise Tools

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Strange error messages with example script code
2279
January 09, 2008 09:24AM


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.