Bug #11880012: INDEX_SUBQUERY, BLACKHOLE,
HANG IN PREPARING WITH 100% CPU USAGE
Infinite loop in the subselect_indexsubquery_engine::exec()
function caused Server hang with 100% CPU usage.
The BLACKHOLE storage engine didn't update handler's
table->status variable after index operations, that
caused an infinite "while(!table->status)" execution.
Index access methods of the BLACKHOLE engine handler
have been updated to set table->status variable to
STATUS_NOT_FOUND or 0 when such a method returns a
HA_ERR_END_OF_FILE error or 0 respectively.
mysql-test/r/blackhole.result:
Bug #11880012: INDEX_SUBQUERY, BLACKHOLE,
HANG IN PREPARING WITH 100% CPU USAGE
New test file for the BLACKHOLE engine.
mysql-test/t/blackhole.test:
Bug #11880012: INDEX_SUBQUERY, BLACKHOLE,
HANG IN PREPARING WITH 100% CPU USAGE
New test file for the BLACKHOLE engine.
storage/blackhole/ha_blackhole.cc:
Bug #11880012: INDEX_SUBQUERY, BLACKHOLE,
HANG IN PREPARING WITH 100% CPU USAGE
Index access methods of the BLACKHOLE engine handler
have been updated to set table->status variable to
STATUS_NOT_FOUND or 0 when such a method returns a
HA_ERR_END_OF_FILE error or 0 respectively, like
we do in MyISAM storage engine.
2012-03-28 10:22:31 +02:00
|
|
|
#
|
|
|
|
# Tests for the BLACKHOLE storage engine
|
|
|
|
#
|
|
|
|
|
|
|
|
--source include/have_blackhole.inc
|
|
|
|
|
|
|
|
--echo #
|
|
|
|
--echo # Bug #11880012: INDEX_SUBQUERY, BLACKHOLE,
|
|
|
|
--echo # HANG IN PREPARING WITH 100% CPU USAGE
|
|
|
|
--echo #
|
|
|
|
|
|
|
|
CREATE TABLE t1(a INT NOT NULL);
|
|
|
|
INSERT INTO t1 VALUES (1), (2), (3);
|
|
|
|
CREATE TABLE t2 (a INT UNSIGNED, b INT, UNIQUE KEY (a, b)) ENGINE=BLACKHOLE;
|
|
|
|
|
|
|
|
SELECT 1 FROM t1 WHERE a = ANY (SELECT a FROM t2);
|
|
|
|
|
|
|
|
DROP TABLE t1, t2;
|
|
|
|
|
|
|
|
--echo End of 5.5 tests
|
|
|
|
|
2014-03-14 18:52:16 +01:00
|
|
|
--echo #
|
|
|
|
--echo # Bug#13948247 DIVISION BY 0 IN GET_BEST_DISJUNCT_QUICK WITH FORCE INDEX GROUP BY
|
|
|
|
--echo #
|
|
|
|
|
|
|
|
CREATE TABLE t1(a INT, b INT, c INT, KEY(c), UNIQUE(a)) ENGINE = BLACKHOLE;
|
|
|
|
SELECT 0 FROM t1 FORCE INDEX FOR GROUP BY(a) WHERE a = 0 OR b = 0 AND c = 0;
|
|
|
|
DROP TABLE t1;
|
|
|
|
|
|
|
|
--echo End of 5.6 tests
|