List:Commits« Previous MessageNext Message »
From:kgeorge Date:February 14 2007 4:36pm
Subject:bk commit into 5.0 tree (gkodinov:1.2414) BUG#19717
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of kgeorge. When kgeorge does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-02-14 18:35:59+02:00, gkodinov@stripped +3 -0
  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.

  mysql-test/r/blackhole.result@stripped, 2007-02-14 18:35:52+02:00, gkodinov@stripped +11 -0
    Bug#19717: test case

  mysql-test/t/blackhole.test@stripped, 2007-02-14 18:35:53+02:00, gkodinov@stripped +15 -0
    Bug#19717: test case

  sql/ha_blackhole.cc@stripped, 2007-02-14 18:35:54+02:00, gkodinov@stripped +1 -1
    Bug#19717: return no rows instead of success.

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	gkodinov
# Host:	macbook.gmz
# Root:	/Users/kgeorge/mysql/work/B19717-5.0-opt

--- 1.10/mysql-test/r/blackhole.result	2006-07-10 21:46:02 +03:00
+++ 1.11/mysql-test/r/blackhole.result	2007-02-14 18:35:52 +02:00
@@ -123,3 +123,14 @@ master-bin.000001	#	Query	1	#	use `test`
 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
 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;

--- 1.8/mysql-test/t/blackhole.test	2006-07-10 21:46:03 +03:00
+++ 1.9/mysql-test/t/blackhole.test	2007-02-14 18:35:53 +02:00
@@ -127,4 +127,19 @@ show binlog events;
 
 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

--- 1.25/sql/ha_blackhole.cc	2006-12-23 21:04:24 +02:00
+++ 1.26/sql/ha_blackhole.cc	2007-02-14 18:35:54 +02:00
@@ -180,7 +180,7 @@ int ha_blackhole::index_read(byte * buf,
                              uint key_len, enum ha_rkey_function find_flag)
 {
   DBUG_ENTER("ha_blackhole::index_read");
-  DBUG_RETURN(0);
+  DBUG_RETURN(HA_ERR_END_OF_FILE);
 }
 
 
Thread
bk commit into 5.0 tree (gkodinov:1.2414) BUG#19717kgeorge14 Feb