Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ER_NOT_ALLOWED_COMMAND #22

Closed
jimmyolo opened this issue Oct 12, 2018 · 4 comments
Closed

ER_NOT_ALLOWED_COMMAND #22

jimmyolo opened this issue Oct 12, 2018 · 4 comments

Comments

@jimmyolo
Copy link
Contributor

jimmyolo commented Oct 12, 2018

when setting the permitLocalInfile: true and the pipelining: true at the same time, LOAD DATE INFILE command will not allow

@rusher
Copy link
Collaborator

rusher commented Oct 17, 2018

Command "LOAD LOCAL INFILE" will result in a new exchange between connector and server.
This is the only case in protocol.

Connector when having finish sending a command and permitLocalInfile set to false can immediately send another command since the server will handle the command in order, and TCP guaranty FIFO order.

So those 2 options are incompatible.
if set together, this results having permitLocalInfile set to false.

If needing a connection with "LOAD LOCAL INFILE" enable, you cannot set option pipelining.
Still, an error would be a better solution than silently changing the value of permitLocalInfile to false.

@jimmyolo
Copy link
Contributor Author

jimmyolo commented Oct 18, 2018

thanks for reply
close it

https://mariadb.com/kb/en/library/packet_local_infile/

@jimmyolo
Copy link
Contributor Author

jimmyolo commented Dec 24, 2018

the latest version 2.0.2 still silently change permitLocalInfile to false
when option pipelining is true

  1. should console.warn() or throw error ?
  2. document these two options ?
this.pipelining = opts.pipelining === undefined || opts.pipelining;
this.permitLocalInfile = opts.permitLocalInfile || false;
if (this.pipelining && this.permitLocalInfile) {
  console.warn(...);
  this.permitLocalInfile = false;
}

@jimmyolo jimmyolo reopened this Dec 24, 2018
@rusher
Copy link
Collaborator

rusher commented Jan 15, 2019

corrected with f4cb727

@rusher rusher closed this as completed Jan 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants