Bug #35689 arrays in LUA (MySQL proxy) start at index [1] not [0]
Submitted: 31 Mar 2008 3:17 Modified: 16 May 2008 13:42
Reporter: Diego Medina Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Proxy: Documentation Severity:S2 (Serious)
Version:0.6.1 OS:Any
Assigned to: MC Brown CPU Architecture:Any
Tags: Docs, mysqlproxy, proxy

[31 Mar 2008 3:17] Diego Medina
Description:
on this page
http://dev.mysql.com/doc/refman/5.1/en/mysql-proxy-scripting-read-query-result.html

and it could be on more pages,
it shows code examples like:

print("injected query returned: " .. row[0])

which on version 0.6.1 (maybe earlier but I have not checked), gives an erro.

How to repeat:
read description

Suggested fix:
it should be

print("injected query returned: " .. row[1])

indexes on the arrays (tables in Lua) start at 1, not at 0
[31 Mar 2008 12:47] Kay Roepke
Thank you for the bug report!
[16 May 2008 13:42] MC Brown
I've updated the documentation to correct the array problem.