Bug #53419 LOAD DATA INFILE does not treat "data" as a keyword
Submitted: 4 May 2010 20:11 Modified: 24 May 2010 11:39
Reporter: Mark Leith Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Enterprise Monitor: Agent Severity:S3 (Non-critical)
Version:2.2.0.1708 OS:Any
Assigned to: Jan Kneschke CPU Architecture:Any

[4 May 2010 20:11] Mark Leith
Description:
"load data infile ..." gets normalized to "LOAD data INFILE ...", whilst "LOAD DATA INFILE ..." gets shown correct within the agent - the "data" keyword being treated incorrectly, just accepting whatever case we give and not properly upper-casing. 

How to repeat:
Cerberus:tests mark$ cat ~/Dev/tests/load-data.txt 
1       mark    manager
2       mark    architect
3       gary    director
4       jan     developer

use test;
create table emp (id int, name varchar(20), role varchar(20));
load data infile '/path/to/load-data.txt' into table emp;
LOAD DATA INFILE '/path/to/load-data.txt' INTO TABLE emp;

Suggested fix:
Correctly upper-case the "DATA" keyword.
[5 May 2010 9:06] Enterprise Tools JIRA Robot
Mark Leith writes: 
Data is a special keyword, we will look at special casing this if it is found after the LOAD keyword.
[6 May 2010 15:37] Enterprise Tools JIRA Robot
Jan Kneschke writes: 
Pushed to mem-trunk

revno: 1849
committer: jan@mysql.com
branch nick: trunk
timestamp: Thu 2010-05-06 16:49:38 +0200
message:
  added DO *, LOAD XML ... and the HANDLER stmts as pseudo-SQL-keywords
------------------------------------------------------------
revno: 1848
fixes bug(s): http://bugs.mysql.com/53419
committer: jan@mysql.com
branch nick: trunk
timestamp: Thu 2010-05-06 15:59:41 +0200
message:
  upper-case some common pseudo-SQL-keywords (fixes #53419/EM-4470 and #44772)
  
    * commit, rollback
    * CREATE temporary TABLE
    * truncate TABLE
    * LOAD data INFILE
------------------------------------------------------------
revno: 1847
fixes bug(s): http://bugs.mysql.com/53425
committer: jan@mysql.com
branch nick: trunk
timestamp: Wed 2010-05-05 10:16:08 +0200
message:
  added more unit-tests for query-type (for #53425/EM-4471)
------------------------------------------------------------
revno: 1846
committer: jan@mysql.com
branch nick: trunk
timestamp: Tue 2010-05-04 15:35:05 +0200
message:
  added the old 'quan.lua' test from the 2.1 tree back as t_normalize.lua
[10 May 2010 19:56] Enterprise Tools JIRA Robot
Keith Russell writes: 
Patch installed in versions => 2.2.1.1714.
[12 May 2010 2:10] Enterprise Tools JIRA Robot
Bill Weber writes: 
verified fixed in build 2.2.1.1714
[24 May 2010 11:39] MC Brown
A note has been added to the 2.2.1 changelog:

        A <literal>LOAD DATA INFILE</literal> statement would not get                                                                                      
        normalized correctly within the Query Analyzer display.