"Axel Tietje" <[EMAIL PROTECTED]> wrote:
> Hi everyone...
> 
> I actually have two servers:
> 
> 1. Server: MySQL 4.0.12
> 2. Server: MySQL 3.23.38
> 
> This query:
> 
> SELECT o_obj, 
>       MAX(CASE WHEN o_key = '69B96431' THEN o_val END) AS _69B96431,
>       MAX(CASE WHEN o_key = '69B96431' THEN o_typ END) AS T_69B96431, 
>       MAX(CASE WHEN o_key = 'AA0887CB' THEN o_val END) AS _AA0887CB, 
>       MAX(CASE WHEN o_key = 'AA0887CB' THEN o_typ END) AS T_AA0887CB 
> FROM   TBL_32BF90B0 
> WHERE (
>       (o_key = '69B96431' AND o_val = '01') OR 
>       (o_key = 'AA0887CB' AND o_val = '1')
>      ) 
> GROUP BY o_obj 
> HAVING (_69B96431 = '01')
> 
> shows on server 1 (4.0.12):
> +----------+-----------+------------+-----------+------------+
> | o_obj    | _69B96431 | T_69B96431 | _AA0887CB | T_AA0887CB |
> +----------+-----------+------------+-----------+------------+
> | 1672BE70 | 01        | S          | 1         | B          |
> | D27518B1 | 01        | S          | 1         | B          |
> +----------+-----------+------------+-----------+------------+
> 2 rows in set (0.01 sec)
> 
> but on server 2 (3.23.38):
> +----------+-----------+------------+-----------+------------+
> | o_obj    | _69B96431 | T_69B96431 | _AA0887CB | T_AA0887CB |
> +----------+-----------+------------+-----------+------------+
> | 1672BE70 | 01        | S          | NULL      | NULL       |
> | D27518B1 | 01        | S          | NULL      | NULL       |
> +----------+-----------+------------+-----------+------------+
> 
> Please note the differences in fourth and fifth column while having 
> absolutely identical tables and data.
> 
> 
> The following query works on 1. Server (4.0.12), but not on 2. Server (3.23.38):
> 
[skip]

3.23.38 was released about 2,5 years ago. Since that time many bugs were fixed. No 
wonder that query doesn't work on 3.23.38.




-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
       <___/   www.mysql.com




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to