select into outfile not enclosing integer columns where this would disambiguate TERMINATED BY

Bug #308440 reported by Stewart Smith on 2008-12-16
4
Affects Status Importance Assigned to Milestone
Drizzle
Low
Stewart Smith
MySQL Server
Unknown
Unknown

Bug Description

This is MySQL and Drizzle... but MySQL just warns and gives you crap. Drizzle does error out (with upcoming patch along with outfile_loaddata test):

mysql> create table t1 (a int, b int);
Query OK, 0 rows affected (0.01 sec)

mysql> insert into t1 values (42, 42); Query OK, 1 row affected (0.00 sec)

mysql> select * into outfile '../tmp/bar' fields optionally enclosed by '"' terminated by '0' from t1;
Query OK, 1 row affected, 1 warning (0.00 sec)

mysql> show warnings;
+---------+------+------------------------------------------------------------------------------------------------------------------------+
| Level | Code | Message |
+---------+------+------------------------------------------------------------------------------------------------------------------------+
| Warning | 1475 | First character of the FIELDS TERMINATED string is ambiguous; please use non-optional and non-empty FIELDS ENCLOSED BY |
+---------+------+------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.01 sec)

mysql> Aborted
stewart@hurricane:~/mysql/6.0/mysql-test$ cat var/tmp/bar
42042

If enclosed by was used, this wouldn't be ambiguous. Only if enclosed by was something that could be displayed in a number would this be an issue.

Stewart Smith (stewart) on 2008-12-16
Changed in drizzle:
importance: Undecided → Low
status: New → Confirmed
Lee Bieber (kalebral) on 2009-04-06
Changed in drizzle:
assignee: nobody → stewart-flamingspork
milestone: none → aloha
Lee Bieber (kalebral) on 2009-08-18
Changed in drizzle:
milestone: aloha → bell
Lee Bieber (kalebral) on 2010-01-27
Changed in drizzle:
milestone: bell → cherry
Stewart Smith (stewart) on 2010-03-25
Changed in drizzle:
milestone: 2010-04-26 → ongoing
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.