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

SQL: CREATE VIEW and misc improvements [fixes #183]

This commit is contained in:
Aleksey Midenkov
2017-04-25 15:02:48 +03:00
parent 27a6ef0a9e
commit 1e8a81dea6
11 changed files with 239 additions and 88 deletions

View File

@ -7582,7 +7582,6 @@ insert_fields(THD *thd, Name_resolution_context *context, const char *db_name,
if (!(item= field_iterator.create_item(thd)))
DBUG_RETURN(TRUE);
/* This will be deprecated when HIDDEN feature will come to MariaDB. */
if (item->type() == Item::FIELD_ITEM)
{
Item_field *f= static_cast<Item_field *>(item);
@ -7597,8 +7596,8 @@ insert_fields(THD *thd, Name_resolution_context *context, const char *db_name,
tl->vers_conditions.type == FOR_SYSTEM_TIME_UNSPECIFIED ?
slex->vers_conditions.type : tl->vers_conditions.type;
if ((sys_field && vers_hide == VERS_HIDE_FULL &&
thd->lex->sql_command != SQLCOM_CREATE_TABLE) ||
if ((sys_field && (thd->lex->sql_command == SQLCOM_CREATE_VIEW ||
vers_hide == VERS_HIDE_FULL && thd->lex->sql_command != SQLCOM_CREATE_TABLE)) ||
((fl & HIDDEN_FLAG) && (
!sys_field ||
vers_hide == VERS_HIDE_IMPLICIT ||