feat(plugin-mysql): add OceanBase MySQL-mode connection type - #2741
feat(plugin-mysql): add OceanBase MySQL-mode connection type#2741J2TeamNNL wants to merge 15 commits into
Conversation
Co-authored-by: Nguyễn Nam Long <J2TeamNNL@users.noreply.github.com>
e3e5e51 to
e163916
Compare
Co-authored-by: Nguyễn Nam Long <J2TeamNNL@users.noreply.github.com>
Co-authored-by: Nguyễn Nam Long <J2TeamNNL@users.noreply.github.com>
# Conflicts: # Plugins/MySQLDriverPlugin/MySQLServerFlavor.swift
… edit keyless tables as MySQL does
…at are not read-only
|
Thanks for this. I reviewed it, then measured the hidden-primary-key mechanism against a live OceanBase CE 4.4.2.1 (Docker, What the server actually does
Two more defects showed up in the branch as written. After the sidebar's bulk column load ( What changedRemoved the hidden-PK machinery ( Identity. An OceanBase connection probes Stop uses the handshake thread id, as on MySQL. On a direct connection it equals Query timeout. Docker Compose import. Also: one shared VerifiedBuild, |
# Conflicts: # CHANGELOG.md # TablePro/Core/Plugins/ImportTypeMapper.swift # TableProTests/Core/Plugins/PluginMetadataRegistryTypeCountTests.swift # docs/snippets/driver-counts.mdx
Co-authored-by: Nguyễn Nam Long <J2TeamNNL@users.noreply.github.com>
Co-authored-by: Nguyễn Nam Long <J2TeamNNL@users.noreply.github.com>
…ion dialog Co-authored-by: Nguyễn Nam Long <J2TeamNNL@users.noreply.github.com>
…d chrome Co-authored-by: Nguyễn Nam Long <J2TeamNNL@users.noreply.github.com>
Co-authored-by: Nguyễn Nam Long <J2TeamNNL@users.noreply.github.com>
Co-authored-by: Nguyễn Nam Long <J2TeamNNL@users.noreply.github.com>
Co-authored-by: Nguyễn Nam Long <J2TeamNNL@users.noreply.github.com>
Fixes #1748
Summary
Adds OceanBase as a connection type on the bundled MySQL plugin (libmariadb), same family as TiDB and MariaDB. Type id
OceanBase, default port 2881, schemeoceanbase://. Oracle compatibility mode is out of scope.This is not a cloned MySQL snapshot. The flavor is resolved from
@@version_commentwhen the connection type is OceanBase. The MySQL handshake reports5.7.25(or5.6.25through OBProxy) and does not name the engine, so a server opened as MySQL stays on the MySQL path. Choose OceanBase for the OceanBase sidebar, EXPLAIN, Stop, and timeout.Grid save
OceanBase keeps a hidden
__pk_incrementcolumn on a table declared without a primary key. The catalog never reports it andSELECT *never returns it, so TablePro edits such a table the way it edits one on MySQL: theUPDATEorDELETEmatches every column of the row, and a save that would touch more than one row is rolled back.A keyless save on
FLOAT,DOUBLEorJSONcompares throughCONCAT(), same as MySQL, MariaDB and TiDB after the measurement on OceanBase CE 4.4.2.1 that landed on main.Flavor
MySQLServerFlavor.oceanbase(version:)from@@version_comment:OceanBase_CE 4.4.2.1,OceanBase 3.1.3,OceanBase_CE-v4.3.5.KILL QUERYwith the handshake thread id. Query timeout setsmax_execution_timeandob_query_timeouttogether, because OceanBase's own 10 second default still fires on statements that are not read-only.information_schema,mysql,oceanbase. User databaseteststays listed.ANALYZE TABLEonly, on the samePluginMaintenanceOperationdescriptors as TiDB and Databend.GENERATION_EXPRESSIONare gated on OceanBase 4.0+, not on the 5.7 banner.Curated snapshot
Port 2881,
oceanbase://, EXPLAIN as plain text (no FORMAT=JSON, no ANALYZE), no Spatial types, no Server Dashboard, no native dump, Compare only OceanBase-to-OceanBase, noSET FOREIGN_KEY_CHECKS, no Users & Roles connection limit, triggers browse without edit, routines yes. Idle-release field only; no AWS IAM or Unix socket.iOS
Type routing only, the same shape as TiDB. The iOS MySQL driver has no flavor path. Databend stays Mac-only.
iOS compiles the shared MySQL maintenance descriptors and the PostgreSQL catalog quoting helper (
PostgreSQLObjectQueries), so the flavor switch and the quoting change from #2777 build on iPhone. The iOS PostgreSQL driver passes the raw schema and table names and lets that helper quote them.Verification
This environment has no Docker and no Xcode. Live OceanBase was not measured here; the FLOAT/DOUBLE/JSON row-match prefixes follow the measurement already on main. Unit tests cover version comments, flavor/SQL/Stop paths, registry count 36,
allKnownTypescount 30,oceanbase://, Docker Composeoceanbase/oceanbase-ceasroot@sys, iOS foreign-key quoting including a backslash, and OceanBase in the MySQL-family text row-match set.Fork CI on
81597dbwas green (13 checks). This revision merges currentmain(theme rewrite, keyless FLOAT/JSON match) so the PR is no longer conflicted.Docs house style and
check-docs-against-source.pypass.swiftlint --strictandxcodebuildcould not run here.Not in this PR