Skip to content

Conversation

sinclert-canonical
Copy link
Contributor

@sinclert-canonical sinclert-canonical commented Sep 16, 2025

This PR updates the database-level DBA role naming in order to lift the restriction of having database names limited to 20 characters (down from the 32 character limit that MySQL supports). The agreed approach is to append a two-digit number at the end of the DBA role name, in order to distinguish it from other DBA role whose first set of characters is the same.

Proposed approach

Paulo and I think that using the Juju relation ID is a bad idea. It will heavily trim the space dedicated to the, potentially pruned database name (as relation IDs are several digits long), and introduced consistency issues when relations get broken, and new relations targeting the same database are created.

Instead, we propose the simple approach of incrementing an implicit counter, dictated by the number of roles which the naming schema would collide with.

@paulomach
Copy link
Contributor

@sinclert-canonical Include the libpatch bump on mysql.py, as the lib was already published

@sinclert-canonical sinclert-canonical force-pushed the sinclert/7322/database-level-roles branch from be91492 to fe98ee8 Compare September 23, 2025 09:13
@sinclert-canonical
Copy link
Contributor Author

Commits squashed for clarity.

@sinclert-canonical sinclert-canonical merged commit 9ec89d3 into main Sep 25, 2025
246 of 250 checks passed
@sinclert-canonical sinclert-canonical deleted the sinclert/7322/database-level-roles branch September 25, 2025 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature, UI change, or workload upgrade Libraries: Out of sync
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants