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

Bug #308440 reported by Stewart Smith
4
Affects Status Importance Assigned to Milestone
Drizzle
Confirmed
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)
Changed in drizzle:
importance: Undecided → Low
status: New → Confirmed
Changed in drizzle:
assignee: nobody → stewart-flamingspork
milestone: none → aloha
Changed in drizzle:
milestone: aloha → bell
Changed in drizzle:
milestone: bell → cherry
Stewart Smith (stewart)
Changed in drizzle:
milestone: 2010-04-26 → ongoing
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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