Bug #2290 output truncated with ELT when using DISTINCT
Submitted: 5 Jan 2004 10:47 Modified: 22 Jan 2004 4:57
Reporter: Jani Tolonen Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:4.0 OS:Any (All)
Assigned to: Victor Vagin CPU Architecture:Any

[5 Jan 2004 10:47] Jani Tolonen
Description:
Output gets truncated. MySQL 4.1 not affected.
The following test case should return

|    1 | 345                 |
|    2 | 34                  |

but instead it returns

|    1 | 34                  |
|    2 | 34                  |

Regards,
Jani

How to repeat:
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (i int, j int);
INSERT INTO t1 VALUES (1,1),(2,2);
SELECT DISTINCT i, ELT(j, '345', '34') FROM t1;