4.1 vs. 4.0 Unions
am 20.01.2005 20:26:31 von James FrankmanI run the exact same query over identical data sets. One in MySQL 4.0 =
and the other in MySQL 4.1. The 4.0 title column would be blank where =
the 4.1 would contain the value. Again, this is over identical data. The =
second query in the union is the one that has data. The 1st and 3rd =
queries in the union return zero results. Anybody have any idea what is =
going on?
Query:
select A.Email, '' as title from phonepatable A where left(A.email, =
locate('@', A.email)-1) =3D 'xullmer'=20
union=20
select B.Email, B.AgentNo as title from Agentstable B where =
left(B.email, locate('@', B.email)-1) =3D 'xullmer'=20
union=20
select C.Email, C.Title as title from employeestable C where =
left(C.email, locate('@', C.email)-1) =3D 'xullmer'
4.1 Results:=20
+----------------------+-------+
| Email | title |
+----------------------+-------+
| xullmer@xyz.com | 837 |
+----------------------+-------+
1 row in set (0.00 sec)
4.0 Results:
+----------------------+-------+
| Email | title |
+----------------------+-------+
| xullmer@xyz.com | |
+----------------------+-------+
1 row in set (0.00 sec)
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=3Dgcdmw-win32@m.gmane.org