Bug #8191 SELECT INTO OUTFILE insists on FROM clause
Submitted: 29 Jan 2005 2:43 Modified: 9 May 2005 11:33
Reporter: Arjen Lentz Email Updates:
Status: Closed Impact on me:
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.0.20 OS:Linux (Linux)
Assigned to: Antony Curtis CPU Architecture:Any

[29 Jan 2005 2:43] Arjen Lentz
SELECT INTO OUTFILE insists on seeing a FROM clause, even though that may not be necessary for a correct/complete query. I.e. this is probably a parser bug.

How to repeat:
mysql> SELECT 1 INTO OUTFILE '/tmp/bla';
ERROR 1064: You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

mysql> SELECT 1 INTO OUTFILE '/tmp/bla' FROM anytable;
Query OK, 1 row affected (0.00 sec)

Suggested fix:
fix parser.
[30 Jan 2005 14:26] Dean Ellis
Verified against 4.0.24; does not affect 4.1.10.
[9 Mar 2005 23:42] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

[9 May 2005 11:33] Antony Curtis
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at

Additional info:

Fix in 4.0.25