Bug #12426 ERROR 2013 (HY000): Lost connection to MySQL server during query
| Submitted: | 8 Aug 2005 4:15 | Modified: | 8 Sep 2005 12:35 |
|---|---|---|---|
| Reporter: | Rahul Chaudhari | Email Updates: | |
| Status: | Can't repeat | Impact on me: | |
| Category: | MySQL Server | Severity: | S2 (Serious) |
| Version: | 5.0.10 | OS: | Windows (Windows 2000 service pack 4) |
| Assigned to: | Aleksey Kishkin | CPU Architecture: | Any |
[8 Aug 2005 5:00]
Aleksey Kishkin
Confirm for windows:
E:\mysql50\bin>mysql.exe -u root test
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 5.0.10-beta-nt
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> DELIMITER $$
mysql> DROP PROCEDURE IF EXISTS Gen_Table_Name $$
Query OK, 0 rows affected, 1 warning (0.28 sec)
mysql> CREATE PROCEDURE Gen_Table_Name
-> (
-> OUT o_TableName VARCHAR(30)
-> )
-> BEGIN
-> DECLARE v_Tbl_Name VARCHAR(30);
-> DECLARE v_TName VARCHAR(30);
-> DECLARE v_TINT INTEGER;
-> DECLARE v_TNint INTEGER;
-> DECLARE V_No_Data INTEGER DEFAULT 1;
-> DECLARE No_Data_Found CONDITION FOR 1329;
-> DECLARE CONTINUE HANDLER FOR No_Data_Found SET v_No_Data = -1;
-> BEGIN
-> SELECT Tbl_Name INTO v_Tbl_Name FROM stblname
-> WHERE Tbl_Id IN (SELECT MAX(Tbl_Id) FROM Stblname);
-> IF V_NO_DATA = -1 THEN
-> SET V_No_Data = 1;
-> SET v_TINT = 123456789;
-> ELSE
-> SET v_TINT = SUBSTR(v_Tbl_Name,8,30);
-> END IF;
-> SET v_TNint = v_TINT + 1;
-> SET v_TName = Concat(Upper('SN_TEMP'),v_TNint);
-> INSERT INTO stblname(Tbl_Name)
-> VALUES(Upper(v_TName));
-> SET o_TableName = v_TName;
-> END;
-> END $$
ERROR 2013 (HY000): Lost connection to MySQL server during query
mysql>
Going to test it on linux
[8 Sep 2005 12:35]
MySQL Verification Team
I was unable to repeat with version 5.0.10a and current 5.0.13 BK source
server:
c:\mysql\bin>mysql -uroot snox
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2 to server version: 5.0.10a-beta-nt
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> DELIMITER $$
mysql> CREATE PROCEDURE Gen_Table_Name
->
-> (
-> OUT o_TableName VARCHAR(30)
-> )
-> BEGIN
-> DECLARE v_Tbl_Name VARCHAR(30);
-> DECLARE v_TName VARCHAR(30);
-> DECLARE v_TINT INTEGER;
-> DECLARE v_TNint INTEGER;
-> DECLARE V_No_Data INTEGER DEFAULT 1;
-> DECLARE No_Data_Found CONDITION FOR 1329;
-> DECLARE CONTINUE HANDLER FOR No_Data_Found SET v_No_Data = -1;
-> BEGIN
-> SELECT Tbl_Name INTO v_Tbl_Name FROM stblname
-> WHERE Tbl_Id IN (SELECT MAX(Tbl_Id) FROM Stblname);
-> IF V_NO_DATA = -1 THEN
-> SET V_No_Data = 1;
-> SET v_TINT = 123456789;
-> ELSE
-> SET v_TINT = SUBSTR(v_Tbl_Name,8,30);
-> END IF;
-> SET v_TNint = v_TINT + 1;
-> SET v_TName = Concat(Upper('SN_TEMP'),v_TNint);
-> INSERT INTO stblname(Tbl_Name)
-> VALUES(Upper(v_TName));
-> SET o_TableName = v_TName;
-> END;
-> END$$
Query OK, 0 rows affected (0.09 sec)
Could you please test with more recent version or you experienced the
issue reported at:
http://bugs.mysql.com/bug.php?id=12820
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.050 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
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.
Description: Hi All, i'm using mysql 5.0.10 beta version. i'm trying to create a procedure which has one out parameter o_Table_Name. these procedure generate the table name and inserts the generated table name in table "stblname". Actuall these is a temporary table name creation procedure, which i'm using some were else. the procedure gives me following error ERROR 2013 (HY000): Lost connection to MySQL server during query How to repeat: mysql> DELIMITER $$ mysql> mysql> DROP PROCEDURE IF EXISTS `snox`.`Gen_Table_Name`$$ No connection. Trying to reconnect... Connection id: 1 Current database: snox Query OK, 0 rows affected, 1 warning (0.00 sec) mysql> CREATE PROCEDURE `snox`.`Gen_Table_Name` -> ( -> OUT o_TableName VARCHAR(30) -> ) -> BEGIN -> DECLARE v_Tbl_Name VARCHAR(30); -> DECLARE v_TName VARCHAR(30); -> DECLARE v_TINT INTEGER; -> DECLARE v_TNint INTEGER; -> DECLARE V_No_Data INTEGER DEFAULT 1; -> DECLARE No_Data_Found CONDITION FOR 1329; -> DECLARE CONTINUE HANDLER FOR No_Data_Found SET v_No_Data = -1; -> BEGIN -> SELECT Tbl_Name INTO v_Tbl_Name FROM stblname -> WHERE Tbl_Id IN (SELECT MAX(Tbl_Id) FROM Stblname); -> IF V_NO_DATA = -1 THEN -> SET V_No_Data = 1; -> SET v_TINT = 123456789; -> ELSE -> SET v_TINT = SUBSTR(v_Tbl_Name,8,30); -> END IF; -> SET v_TNint = v_TINT + 1; -> SET v_TName = Concat(Upper('SN_TEMP'),v_TNint); -> INSERT INTO stblname(Tbl_Name) -> VALUES(Upper(v_TName)); -> SET o_TableName = v_TName; -> END; -> END$$ ERROR 2013 (HY000): Lost connection to MySQL server during query mysql> mysql> DELIMITER ; mysql>