Skip to content

fix: use schema instead of database for GaussDB M mode view DDL - #6166

Open
AndrewDi wants to merge 1 commit into
t8y2:mainfrom
AndrewDi:fix/gaussdb-m-view-ddl
Open

fix: use schema instead of database for GaussDB M mode view DDL#6166
AndrewDi wants to merge 1 commit into
t8y2:mainfrom
AndrewDi:fix/gaussdb-m-view-ddl

Conversation

@AndrewDi

Copy link
Copy Markdown
Contributor

In GaussDB M mode (MySQL-compatible), the schema parameter received from the frontend is the actual schema name (e.g. dbe_perf), not the database name (e.g. pubdb). The previous code passed the database name to mysql_object_source_sql, generating SHOW CREATE VIEW pubdb.view_name which failed because pubdb is a database, not a schema.

Fix gaussdb_m_view_object_source_sql to use the schema parameter instead of the database parameter when building the SHOW CREATE VIEW SQL.

In GaussDB M mode (MySQL-compatible), the schema parameter received from
the frontend is the actual schema name (e.g. dbe_perf), not the database
name (e.g. pubdb). The previous code passed the database name to
mysql_object_source_sql, generating SHOW CREATE VIEW `pubdb`.`view_name`
which failed because pubdb is a database, not a schema.

Fix gaussdb_m_view_object_source_sql to use the schema parameter instead
of the database parameter when building the SHOW CREATE VIEW SQL.
@AndrewDi

Copy link
Copy Markdown
Contributor Author

@zipg 修复获取view的schema错误

@github-actions github-actions Bot added area/core Shared DBX core runtime bug Something isn't working labels Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/core Shared DBX core runtime bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant