Bug with UNION ALL
am 15.05.2003 15:09:56 von slackHi!
UNION ALL works incorrectly with NULLs when making queries that can return
with NULL.
For example, when we use LEFT JOIN on 2 tables, we can get NULL in result
for second table. if we make that as a single query, we get:
tbl ID Para Cr_ IDD Par
1 5613 5492 NULL NULL NULL
1 5594 5492 NULL NULL NULL
1 5638 5492 NULL NULL NULL
1 5653 5492 NULL NULL NULL
1 5739 5738 NULL NULL NULL
when we UNION ALL 2 or more queries, we can get:
tbl ID Parent_id ID Cr__
1 5632 0 0 0
1 5633 0 0 0
1 3657 3135 119 1
1 5653 5492 182 1
1 5732 0 0 1
1 5738 0 171 1
1 3045 1675 122 1
1 3135 3045 160 1
1 5492 0 170 1
1 5634 0 0 1
the result shown above is stable:
we've get a garbage data in columns, that MUST be NULL.
Thanx!
--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@m.gmane.org