Closed
Description
Not sure if this is a bug of just a table name with reserved keywords. If the name of my table starts with "e1" the parser is unable to recognize it. It works with any other table name that doesn't start with "e1". Here is my code (SqlParser v.5.10, php version 8.2.16 CLI):
use PhpMyAdmin\SqlParser\Parser as Parser;
$query = "LOAD DATA LOCAL INFILE '/home/user/myloadfile.csv'
IGNORE INTO TABLE erp.e1_table
FIELDS TERMINATED BY '\t'
LINES TERMINATED BY '\n'
IGNORE 0 LINES;";
$parser = new Parser($query);
echo "\n file: ".$parser->statements[0]->file_name->file;
echo "\n schema: ".$parser->statements[0]->table->database;
echo "\n table: ".$parser->statements[0]->table->table;
This is the actual output:
file: /home/user/myloadfile.csv
schema:
table: erp
Expected output:
file: /home/user/myloadfile.csv
schema: erp
table: e1_table