1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

SQL: invalidate current SP at archive substitution [closes #127]

Related to #125
This commit is contained in:
Aleksey Midenkov
2017-09-29 17:51:10 +03:00
parent 5e42511ce1
commit 9062385c20
7 changed files with 22 additions and 25 deletions

View File

@ -1274,21 +1274,10 @@ mysqld_show_create(THD *thd, TABLE_LIST *table_list)
bool versioned= table_list->vers_conditions;
if (versioned)
{
String archive_name;
DBUG_ASSERT(table_list->vers_conditions == FOR_SYSTEM_TIME_AS_OF);
VTMD_table vtmd(*table_list);
if (vtmd.find_archive_name(thd, archive_name))
if (vtmd.setup_select(thd))
goto exit;
if (archive_name.length() > 0)
{
archive.init_one_table(table_list->db, table_list->db_length, archive_name.ptr(),
archive_name.length(), archive_name.ptr(), TL_READ);
archive.alias= table_list->table_name;
archive.vers_force_alias= true;
table_list= &archive;
}
}
if (mysqld_show_create_get_fields(thd, table_list, &field_list, &buffer))