Skip to content

Add MySQL/MariaDB support to the SQL mixin#2625

Merged
sebix merged 4 commits intocerttools:developfrom
creideiki:mysql-mixin
Aug 14, 2025
Merged

Add MySQL/MariaDB support to the SQL mixin#2625
sebix merged 4 commits intocerttools:developfrom
creideiki:mysql-mixin

Conversation

@creideiki
Copy link
Contributor

Add MySQL/MariaDB support using the PyMySQL module.

@sebix sebix added feature Indicates new feature requests or new features component: bots labels Jul 29, 2025
Copy link
Member

@sebix sebix left a comment

Choose a reason for hiding this comment

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

Thanks for the addition, looks good to me.

Only the stylecheck complains on a small issue:

intelmq/lib/mixins/sql.py:133:5: E303 too many blank lines (2)

Is someone else able to test (ie. verify) the PR?

By default, MySQL and MariaDB uses double quotes (") to delimit string
literals. This contradicts ANSI SQL, which uses double quotes to quote
special characters in identifiers. The generic_db_lookup expert relies
on the ANSI behaviour. Set sql_mode=ANSI_QUOTES for MySQL and MariaDB
to make it behave like everything else.
The SQL mixin now handles SQLite, PostgreSQL, MSSQL, and MySQL/MariaDB.
Make sure all of these are mentioned in the documentation for all SQL
bots.
@creideiki
Copy link
Contributor Author

Only the stylecheck complains on a small issue:

intelmq/lib/mixins/sql.py:133:5: E303 too many blank lines (2)

Should be fixed now.

@sebix sebix added this to the 3.5.0 milestone Aug 11, 2025
@sebix sebix merged commit c35a284 into certtools:develop Aug 14, 2025
20 checks passed
@sebix sebix modified the milestones: 3.6.0, 3.5.0 Feature Release Aug 20, 2025
@sebix sebix self-assigned this Aug 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: bots feature Indicates new feature requests or new features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants