Bug #38419 | Can write, but cannot perform selects with rw-splitting | ||
---|---|---|---|
Submitted: | 28 Jul 2008 22:06 | Modified: | 17 Aug 2009 15:09 |
Reporter: | Josh Boyd | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Proxy | Severity: | S1 (Critical) |
Version: | 0.7.0 - r511 | OS: | Linux |
Assigned to: | MC Brown | CPU Architecture: | Any |
Tags: | mysql-proxy |
[28 Jul 2008 22:06]
Josh Boyd
[28 Jul 2008 22:17]
Josh Boyd
So, I've found the problem. If I don't specify the path to the LUA script, everything works great. However, if I do specifiy the path, as I did in the report above, the LUA script actually loads and executes, and throws an error on the line shown above. Very odd.
[29 Jul 2008 8:21]
Jan Kneschke
Please try this patch === modified file 'lib/rw-splitting.lua' --- lib/rw-splitting.lua 2008-03-25 17:57:00 +0000 +++ lib/rw-splitting.lua 2008-07-29 08:17:09 +0000 @@ -201,7 +201,8 @@ is_in_select_calc_found_rows = false local is_insert_id = false - for i, token in ipairs(tokens) do + for i = 1, #tokens do + local token = tokens[i] -- SQL_CALC_FOUND_ROWS + FOUND_ROWS() have to be executed -- on the same connection -- print("token: " .. token.token_name)
[29 Aug 2008 23:00]
Bugs System
No feedback was provided for this bug for over a month, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open".
[31 Aug 2008 1:06]
Josh Boyd
So, the reason my original "fix" appeared to work, is because it couldn't open the LUA file, and just acted as a proxy to the master! I've applied this patch, however, I still get the same results. Please advise.
[31 Aug 2008 1:08]
Josh Boyd
I've made a new bug report, #39142. As this is a similar problem, but not the same.
[18 Sep 2008 18:53]
Sveta Smirnova
Thank you for the report. Verified as described. Bug #38419 was marked as duplicate of this one.
[9 Jun 2009 13:34]
Diego Medina
Verified fixed on 0.7.1
[17 Aug 2009 15:09]
MC Brown
A note has been added to the 0.7.1 changelog: When using the rw-splitting.lua script you could get an error when talking to the backend server: 2008-07-28 18:00:30: (critical) (read_query) [string "/usr/local/share/mysql-proxy/rw-splitting.l..."]:218: bad argument #1 to 'ipairs' (table expected, got userdata) This would lead to the proxy closing the connection to the configured MySQL backend.