Skip to content

Running 2 LOAD DATA LOCAL INFILE queries in one query() call yields PARSER_READ_PAST_END #1036

@NewsteadEric

Description

@NewsteadEric

Hello,

When trying to run the following two queries in the same query() call

LOAD DATA LOCAL INFILE 'file_name_here'
    INTO TABLE table_a
    CHARACTER SET utf8
    FIELDS TERMINATED BY ','
    OPTIONALLY ENCLOSED BY '"'
    LINES TERMINATED BY '\n'
    IGNORE 1 LINES;

LOAD DATA LOCAL INFILE 'file_name_here'
   INTO TABLE table_b
   CHARACTER SET utf8
   FIELDS TERMINATED BY ','
   OPTIONALLY ENCLOSED BY '"'
   LINES TERMINATED BY '\n'
   IGNORE 1 LINES;

node-mysql returns the error message { [Error: Parser: read past end] offset: 160, code: 'PARSER_READ_PAST_END' }

Running each of the queries in its own query() call works fine, however.

What could be causing this, and is there any way to get this to work without having to separate the two queries from each other in terms of calling node-mysql?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions