Cherry pick: rename table & null/negative limit and offset - #24557
Cherry pick: rename table & null/negative limit and offset#24557daviszhen wants to merge 3 commits into
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
XuPeng-SH
left a comment
There was a problem hiding this comment.
Blocking issue in pkg/sql/plan/build_ddl.go:
oldName was changed from tableDef.Name to the raw parsed tableName. That breaks rename correctness when the input spelling differs from the catalog name (for example with lower_case_table_names=1 / case-insensitive resolution):
- the execution path requires
rename.OldName == schema.Name(pkg/vm/engine/tae/catalog/schema.go), so a mixed-case input can now fail withunmatched old schema name getSqlForRenameTable()also updates FK metadata by exacttable_name, so using the raw SQL spelling can miss those rows
The old implementation used the catalog name, which matches both paths. We still need the remapped source name for chained hops, but this PR currently applies the raw SQL name to every hop.
|
不再向3.0迁移更多的特性 |
What type of PR is this?
Which issue(s) this PR fixes:
issue #24481
What this PR does / why we need it:
[cherry-pick] fix: support LIMIT 0 and improve error messages for NULL/negative LIMIT/OFFSET (#24455)
[cherry-pick] fix(plan): support MySQL-compatible chained RENAME TABLE (#24470)