rishi-rana commented on PR #39882:
URL: https://github.com/apache/shardingsphere/pull/39882#issuecomment-6328104252

   To make this easy to accept or adjust in one pass, here's the exact contract 
as currently documented (`limitations.en.md`/`.cn.md`, LOCAL section, same text 
mirrored for XA):
   
   1. **Supported statements**: `CREATE TABLE`, `ALTER TABLE`, `DROP TABLE`, 
`RENAME TABLE` only, when PostgreSQL-protocol; metadata refresh deferred to 
transaction end. openGauss: no metadata-changing DDL in transactions at all.
   2. **Rejection**: everything else (schema/view/index DDL) rejected before 
execution with SQLSTATE `0A000`.
   3. **No same-transaction visibility**: a statement can't reference a table 
created earlier in the same transaction (metadata only applies at commit).
   4. **Routed-storage requirement**: the above only applies when every storage 
unit the statement routes to keeps DDL transactional — e.g. PostgreSQL-protocol 
routed to MySQL storage keeps the restriction, since that storage commits 
immediately regardless of ShardingSphere's deferred metadata.
   
   BASE is explicitly excluded from all of the above (falls through to the 
pre-existing restriction).
   
   On `SET SCHEMA`: it's a form of `ALTER TABLE`, so point 1's current wording 
implies it's supported — it isn't; the parser doesn't capture the destination 
schema (pre-existing gap, not introduced here), so deferred refresh can't 
locate the moved table after commit. I've opened #40201 as a doc-only follow-up 
to explicitly carve this out of the `ALTER TABLE` support statement, rather 
than fold it into this PR's diff.
   
   Please accept this as the final boundary, or tell me which point to adjust.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to