1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00
sql/sql_parse.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
mysql-test/r/derived.result:
  SCCS merged
mysql-test/t/derived.test:
  e
  merge
This commit is contained in:
unknown
2004-01-20 19:23:28 +02:00
33 changed files with 135 additions and 19 deletions

View File

@@ -2665,15 +2665,29 @@ mysql_execute_command(THD *thd)
table_count++;
/* All tables in aux_tables must be found in FROM PART */
TABLE_LIST *walk;
for (walk=(TABLE_LIST*) tables ; walk ; walk=walk->next)
for (walk= (TABLE_LIST*) tables; walk; walk= walk->next)
{
if (!strcmp(auxi->real_name,walk->real_name) &&
!strcmp(walk->db,auxi->db))
if (!strcmp(auxi->real_name, walk->alias) &&
!strcmp(walk->db, auxi->db))
break;
}
if (!walk)
{
net_printf(thd,ER_NONUNIQ_TABLE,auxi->real_name);
if (lex->derived_tables)
{
// are we trying to delete derived table?
for (walk= (TABLE_LIST*) tables; walk; walk= walk->next)
{
if (!strcmp(auxi->real_name,walk->alias) &&
walk->derived)
{
net_printf(thd, ER_NON_UPDATABLE_TABLE,
auxi->real_name, "DELETE");
goto error;
}
}
}
net_printf(thd, ER_NONUNIQ_TABLE, auxi->real_name);
goto error;
}
walk->lock_type= auxi->lock_type;