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

LOAD DATA INFILE tests failing on local machine #1437

Closed
evansiroky opened this issue Jun 7, 2016 · 4 comments
Closed

LOAD DATA INFILE tests failing on local machine #1437

evansiroky opened this issue Jun 7, 2016 · 4 comments
Assignees

Comments

@evansiroky
Copy link

I cloned this repo, installed dependencies, setup the database and environment variables and am getting the following errors:

not ok 9 test\integration\connection\test-load-data-infile.js

  C:\Users\evansiroky\git\node-mysql\lib\protocol\Parser.js:78
          throw err; // Rethrow non-MySQL errors
          ^
  AssertionError: 'Hello World\r' == 'Hello World'
      at Query._callback (C:\Users\evansiroky\git\node-mysql\test\integration\connection\test-load-data-infile.js:35:12)
      at Query.Sequence.end (C:\Users\evansiroky\git\node-mysql\lib\protocol\sequences\Sequence.js:85:24)
      at Query._handleFinalResultPacket (C:\Users\evansiroky\git\node-mysql\lib\protocol\sequences\Query.js:144:8)
      at Query.EofPacket (C:\Users\evansiroky\git\node-mysql\lib\protocol\sequences\Query.js:128:8)
      at Protocol._parsePacket (C:\Users\evansiroky\git\node-mysql\lib\protocol\Protocol.js:280:23)
      at Parser.write (C:\Users\evansiroky\git\node-mysql\lib\protocol\Parser.js:74:12)
      at Protocol.write (C:\Users\evansiroky\git\node-mysql\lib\protocol\Protocol.js:39:16)
      at Socket.<anonymous> (C:\Users\evansiroky\git\node-mysql\lib\Connection.js:109:28)
      at emitOne (events.js:77:13)
      at Socket.emit (events.js:169:7)

not ok 10 test\integration\connection\test-multiple-statements-load-data-infile.js

  C:\Users\evansiroky\git\node-mysql\lib\protocol\Parser.js:78
          throw err; // Rethrow non-MySQL errors
          ^
  AssertionError: 'Hello World\r' == 'Hello World'
      at Query._callback (C:\Users\evansiroky\git\node-mysql\test\integration\connection\test-multiple-statements-load-data-infile.js:40:12)
      at Query.Sequence.end (C:\Users\evansiroky\git\node-mysql\lib\protocol\sequences\Sequence.js:85:24)
      at Query._handleFinalResultPacket (C:\Users\evansiroky\git\node-mysql\lib\protocol\sequences\Query.js:144:8)
      at Query.EofPacket (C:\Users\evansiroky\git\node-mysql\lib\protocol\sequences\Query.js:128:8)
      at Protocol._parsePacket (C:\Users\evansiroky\git\node-mysql\lib\protocol\Protocol.js:280:23)
      at Parser.write (C:\Users\evansiroky\git\node-mysql\lib\protocol\Parser.js:74:12)
      at Protocol.write (C:\Users\evansiroky\git\node-mysql\lib\protocol\Protocol.js:39:16)
      at Socket.<anonymous> (C:\Users\evansiroky\git\node-mysql\lib\Connection.js:109:28)
      at emitOne (events.js:77:13)
      at Socket.emit (events.js:169:7)

System info:

  • Windows 10 64 bit
  • MySQL 5.6.27-log MySQL Community Server (GPL) Compiled for Win64 (x86_64) <-- I even reinstalled this to be sure.
  • node-mysql 2.11.0
  • error observed with node v4.2.2, node v5.11.1 and node v6.2.1
@dougwilson
Copy link
Member

For Windows, you either need to download the ZIP from GitHub or turn core.autocrlf off and then re-clone.

@evansiroky
Copy link
Author

That fixed it for the present tests. However, I submitted a pull request where it fails in a specific circumstance: see #1438.

@dougwilson
Copy link
Member

Hey @evansiroky, I added some code to the tests that will now account for whatever line endings the CSV file is in on your disk for the future!

@dougwilson dougwilson self-assigned this Jun 8, 2016
@evansiroky
Copy link
Author

Nice! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants