1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

adding mandatory aliases for derived tables as per SQL-99

doing it in sql_yacc.yy does not work
this commit contains fixes for other tests
there are fixes in subselect test which will have to be changed
once fix_fields is fixed to work with aliased derived tables
This commit is contained in:
unknown
2002-11-28 19:19:21 +02:00
parent 3284c39a1f
commit 802705f957
34 changed files with 5562 additions and 53 deletions

View File

@@ -3404,8 +3404,15 @@ TABLE_LIST *st_select_lex::add_table_to_list(Table_ident *table,
}
if (!alias) /* Alias is case sensitive */
{
if (table->sel)
{
net_printf(thd,ER_DERIVED_MUST_HAVE_ALIAS);
DBUG_RETURN(0);
}
if (!(alias_str=thd->memdup(alias_str,table->table.length+1)))
DBUG_RETURN(0);
}
if (!(ptr = (TABLE_LIST *) thd->calloc(sizeof(TABLE_LIST))))
DBUG_RETURN(0); /* purecov: inspected */