| Bug #1513 | SELECT * DOESN'T WORK PROPERLY | ||
|---|---|---|---|
| Submitted: | 9 Oct 2003 17:25 | Modified: | 9 Oct 2003 18:07 |
| Reporter: | Udi Karni | Email Updates: | |
| Status: | Not a Bug | Impact on me: | |
| Category: | MySQL Server: Command-line Clients | Severity: | S2 (Serious) |
| Version: | 4.0.15-max-debug | OS: | Windows (Windows 2000) |
| Assigned to: | CPU Architecture: | Any | |
[9 Oct 2003 18:05]
Jeremy Cole
Thank you for your bug report. This issue has already been fixed in the latest released version of that product, which you can download at http://www.mysql.com/downloads/
[9 Oct 2003 18:07]
Jeremy Cole
You most likely have \r's in the FIRST_NAME column, because you should have specified "LINES TERMINATED BY '\r\n'" when using LOAD DATA INFILE.

Description: I loaded a 3 row/3 column table using the loader. The SELECT is messed up. mysql> SELECT * FROM PEOPLE; +------+-----------+------------+ | PID | LAST_NAME | FIRST_NAME | +------+-----------+------------+ | Karni | Udi | | Frazin | Larry | 3 | Nakahiro | Randy | +------+-----------+------------+ 3 rows in set (0.00 sec) mysql> SELECT PID FROM PEOPLE; +------+ | PID | +------+ | 1 | | 2 | | 3 | +------+ 3 rows in set (0.00 sec) mysql> SELECT LAST_NAME FROM PEOPLE; +-----------+ | LAST_NAME | +-----------+ | Karni | | Frazin | | Nakahiro | +-----------+ 3 rows in set (0.00 sec) mysql> SELECT FIRST_NAME FROM PEOPLE; +------------+ | FIRST_NAME | +------------+ | |y | Randy | +------------+ 3 rows in set (0.00 sec) mysql> select version(); +------------------+ | version() | +------------------+ | 4.0.15-max-debug | +------------------+ 1 row in set (0.00 sec) How to repeat: mysql> CREATE TABLE PEOPLE (PID INTEGER, LAST_NAME VARCHAR (30), -> FIRST_NAME VARCHAR (30)); Query OK, 0 rows affected (0.00 sec) mysql> LOAD DATA LOCAL INFILE "C:\\XXX.TXT" INTO TABLE PEOPLE -> FIELDS TERMINATED BY ","; Query OK, 3 rows affected (0.00 sec) Records: 3 Deleted: 0 Skipped: 0 Warnings: 0 1,Karni ,Udi 2,Frazin ,Larry 3,Nakahiro,Randy