List:Commits« Previous MessageNext Message »
From:igor Date:January 10 2007 4:56pm
Subject:bk commit into 5.0 tree (igor:1.2374)
View as plain text  
Below is the list of changes that have just been committed into a local
5.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/installing-source-tree.html

ChangeSet@stripped, 2007-01-10 08:55:55-08:00, igor@stripped +3 -0
  Merge olga.mysql.com:/home/igor/mysql-4.1-opt
  into  olga.mysql.com:/home/igor/mysql-5.0-opt
  MERGE: 1.1616.2873.37

  mysql-test/r/order_by.result@stripped, 2007-01-10 08:55:54-08:00, igor@stripped +2 -2
    Manual merge
    MERGE: 1.40.1.9

  mysql-test/t/order_by.test@stripped, 2007-01-10 08:55:54-08:00, igor@stripped +16 -16
    Manual merge
    MERGE: 1.29.1.7

  sql/item.cc@stripped, 2007-01-10 08:49:12-08:00, igor@stripped +0 -0
    Auto merged
    MERGE: 1.58.1.177

# 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:	olga.mysql.com
# Root:	/home/igor/mysql-5.0-opt/RESYNC

--- 1.247/sql/item.cc	2007-01-10 08:56:00 -08:00
+++ 1.248/sql/item.cc	2007-01-10 08:56:00 -08:00
@@ -3698,6 +3698,8 @@
         Item** res= find_item_in_list(this, thd->lex->current_select->item_list,
                                       &counter, REPORT_EXCEPT_NOT_FOUND,
                                       &not_used);
+        if (!res)
+          return 1;
         if (res != (Item **)not_found_item)
         {
           if ((*res)->type() == Item::FIELD_ITEM)

--- 1.58/mysql-test/r/order_by.result	2007-01-10 08:56:00 -08:00
+++ 1.59/mysql-test/r/order_by.result	2007-01-10 08:56:00 -08:00
@@ -29,14 +29,14 @@
 INSERT INTO t2 VALUES (8,'Consulter les soumissions','consulter_soumissions.phtml',200,'link.gif');
 INSERT INTO t2 VALUES (9,'Ajouter un type de materiel','typeMateriel_ajoute_form.phtml',51000,'link.gif');
 INSERT INTO t2 VALUES (10,'Lister/modifier un type de materiel','typeMateriel_liste_form.phtml',51010,'link.gif');
+INSERT INTO t2 VALUES (3,'Créer une fiche de client','clients_ajoute_form.phtml',40000,'link.gif');
 INSERT INTO t2 VALUES (4,'Modifier des clients','en_construction.html',40010,'link.gif');
 INSERT INTO t2 VALUES (5,'Effacer des clients','en_construction.html',40020,'link.gif');
 INSERT INTO t2 VALUES (6,'Ajouter un service','t2_ajoute_form.phtml',51050,'link.gif');
 select t1.id,t1.idservice,t2.ordre,t2.description  from t1, t2 where t1.id = 2   and t1.idservice = t2.id  order by t2.ordre;
 id	idservice	ordre	description
 2	1	10	Emettre un appel d'offres
+2	3	40000	Créer une fiche de client
 2	4	40010	Modifier des clients
 2	5	40020	Effacer des clients
 2	6	51050	Ajouter un service
@@ -873,6 +873,14 @@
 3	5
 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 t1 (a int);
+SELECT p.a AS val, q.a AS val1 FROM t1 p, t1 q ORDER BY val > 1;
+val	val1
+SELECT p.a AS val, q.a AS val FROM t1 p, t1 q ORDER BY val;
+ERROR 23000: Column 'val' in order clause is ambiguous
+SELECT p.a AS val, q.a AS val FROM t1 p, t1 q ORDER BY val > 1;
+ERROR 23000: Column 'val' in order clause is ambiguous
 DROP TABLE t1;
 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);

--- 1.41/mysql-test/t/order_by.test	2007-01-10 08:56:00 -08:00
+++ 1.42/mysql-test/t/order_by.test	2007-01-10 08:56:00 -08:00
@@ -44,7 +44,7 @@
 INSERT INTO t2 VALUES (8,'Consulter les soumissions','consulter_soumissions.phtml',200,'link.gif');
 INSERT INTO t2 VALUES (9,'Ajouter un type de materiel','typeMateriel_ajoute_form.phtml',51000,'link.gif');
 INSERT INTO t2 VALUES (10,'Lister/modifier un type de materiel','typeMateriel_liste_form.phtml',51010,'link.gif');
+INSERT INTO t2 VALUES (3,'Créer une fiche de client','clients_ajoute_form.phtml',40000,'link.gif');
 INSERT INTO t2 VALUES (4,'Modifier des clients','en_construction.html',40010,'link.gif');
 INSERT INTO t2 VALUES (5,'Effacer des clients','en_construction.html',40020,'link.gif');
 INSERT INTO t2 VALUES (6,'Ajouter un service','t2_ajoute_form.phtml',51050,'link.gif');
@@ -586,6 +586,21 @@
 SELECT a + 1 AS num, (select num + 2 FROM t1 LIMIT 1) FROM t1;
 --error 1054
 SELECT a.a + 1 AS num FROM t1 a JOIN t1 b ON num = b.a;
+DROP TABLE t1;
+
+#
+# Bug #25427: crash when order by expression contains a name
+#             that cannot be resolved unambiguously               
+#
+
+CREATE TABLE t1 (a int);
+
+SELECT p.a AS val, q.a AS val1 FROM t1 p, t1 q ORDER BY val > 1;
+--error 1052
+SELECT p.a AS val, q.a AS val FROM t1 p, t1 q ORDER BY val;
+--error 1052
+SELECT p.a AS val, q.a AS val FROM t1 p, t1 q ORDER BY val > 1;
+
 DROP TABLE t1;
 
 # End of 4.1 tests
Thread
bk commit into 5.0 tree (igor:1.2374)igor10 Jan