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

DB: fix DB connection and query format #413

Merged
merged 2 commits into from
Sep 3, 2024
Merged

Conversation

danielbeardsley
Copy link
Member

Pulldasher was totally broken and would boot until it ran a REPLACE INTO query and then crash.

oof, see the second change.

First: The .query().then() was just changed to make use of the new
promise interface instead of promisifying the old callback interface.
It wasn't the problem.

Second: Add support for utf8mb3 to the library (we'll open a pull to add
it upstream). See the code comment.

Ooof, see the second change.

First: The .query().then() was just changed to make use of the new
promise interface instead of promisifying the old callback interface.
It wasn't the problem.

Second: Add support for utf8mb3 to the library (we'll open a pull to add
it upstream). See the code comment.
Copy link
Member

@davidrans davidrans left a comment

Choose a reason for hiding this comment

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

CR ☕

@danielbeardsley
Copy link
Member Author

This seems to be working fine now!

QA 👍

I've opened a pull upstream: sidorares/node-mysql2#3007

@danielbeardsley danielbeardsley merged commit d1628b4 into master Sep 3, 2024
1 check passed
@danielbeardsley danielbeardsley deleted the mysql2-bugfix branch September 3, 2024 23:48
@djmetzle
Copy link
Contributor

djmetzle commented Sep 5, 2024

Ref: https://github.com/iFixit/server-templates/issues/4731

Are we still using mb3 for the metrics schema?

@davidrans
Copy link
Member

davidrans commented Sep 5, 2024

The tables and columns are all mb4, but some of the mysql defaults are still mb3:

mysql> SHOW VARIABLES LIKE 'character_set_server';
SHOW VARIABLES LIKE 'collation_server';
+----------------------+---------+
| Variable_name        | Value   |
+----------------------+---------+
| character_set_server | utf8mb3 |
+----------------------+---------+
1 row in set (0.00 sec)

+------------------+--------------------+
| Variable_name    | Value              |
+------------------+--------------------+
| collation_server | utf8mb3_unicode_ci |
+------------------+--------------------+
1 row in set (0.00 sec)

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

Successfully merging this pull request may close these issues.

3 participants