Bug #39629 | Incorrect handling of LAST_INSERT_ID and FOUND_ROWS in rw-splitting.lua | ||
---|---|---|---|
Submitted: | 24 Sep 2008 14:23 | Modified: | 16 Nov 2009 10:53 |
Reporter: | Hristo Erinin | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Proxy: Scripts | Severity: | S2 (Serious) |
Version: | r511 | OS: | Any |
Assigned to: | Assigned Account | CPU Architecture: | Any |
Tags: | Contribution, found_rows, LAST_INSERT_ID, rw-splitting, rw-splitting.lua, sql_calc_found_rows |
[24 Sep 2008 14:23]
Hristo Erinin
[24 Sep 2008 14:24]
Hristo Erinin
Patch to fix http://bugs.mysql.com/bug.php?id=39629
Attachment: rw-splitting-insert-found.diff (text/x-patch), 1.56 KiB.
[24 Sep 2008 16:06]
MySQL Verification Team
Do you mean that the original pasted suggested fix isn't correct?. The actual patch is the attached file?. Thanks in advance.
[24 Sep 2008 21:10]
Hristo Erinin
The pasted fix is the same as the attached file and is correct. It just got wrapped by the fixed width input field and is thus unusable. The attached file contains the diff agains r511 and should be directly applicable using patch(1).
[26 Sep 2008 8:28]
Sveta Smirnova
Thank you for the report. Verified as described. To repeat: 1. Start proxy as ./src/mysql-proxy --proxy-backend-addresses=127.0.0.1:3351 --proxy-read-only-backend-addresses=127.0.0.1:3306 --proxy-read-only-backend-addresses=127.0.0.1:3350 --proxy-lua-script=./lib/rw-splitting.lua Table t1 exists only on 127.0.0.1:3351 2. Run following script in 3 terminals. $cat bug39629.sh #!/bin/bash while (true); do php -r 'mysql_connect("127.0.0.1:4040", "root",""); mysql_select_db("test"); for($i=1; $i<=65; $i++) {mysql_query("select SQL_CALC_FOUND_ROWS * from t1 limit 2"); if (0 == mysql_error()) { $res = mysql_query("select found_rows()");var_dump(mysql_fetch_row($res));var_dump(mysql_error());}}'; done 3. Examine results files: string(0) "" array(1) { [0]=> string(1) "1" } string(0) "" array(1) { [0]=> string(1) "1" } string(0) "" array(1) { [0]=> string(1) "1" } string(0) "" array(1) { [0]=> string(5) "98480" } string(0) "" array(1) { [0]=> string(1) "1"
[8 Jun 2009 19:35]
liz drachnik
Hello Hristo - Since you seem interested in contributing to MySQL, may I suggest that you sign the Sun|MySQL contributor agreement, i.e. the SCA. The instructions are given here: http://forge.mysql.com/wiki/Sun_Contributor_Agreement I can review and turnaround your SCA request quite quickly. This will facilitate the handling of your contributions -- this one, and others in the future. Thank you ! Liz Drachnik - MySQL Program Manager.
[2 Oct 2009 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".
[4 Nov 2009 0: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".