Below is the list of changes that have just been committed into a local
5.1 repository of cmiller. When cmiller 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 11:38:39-05:00, cmiller@stripped +4 -0
Merge calliope.local.cmiller:/Volumes/Source/src/mysql-5.0-maint
into calliope.local.cmiller:/Volumes/Source/src/mysql-5.1-maint
MERGE: 1.1810.2580.2
mysql-test/r/order_by.result@stripped, 2007-02-14 11:38:24-05:00, cmiller@stripped +0 -0
Auto merged
MERGE: 1.55.1.5
mysql-test/t/order_by.test@stripped, 2007-02-14 11:38:24-05:00, cmiller@stripped +0 -0
Auto merged
MERGE: 1.41.1.2
sql/item.cc@stripped, 2007-02-14 11:38:25-05:00, cmiller@stripped +0 -0
Auto merged
MERGE: 1.113.62.12
sql/mysql_priv.h@stripped, 2007-02-14 11:38:26-05:00, cmiller@stripped +0 -0
Auto merged
MERGE: 1.290.95.1
# 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: cmiller
# Host: calliope.local
# Root: /Volumes/Source/src/mysql-5.1-maint/RESYNC
--- 1.241/sql/item.cc 2007-02-13 19:09:33 -05:00
+++ 1.242/sql/item.cc 2007-02-14 11:38:25 -05:00
@@ -3756,7 +3756,18 @@
use the field from the Item_field in the select list and leave
the Item_field instance in place.
*/
- set_field((*((Item_field**)res))->field);
+
+ Field *field= (*((Item_field**)res))->field;
+
+ if (field == NULL)
+ {
+ /* The column to which we link isn't valid. */
+ my_error(ER_BAD_FIELD_ERROR, MYF(0), (*res)->name,
+ current_thd->where);
+ return(1);
+ }
+
+ set_field(field);
return 0;
}
else
--- 1.61/mysql-test/r/order_by.result 2007-01-22 05:58:08 -05:00
+++ 1.62/mysql-test/r/order_by.result 2007-02-14 11:38:24 -05:00
@@ -874,6 +874,30 @@
SELECT a.a + 1 AS num FROM t1 a JOIN t1 b ON num = b.a;
ERROR 42S22: Unknown column 'num' in 'on clause'
DROP TABLE t1;
+CREATE TABLE bug25126 (
+val int unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY
+);
+UPDATE bug25126 SET MissingCol = MissingCol;
+ERROR 42S22: Unknown column 'MissingCol' in 'field list'
+UPDATE bug25126 SET val = val ORDER BY MissingCol;
+ERROR 42S22: Unknown column 'MissingCol' in 'order clause'
+UPDATE bug25126 SET val = val ORDER BY val;
+UPDATE bug25126 SET val = 1 ORDER BY val;
+UPDATE bug25126 SET val = 1 ORDER BY MissingCol;
+ERROR 42S22: Unknown column 'MissingCol' in 'order clause'
+UPDATE bug25126 SET val = 1 ORDER BY val, MissingCol;
+ERROR 42S22: Unknown column 'MissingCol' in 'order clause'
+UPDATE bug25126 SET val = MissingCol ORDER BY MissingCol;
+ERROR 42S22: Unknown column 'MissingCol' in 'order clause'
+UPDATE bug25126 SET MissingCol = 1 ORDER BY val, MissingCol;
+ERROR 42S22: Unknown column 'MissingCol' in 'order clause'
+UPDATE bug25126 SET MissingCol = 1 ORDER BY MissingCol;
+ERROR 42S22: Unknown column 'MissingCol' in 'order clause'
+UPDATE bug25126 SET MissingCol = val ORDER BY MissingCol;
+ERROR 42S22: Unknown column 'MissingCol' in 'order clause'
+UPDATE bug25126 SET MissingCol = MissingCol ORDER BY MissingCol;
+ERROR 42S22: Unknown column 'MissingCol' in 'order clause'
+DROP TABLE bug25126;
CREATE TABLE t1 (a int);
SELECT p.a AS val, q.a AS val1 FROM t1 p, t1 q ORDER BY val > 1;
val val1
--- 1.44/mysql-test/t/order_by.test 2007-01-22 05:58:08 -05:00
+++ 1.45/mysql-test/t/order_by.test 2007-02-14 11:38:24 -05:00
@@ -589,6 +589,36 @@
DROP TABLE t1;
#
+# Bug#25126: Reference to non-existant column in UPDATE...ORDER BY...
+# crashes server
+#
+CREATE TABLE bug25126 (
+ val int unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY
+);
+--error 1054
+UPDATE bug25126 SET MissingCol = MissingCol;
+--error 1054
+UPDATE bug25126 SET val = val ORDER BY MissingCol;
+UPDATE bug25126 SET val = val ORDER BY val;
+UPDATE bug25126 SET val = 1 ORDER BY val;
+--error 1054
+UPDATE bug25126 SET val = 1 ORDER BY MissingCol;
+--error 1054
+UPDATE bug25126 SET val = 1 ORDER BY val, MissingCol;
+--error 1054
+UPDATE bug25126 SET val = MissingCol ORDER BY MissingCol;
+--error 1054
+UPDATE bug25126 SET MissingCol = 1 ORDER BY val, MissingCol;
+--error 1054
+UPDATE bug25126 SET MissingCol = 1 ORDER BY MissingCol;
+--error 1054
+UPDATE bug25126 SET MissingCol = val ORDER BY MissingCol;
+--error 1054
+UPDATE bug25126 SET MissingCol = MissingCol ORDER BY MissingCol;
+DROP TABLE bug25126;
+
+
+#
# Bug #25427: crash when order by expression contains a name
# that cannot be resolved unambiguously
#
@@ -603,7 +633,6 @@
DROP TABLE t1;
-# End of 4.1 tests
create table t1 (a int not null, b int not null, c int not null);
insert t1 values (1,1,1),(1,1,2),(1,2,1);
select a, b from t1 group by a, b order by sum(c);
| Thread |
|---|
| • bk commit into 5.1 tree (cmiller:1.2430) | Chad MILLER | 14 Feb |