Skip to content

LOCAL INFILE option was not working as expected #203

@iagocavalcante

Description

@iagocavalcante

There was a problem with the :local_infile option in MyXQL. Even when users set local_infile: true in their connection options, the driver did not always enable the LOCAL INFILE capability during the handshake with the MySQL server. This caused queries that rely on LOAD DATA LOCAL INFILE to fail, even though the option was explicitly enabled.

Root cause:

  • The capability flag for LOCAL INFILE (client_local_files) was not being set correctly in all handshake scenarios, depending on how the connection options were processed.
  • As a result, the server did not allow LOCAL INFILE operations, and users would see errors or unexpected behavior when trying to use this feature.

Resolution:

  • The code was updated to ensure that the client_local_files capability flag is set whenever local_infile: true is passed in the connection options.
  • Now, when users enable :local_infile, the driver will always negotiate this capability with the server, and LOCAL INFILE operations will work as expected.

How to verify:

  • Set local_infile: true in your connection options.
  • Run a query that uses LOAD DATA LOCAL INFILE.
  • The operation should now succeed if the server is configured to allow it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions