Skip to content

Fix MySQL 8.0.x incompatibilities #1962

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
tests: fix local_infile breaking change on MySQL 8
  • Loading branch information
ruiquelhas committed May 6, 2018
commit 46e90daa05c7021d5f6f9fe0ff7e07ea8aa286e5
8 changes: 8 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -1377,6 +1377,14 @@ The following flags are sent by default on a new connection:
- `SECURE_CONNECTION` - Support native 4.1 authentication.
- `TRANSACTIONS` - Asks for the transaction status flags.

The `local_infile` system variable is disabled by default since MySQL 8.0.2, which
means the `LOCAL_FILES` flag will only make sense if the feature is explicitely
enabled on the server.

```sql
SET GLOBAL local_infile = true;
```

In addition, the following flag will be sent if the option `multipleStatements`
is set to `true`:

Expand Down
3 changes: 3 additions & 0 deletions test/integration/connection/test-load-data-infile.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ common.getTestConnection(function (err, connection) {

common.useTestDb(connection);

// "LOAD DATA LOCAL" is not allowed on MySQL 8 by default
connection.query('SET GLOBAL local_infile = true', assert.ifError);

connection.query([
'CREATE TEMPORARY TABLE ?? (',
'`id` int(11) unsigned NOT NULL AUTO_INCREMENT,',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ common.getTestConnection({multipleStatements: true}, function (err, connection)

common.useTestDb(connection);

connection.query('SET GLOBAL local_infile = true', assert.ifError);

connection.query([
'CREATE TEMPORARY TABLE ?? (',
'`id` int(11) unsigned NOT NULL AUTO_INCREMENT,',
Expand Down