-
-
Notifications
You must be signed in to change notification settings - Fork 654
Description
When running the mysql2 test suite against an Amazon RDS MySQL instance, several tests fail because Amazon RDS restricts the use of SET GLOBAL. RDS blocks changes to global server parameters, so any test that issues SET GLOBAL (e.g., this one) produces an access denied error.
See this Stackoverflow Issue on the matter
I understand the test suite wasn’t originally designed with RDS MySQL in mind. However in this setup with RDS, the mysql2 tests can’t run to completion, even though the library itself works fine.
In addition, due to #3859 , the tests can hang as well.
Reproduction:
- Point the test suite at an RDS MySQL endpoint.
- Run npm test.
- Tests involving SET GLOBAL fail with "command denied" errors and result in the following error:
SQL Error [1227] [42000]: Access denied; you need (at least one of) the SUPER or SYSTEM_VARIABLES_ADMIN privilege(s) for this operationIdeas so resolve:
-
Replace SET GLOBAL with session-level alternatives where feasible
-
Skip/guard those tests when the target server blocks global parameter changes
-
Provide a configuration option that disables tests requiring elevated privileges
Any of these would allow the full suite (or all relevant portions) to run on RDS without errors.