mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Bug#19717: The blackhole engine is returning an OK flag in
index_read(), whereas it must return HA_ERR_END_OF_FILE instead (as there are by definition no rows in a table of that engine.
This commit is contained in:
@ -123,3 +123,14 @@ master-bin.000001 # Query 1 # use `test`; create table t3 like t1
|
|||||||
master-bin.000001 # Query 1 # use `test`; insert into t1 select * from t3
|
master-bin.000001 # Query 1 # use `test`; insert into t1 select * from t3
|
||||||
master-bin.000001 # Query 1 # use `test`; replace into t1 select * from t3
|
master-bin.000001 # Query 1 # use `test`; replace into t1 select * from t3
|
||||||
drop table t1,t2,t3;
|
drop table t1,t2,t3;
|
||||||
|
CREATE TABLE t1(a INT, b INT) ENGINE=BLACKHOLE;
|
||||||
|
DELETE FROM t1 WHERE a=10;
|
||||||
|
ALTER TABLE t1 ADD INDEX(a);
|
||||||
|
DELETE FROM t1 WHERE a=10;
|
||||||
|
ALTER TABLE t1 DROP INDEX a;
|
||||||
|
ALTER TABLE t1 ADD UNIQUE INDEX(a);
|
||||||
|
DELETE FROM t1 WHERE a=10;
|
||||||
|
ALTER TABLE t1 DROP INDEX a;
|
||||||
|
ALTER TABLE t1 ADD PRIMARY KEY(a);
|
||||||
|
DELETE FROM t1 WHERE a=10;
|
||||||
|
DROP TABLE t1;
|
||||||
|
@ -127,4 +127,19 @@ show binlog events;
|
|||||||
|
|
||||||
drop table t1,t2,t3;
|
drop table t1,t2,t3;
|
||||||
|
|
||||||
|
#
|
||||||
|
#Bug#19717: DELETE Query Error on BLACKHOLE when using WHERE on column with UNIQUE INDEX
|
||||||
|
#
|
||||||
|
CREATE TABLE t1(a INT, b INT) ENGINE=BLACKHOLE;
|
||||||
|
DELETE FROM t1 WHERE a=10;
|
||||||
|
ALTER TABLE t1 ADD INDEX(a);
|
||||||
|
DELETE FROM t1 WHERE a=10;
|
||||||
|
ALTER TABLE t1 DROP INDEX a;
|
||||||
|
ALTER TABLE t1 ADD UNIQUE INDEX(a);
|
||||||
|
DELETE FROM t1 WHERE a=10;
|
||||||
|
ALTER TABLE t1 DROP INDEX a;
|
||||||
|
ALTER TABLE t1 ADD PRIMARY KEY(a);
|
||||||
|
DELETE FROM t1 WHERE a=10;
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
# End of 4.1 tests
|
# End of 4.1 tests
|
||||||
|
@ -180,7 +180,7 @@ int ha_blackhole::index_read(byte * buf, const byte * key,
|
|||||||
uint key_len, enum ha_rkey_function find_flag)
|
uint key_len, enum ha_rkey_function find_flag)
|
||||||
{
|
{
|
||||||
DBUG_ENTER("ha_blackhole::index_read");
|
DBUG_ENTER("ha_blackhole::index_read");
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(HA_ERR_END_OF_FILE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user