Skip to content

Conversation

jennifersp
Copy link
Contributor

@jennifersp jennifersp commented Apr 14, 2023

  • Added renaming of views with RENAME TABLE ... TO ... statement
  • Added ViewDatabase implementation for PrivilegedDatabase

TODO: ALTER TABLE ... RENAME ... should fail for renaming of views. Currently, vitess parses both the statements into the same node, which makes GMS parser not be able to detect the difference.
Should return error: ERROR 1347 (HY000): 'mydb.myview' is not BASE TABLE

@jennifersp jennifersp marked this pull request as ready for review April 14, 2023 18:30
@jennifersp jennifersp requested a review from fulghum April 14, 2023 18:38
Copy link
Contributor

@fulghum fulghum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks correct, just a few minor comments that I think will make it easier to read and maintain.

@jennifersp jennifersp requested a review from fulghum April 14, 2023 21:05
Copy link
Contributor

@fulghum fulghum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! 🚢

@jennifersp jennifersp merged commit dac7262 into main Apr 14, 2023
@jennifersp jennifersp deleted the jennifer/view-rename branch April 14, 2023 21:22
fulghum added a commit that referenced this pull request Apr 17, 2023
@fulghum
Copy link
Contributor

fulghum commented Apr 17, 2023

The change to PrivilegedDatabase is breaking some behavior in the Dolt cluster DB integration tests (dolthub/dolt#5751), so I'm going to temporarily revert this change so we can get other changes flowing through. Then we can follow up and figure out why the cluster tests are breaking from this. Might be worth separating the ViewDatabase / PrivilegedDatabase change from the bug fix here.

fulghum added a commit that referenced this pull request Apr 17, 2023
…31f9792ac8ce3eb52f6f9ccf

Revert "allow renaming views with `RENAME TABLE` statement (#1712)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants