bk commit into 4.0 tree (igor:1.2060) BUG#8392 -
02-15-2005
, 08:46 PM
Below is the list of changes that have just been committed into a local
4.0 repository of igor. When igor 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/in...urce-tree.html
ChangeSet
1.2060 05/02/15 18:45:42 igor (AT) rurik (DOT) mysql.com +3 -0
delete.result, delete.test:
Added a test case for bug #8392.
sql_delete.cc:
Fixed bug #8392.
The bug caused a crash for a delete statement with ORDER BY
that explicitly referred to the modified table.
mysql-test/r/delete.result
1.11 05/02/15 18:44:57 igor (AT) rurik (DOT) mysql.com +9 -0
Added a test case for bug #8392.
mysql-test/t/delete.test
1.12 05/02/15 18:44:24 igor (AT) rurik (DOT) mysql.com +11 -0
Added a test case for bug #8392.
sql/sql_delete.cc
1.109 05/02/15 18:43:07 igor (AT) rurik (DOT) mysql.com +1 -0
Fixed bug #8392.
The bug caused a crash for a delete statement with ORDER BY
that explicitly referred to the modified table.
# 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: igor
# Host: rurik.mysql.com
# Root: /home/igor/dev/mysql-4.0-0
--- 1.108/sql/sql_delete.cc Sun Sep 19 04:14:59 2004
+++ 1.109/sql/sql_delete.cc Tue Feb 15 18:43:07 2005
@@ -111,6 +111,7 @@
bzero((char*) &tables,sizeof(tables));
tables.table = table;
+ tables.alias = table_list->alias;
table->io_cache = (IO_CACHE *) my_malloc(sizeof(IO_CACHE),
MYF(MY_FAE | MY_ZEROFILL));
--- 1.11/mysql-test/t/delete.test Fri Oct 1 04:23:08 2004
+++ 1.12/mysql-test/t/delete.test Tue Feb 15 18:44:24 2005
@@ -71,3 +71,14 @@
delete t1 from t1, t1 as t2 where t1.b = t2.b and t1.a > t2.a;
select * from t1;
drop table t1;
+
+#
+# Bug #8392: delete with ORDER BY containing a direct reference to the table
+#
+
+CREATE TABLE t1 ( a int PRIMARY KEY );
+DELETE FROM t1 WHERE t1.a > 0 ORDER BY t1.a;
+INSERT INTO t1 VALUES (0),(1),(2);
+DELETE FROM t1 WHERE t1.a > 0 ORDER BY t1.a LIMIT 1;
+SELECT * FROM t1;
+DROP TABLE t1;
--- 1.10/mysql-test/r/delete.result Fri Oct 1 04:23:18 2004
+++ 1.11/mysql-test/r/delete.result Tue Feb 15 18:44:57 2005
@@ -61,3 +61,12 @@
a b
1 apple
drop table t1;
+CREATE TABLE t1 ( a int PRIMARY KEY );
+DELETE FROM t1 WHERE t1.a > 0 ORDER BY t1.a;
+INSERT INTO t1 VALUES (0),(1),(2);
+DELETE FROM t1 WHERE t1.a > 0 ORDER BY t1.a LIMIT 1;
+SELECT * FROM t1;
+a
+0
+2
+DROP TABLE t1;
--
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe: http://lists.mysql.com/internals?uns...ie.nctu.edu.tw |