sidorares / sidorares/node-mysql2
Connection.end() never called back when there's an error
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 4.4k
- Forks
- 680
- Avg merge
- 9h 7m
- Merged PRs (30d)
- 59
Description
Inside quit.js
this.done = callback;
should probably be
this.onResult = callback;
!? 🤔
How to repeat:
Make a connection, that fails.
call connection.end(callback)
expected: Expected callback to be called
what actually happends: callback is never called.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in lib/commands/quit.js at the callback assignment around line 10, then trace how Connection.end() handles a failed connection. Reproduce the reported case and verify that the callback is invoked when the connection fails; done means the callback is called instead of being left pending.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mysql, node.js, typescript
- Domain
- backend, database
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100