Repository navigation
Closed
Description
Problem
OceanBase in MySQL mode maintains a separate full initialization script even though it shares the MySQL SQL family. Every schema, seed-data and plugin migration change has to be applied twice. The copies have already drifted, so keeping both independently maintained files increases maintenance cost and permits inconsistent fresh installations.
Evidence
Inspected master at 3116109d42f4e6ca0e71258e15ec5ed051bdc4a1:
- MySQL initialization and OceanBase initialization are not identical. For example, MySQL contains the appended namespace/lookup secondary indexes such as
idx_selector_ns_plugin_name, while the OceanBase copy does not. Seed permissions and loggingKafka configuration also differ. MapperConfig.OceanBaseSQLConfigalready registers OceanBase with the MySQL pagination dialect. This supports consolidating the initialization source, but does not prove that every MySQL statement is accepted by every OceanBase version..github/scripts/native-sql-matrix.pycurrently selectsdb/init/ob/schema.sqlfor the native OceanBase job.
Requested Change
- Use
db/init/mysql/schema.sqlas the canonical initialization source for both MySQL and OceanBase in MySQL mode. - Reconcile existing schema, index, constraint and seed-data differences before switching. Separate accidental drift from demonstrated engine-specific requirements; preserve intended features and permissions.
- Delete the independently maintained
db/init/ob/schema.sqlafter updating the native SQL runner and all deployment, packaging and documentation references. If a proven OceanBase-specific difference remains, maintain only a small explicit compatibility overlay rather than another full schema copy. - Preserve the OceanBase database configuration, JDBC driver and native CI job. This task removes duplicate SQL ownership, not OceanBase support or support for OceanBase's separate Oracle mode.
- Keep historical upgrade scripts intact; consolidate upgrade sources only in a separately validated follow-up.
Acceptance Criteria
- Native MySQL and OceanBase jobs initialize from the same canonical source (plus any documented minimal overlay), and both pass on the versions supported by CI.
- Fresh installations have equivalent intended tables, indexes, constraints and plugin/resource/permission/default-namespace seed semantics, with no orphan relations or duplicate handle natural keys.
- No independently maintained OceanBase full initialization copy or dangling reference remains. Users can still select OceanBase and locate the correct initialization instructions.
Metadata
Metadata
Assignees
Labels
No labels
Activity
github-actions commentedon Oct 9, 2026
👋 Hello @Aias00
A new issue has been opened by @cloudbase-ai:
Please review when you have time. Thank you! 🙏
yangjj-iso commentedon Oct 11, 2026
/assign