Skip to content

Conversation

@shyim
Copy link
Member

@shyim shyim commented Jan 20, 2026

No description provided.

Copilot AI review requested due to automatic review settings January 20, 2026 10:43
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request improves the compatibility of CREATE TABLE statements between MariaDB and MySQL by refactoring the schema extraction and generation logic.

Changes:

  • Replaced SHOW CREATE TABLE approach with direct INFORMATION_SCHEMA queries for building CREATE TABLE statements
  • Added collation mapping to convert MySQL 8.0+ collations (utf8mb4_0900_*) to MariaDB-compatible equivalents (utf8mb4_unicode_ci, utf8mb4_bin)
  • Implemented batch schema prefetching to improve performance and support parallel table dumps

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
internal/mysqldump/schema.go New file containing schema structures, collation mapping, and SQL generation logic for CREATE TABLE statements
internal/mysqldump/schema_test.go Comprehensive unit tests for schema parsing, collation mapping, and SQL generation
internal/mysqldump/mysql.go Refactored to use schema-based approach, added prefetching, replaced old parsing methods with structured schema queries
internal/mysqldump/mysql_test.go Updated tests to mock INFORMATION_SCHEMA queries instead of SHOW CREATE TABLE

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@shyim shyim force-pushed the feat/mysqldump-fix-mariadb branch from b77c76a to 7106983 Compare January 20, 2026 12:25
@shyim shyim force-pushed the feat/mysqldump-fix-mariadb branch from 7106983 to 8915c38 Compare January 20, 2026 12:52
@shyim shyim merged commit 409c47b into main Jan 20, 2026
3 checks passed
@shyim shyim deleted the feat/mysqldump-fix-mariadb branch January 20, 2026 14:20
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.

2 participants