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

New errors after switching from mysql module #3190

Closed
forty opened this issue Nov 5, 2024 · 3 comments
Closed

New errors after switching from mysql module #3190

forty opened this issue Nov 5, 2024 · 3 comments

Comments

@forty
Copy link

forty commented Nov 5, 2024

I'm trying to upgrade a large and old codebase using the mysql module to mysql2. I managed to have things compiling (we use TS) and kind of working (yeah!)

To limit the possible number of trouble, I added

    decimalNumbers: true,
    jsonStrings: true

to my config.

Now we have lot of failing test with mostly the following errors:

  • ER_BAD_NULL_ERROR
  • ER_WARN_DATA_OUT_OF_RANGE

Those seem to be legitimate comptains but as this is tests, I don't really mind those wrong queries for now. It seems it was ignore with mysql library. Is it possible to get the same behavior with mysql2?
I suspect this has to do with sql_mode, but I could not find anything that either library would do with this parameter, so I'm a bit lost.

Thanks!

@forty
Copy link
Author

forty commented Nov 5, 2024

@wellwelwel Excelent answer, I was actually trying to extract a minimal reproduction example, which made me realize that those errors were never supposed to happen to begging with and were introduced by some changes I needed to make in my code to make things compile.

Ignore everything I said, sorry for the spam :/

@forty forty closed this as completed Nov 5, 2024
@wellwelwel
Copy link
Collaborator

wellwelwel commented Nov 5, 2024

Hey @forty, I use labels to organize the issues, but I usually comment too (in that case, I would ask for a minimal reproduction, if possible) 🙋🏻‍♂️

Ignore everything I said, sorry for the spam :/

No worries, feel free to ask questions, report errors and contribute to the project 🤝

@forty
Copy link
Author

forty commented Nov 5, 2024

Haha no worries, no comment was needed here, I actually saw the label when I came back to post my previous message, and thought it was spot on :) thank you!

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

No branches or pull requests

2 participants