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 12:22:31 +04:00
|
|
|
#
|
|
|
|
# Bug #11880012: INDEX_SUBQUERY, BLACKHOLE,
|
|
|
|
# HANG IN PREPARING WITH 100% CPU USAGE
|
|
|
|
#
|
|
|
|
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);
|
|
|
|
1
|
|
|
|
DROP TABLE t1, t2;
|
2024-09-29 10:49:01 +02:00
|
|
|
#
|
|
|
|
# Bug#19786309 - CRASH IN UNLOCK TABLES AFTER LOCKING AND TRUNCATING TEMPORARY TABLE.
|
|
|
|
#
|
2015-04-28 13:57:21 +02:00
|
|
|
create temporary table t1 (a int) engine=blackhole;
|
|
|
|
lock table t1 write;
|
|
|
|
truncate table t1;
|
|
|
|
select * from t1;
|
|
|
|
a
|
|
|
|
unlock tables;
|
|
|
|
drop temporary table t1;
|
2024-09-29 10:49:01 +02:00
|
|
|
# End of 5.5 tests
|
2014-03-14 18:52:16 +01:00
|
|
|
#
|
|
|
|
# Bug#13948247 DIVISION BY 0 IN GET_BEST_DISJUNCT_QUICK WITH FORCE INDEX GROUP BY
|
|
|
|
#
|
|
|
|
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;
|
|
|
|
0
|
|
|
|
DROP TABLE t1;
|
2024-09-29 10:49:01 +02:00
|
|
|
# End of 5.6 tests
|
|
|
|
#
|
|
|
|
# MDEV-24017 / bug 53588 test case.
|
|
|
|
#
|
2017-11-30 00:41:43 +03:00
|
|
|
CREATE TABLE `t` (
|
|
|
|
`a` varchar(3000) NOT NULL default '',
|
|
|
|
PRIMARY KEY (`a`)
|
2024-05-28 09:08:51 +04:00
|
|
|
) ENGINE=BLACKHOLE CHARSET=latin1;
|
2017-11-30 00:41:43 +03:00
|
|
|
DROP TABLE `t`;
|
2024-09-29 10:49:01 +02:00
|
|
|
# End of 10.1 tests
|
|
|
|
#
|
|
|
|
# MDEV-35035 Assertion failure in ha_blackhole::position upon INSERT into blackhole table with vector index
|
|
|
|
#
|
2024-10-13 14:15:25 +02:00
|
|
|
create table t (a int, v vector(1) not null, vector index (v)) engine=blackhole;
|
2024-09-29 10:49:01 +02:00
|
|
|
insert into t values (1,x'00000000');
|
|
|
|
drop table t;
|
|
|
|
# End of 11.7 tests
|