Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
5.3.12, 5.5.34, 10.0.7
-
None
-
None
-
windows 7, 64x
mysqld 64x
Description
This problem exists if in table more than 10 rows
eg.
CREATE TABLE `action` ( |
`id` int(10) unsigned NOT NULL AUTO_INCREMENT, |
`create_ts` int(10) unsigned DEFAULT '0', |
PRIMARY KEY (`id`) |
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; |
|
# and my test for this table |
# 1) creating routine
|
|
DELIMITER $$
|
DROP PROCEDURE IF EXISTS `p` $$ |
CREATE PROCEDURE p (IN step TINYINT(1)) |
BEGIN
|
DECLARE counts INT DEFAULT 0; |
DECLARE cur1 CURSOR FOR |
|
SELECT ct.id |
FROM (SELECT NULL) AS z |
JOIN ( |
SELECT id |
FROM `action` |
LIMIT 10
|
) AS ct |
JOIN (SELECT NULL) AS x ON( |
EXISTS(
|
SELECT 1 |
FROM `action` |
WHERE id=ct.id |
LIMIT 1
|
)
|
);
|
|
IF step=1 THEN |
TRUNCATE action; |
REPEAT
|
INSERT INTO `action` |
(create_ts) VALUES |
(UNIX_TIMESTAMP());
|
|
SET counts=counts+1; |
UNTIL counts>150 END REPEAT; |
|
SET max_sp_recursion_depth=1; |
|
CALL p(2);
|
CALL p(2);
|
ELSEIF step=2 THEN |
OPEN cur1; CLOSE cur1; |
END IF; |
END $$ |
DELIMITER ;
|
|
CALL p(1);
|
And as result - Lost connection to MySQL server during query
Attachments
Issue Links
- relates to
-
MDEV-6054 ER_BAD_FIELD_ERROR (Unknown column in where clause) on the 2nd execution of PS
- Stalled