Skip to content

Conversation

@itissdr
Copy link

@itissdr itissdr commented Jan 27, 2026

Problem

Routine calls would fail when the database name contains dashes.

Root Cause

The built-in Python isidentifier() function does not follow the same rules as MariaDB identifiers. Python's identifier rules are more restrictive and reject valid MariaDB names containing dashes.

Solution

Added a helper function to validate database names that follows MariaDB's identifier rules instead of Python's.

Changes

  • Replaced isidentifier() with custom validation function
  • Ensures compatibility with MariaDB naming conventions (allows dashes in identifiers)

Testing

  • Tested with database names containing dashes
  • Verified backward compatibility with existing valid names
  • Existing tests pass (Didnt run the ones requiring gemini api keys)

Example: Database name my-app-db now works correctly instead of being rejected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant