1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

SQL, IB: option to drop historical rows on ALTER [closes #249]

This commit is contained in:
Eugene Kosov
2017-09-01 12:41:46 +03:00
committed by GitHub
parent a6aaa4fefe
commit c2a70c8050
19 changed files with 151 additions and 69 deletions

View File

@ -300,7 +300,7 @@ do_rename(THD *thd, TABLE_LIST *ren_table, char *new_db, char *new_table_name,
(void) rename_table_in_stat_tables(thd, &db_name, &table_name,
&new_db_name, &new_table);
VTMD_rename vtmd(*ren_table);
if (thd->variables.vers_ddl_survival)
if (thd->variables.vers_alter_history == VERS_ALTER_HISTORY_SURVIVE)
{
rc= vtmd.try_rename(thd, new_db_name, new_table);
if (rc)
@ -313,7 +313,7 @@ do_rename(THD *thd, TABLE_LIST *ren_table, char *new_db, char *new_table_name,
new_alias);
if (rc)
{
if (thd->variables.vers_ddl_survival)
if (thd->variables.vers_alter_history == VERS_ALTER_HISTORY_SURVIVE)
vtmd.revert_rename(thd, new_db_name);
revert_table_name:
/*