Files
floci/src/main/java
Younes BerianeandPriamo 16c159e5b2 fix(rds): run MySQL and MariaDB with their parameter group values (#5981)
* fix(rds): run MySQL and MariaDB with their parameter group values

A DB cluster parameter group or DB parameter group was stored but never
reached the engine: the container started with only the authentication
option, so the database kept MySQL's built-in defaults.

Every container start (create, reboot, stop and start, emulator restart)
now passes the group's overrides as --loose-<name>=<value> server options:
the cluster parameter group for a cluster, the DB parameter group for a
standalone instance. The loose prefix makes the server skip an Aurora-only
parameter with a warning. Formula values and the parameters that decide
where the server listens and keeps its data are left out, and Floci's
authentication options come last so the proxy keeps working.

DescribeDBClusters now reports DBClusterParameterGroup.

Fixes #5946

* fix(rds): layer the Aurora writer's parameter group and switch groups on modify

Review follow-up:

- require_secure_transport and skip_grant_tables are no longer passed to
  the server, like port and socket: Floci's proxy talks to MySQL without
  TLS, and skip_grant_tables turns networking off, so either would lock
  every client out.
- An Aurora cluster's engine now runs with its DB cluster parameter group
  and the writer instance's DB parameter group on top, so an
  instance-level value such as max_connections reaches the database.
  Creating the writer restarts the cluster's container when its group
  changes the engine's options; every later start reads the writer's
  group too.
- ModifyDBCluster takes DBClusterParameterGroupName and ModifyDBInstance
  takes DBParameterGroupName. The group is checked against the engine
  before anything else in the request is applied, recorded at once, and
  used from the database's next start (a reboot), as on AWS.

* fix(rds): apply Aurora groups on a writer reboot and report incompatible-parameters

Review follow-up:

- RebootDBInstance on an Aurora cluster's writer restarts the database the
  cluster's members share, which is how AWS applies a changed DB cluster
  parameter group or writer DB parameter group. A reader's reboot still
  only restarts its endpoint.
- time_zone reaches the server as --default-time-zone, since MySQL has no
  time_zone option, and Aurora's binlog_format=OFF, which turns binary
  logging off and which MySQL refuses as a value, as --skip-log-bin.
- A server that stops while starting with its parameter group's options
  leaves no container, and its instance, or every member of its cluster,
  reports incompatible-parameters until a reboot starts it with values the
  server accepts. Floci logs the server's error lines.
- DescribeDBClusters names a default DB cluster parameter group only when
  DescribeDBClusterParameterGroups lists it.
- The integration test reboots the writer rather than the cluster, checks
  that binary logging is off, covers a refused value, and skips through
  RdsRequests.assumeDocker.

---------

Co-authored-by: Priamo <pgermosen@gmail.com>
2026-10-23 23:15:19 -04:00
..