Bug #16538 | "Lost connection to MySQL server during query" while executing stored procedure | ||
---|---|---|---|
Submitted: | 16 Jan 2006 15:54 | Modified: | 3 Jul 2006 14:00 |
Reporter: | Florian Engelhardt | Email Updates: | |
Status: | No Feedback | Impact on me: | |
Category: | MySQL Query Browser | Severity: | S2 (Serious) |
Version: | 5.0.18 | OS: | Linux (Gentoo Linux 32-bit) |
Assigned to: | CPU Architecture: | Any |
[16 Jan 2006 15:54]
Florian Engelhardt
[16 Jan 2006 16:41]
MySQL Verification Team
I was unable to reproduce this issue calling the procedure several times. I tested on latest BK source then could you please wait for the next relase or compile it from source. Thanks in advance. mysql> call p1(); +-------+---------+ | name | street | +-------+---------+ | name1 | street1 | | name1 | street2 | | name1 | street3 | | name1 | street4 | +-------+---------+ 4 rows in set (0.00 sec) Query OK, 0 rows affected (0.00 sec)
[16 Jan 2006 16:43]
Florian Engelhardt
I can provide you with a better backtrace in a few minutes, i am recompiling mysql with the -g CFLAG. If everything seems fine, try to do two or three select statements in the procedure, than it works. The workaround i sugested isn´t working anymore, so it seems to me, that there is no workaround anymore.
[16 Jan 2006 17:54]
Florian Engelhardt
Please try the following delimiter // drop procedure if exists p1 // create procedure p1 () begin select * from v1; select * from v1; select * from v1; select * from v1; end // call p1(); call p1(); call p1(); call p1(); And please try it in the mysql-query-browser. The same behavior can be seen, when calling it from php an doing a browser refresh while the page loads.
[16 Jan 2006 21:07]
Florian Engelhardt
I have developet a simple PHP-Script. The Problem seem to be concurrent querys. Here is the script: <?php $conn = mysqli_connect('127.0.0.1','username','password','test'); function test () { global $conn; $res = mysqli_query($conn,'call p1();'); while ($aTmp = mysqli_fetch_array($res)) { $aFoobar = $aTmp; } print_r($aFoobar); print_r(mysqli_error($conn)); mysqli_free_result($res); } test(); test(); test(); test(); test(); test(); ?>
[16 Jan 2006 21:09]
Florian Engelhardt
I was able to reproduce the bug on three different machines. The last machine is an amd64 with 64bit gentoo linux and also 64bit mysql running. I got exaclty the same problem as above, i now have a trace file, i will attach it.
[16 Jan 2006 21:12]
Florian Engelhardt
Ok, the file upload is limited to 200k files, so i uploaded the 900k trace file to the following URL: http://dotbox.org/mysql/mysqld.trace
[17 Jan 2006 7:59]
Florian Engelhardt
Hello again, i did several tests: 1. I installed the latest source from bk, but still the same error. 2. I was running the client in the gdb debuger and this verified my thesis, that the connection only gets lost, if two calls or more to p1(); are made at the same time.
[17 Jan 2006 9:17]
Georg Richter
Florian, please note that you have to use mysqli_multi_query instead of mysqli_query (PHP).
[17 Jan 2006 10:02]
Florian Engelhardt
You rock man. This seemes to fix it. Then it seems, that this is a bug in the mysql-query-browser. But should´t you send another error message, than just close the connection?
[3 Jun 2006 14:00]
Valeriy Kravchuk
If it is a Query Browser bug, please, try to repeat with the latest version, 1.1.20 (Widnows) or 1.1.18 (Linux), and inform about the results.
[3 Jul 2006 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".