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

MySQL/MariaDB: Use strict SQL mode #699

Merged
merged 1 commit into from
Mar 21, 2024
Merged

MySQL/MariaDB: Use strict SQL mode #699

merged 1 commit into from
Mar 21, 2024

Conversation

lippserd
Copy link
Member

@lippserd lippserd commented Mar 18, 2024

For MySQL (and MariaDB, etc.), in addition to ANSI_QUOTES SQL mode, we now also set TRADITIONAL, which enables strict mode.

fixes #611
refs #624

Copy link
Contributor

@julianbrost julianbrost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the MySQL tests are failing rightfully, in the mysql-debug.log.xz artifact, there are multiple occurrences of this error:

2024-03-18T12:28:52.624Z\tFATAL\ticingadb\tError 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

And for the PostgreSQL tests, well, wait a few minutes, I'll create a PR, d'oh! 🙈

@julianbrost
Copy link
Contributor

And for the PostgreSQL tests, well, wait a few minutes, I'll create a PR, d'oh! 🙈

Here we go:

For MySQL (and MariaDB, etc.), in addition to `ANSI_QUOTES` SQL mode,
we now also set `TRADITIONAL`, which enables strict mode.
@lippserd lippserd force-pushed the mysql-strict-mode branch from 1adf3dc to 16d43cb Compare March 19, 2024 08:53
@lippserd
Copy link
Member Author

Looks like the MySQL tests are failing rightfully, in the mysql-debug.log.xz artifact, there are multiple occurrences of this error:

2024-03-18T12:28:52.624Z\tFATAL\ticingadb\tError 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

Yeah, forgot to quote the sql_mode.

Copy link
Member

@yhabteab yhabteab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LFTM!

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

Successfully merging this pull request may close these issues.

MySQL/MariaDB strict mode disabled by setting sql_mode=ANSI_QUOTES
3 participants