Skip to content
Snippets Groups Projects
Commit 9faea8e1 authored by Nikita Pettik's avatar Nikita Pettik Committed by Kirill Yukhin
Browse files

sql: enable alter rename table

Added new opcode OP_RenameTable, which implements
SQL statment: ALTER TABLE old_name RENAME TO new_name;
The main idea is to replace corresponding tuple in _space.
New tuple will contain new name and new SQL statement, which
creates this table. If it is parent table for foreign key,
update SQL statement of child table. Then, remove old name
from hash table and by calling callback function from VDBE,
update database schema with new table name. After all,
in the same way update triggers' statements in _trigger table,
if any exist.

Closes #2204
parent 51893d22
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment