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

Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0

into  sanja.is.com.ua:/home/bell/mysql/bk/work-bug3-5.0


BitKeeper/etc/config:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/table.cc:
  Auto merged
mysql-test/r/view.result:
  merge
mysql-test/t/view.test:
  merge
sql/share/errmsg.txt:
  merge
sql/sql_insert.cc:
  merge
sql/table.h:
  merge
This commit is contained in:
unknown
2005-08-23 23:17:36 +03:00
14 changed files with 287 additions and 188 deletions

View File

@ -2854,12 +2854,15 @@ mysql_execute_command(THD *thd)
Is table which we are changing used somewhere in other parts
of query
*/
if (!(lex->create_info.options & HA_LEX_CREATE_TMP_TABLE) &&
unique_table(create_table, select_tables))
if (!(lex->create_info.options & HA_LEX_CREATE_TMP_TABLE))
{
my_error(ER_UPDATE_TABLE_USED, MYF(0), create_table->table_name);
res= 1;
goto end_with_restart_wait;
TABLE_LIST *duplicate;
if ((duplicate= unique_table(create_table, select_tables)))
{
update_non_unique_table_error(create_table, "CREATE", duplicate);
res= 1;
goto end_with_restart_wait;
}
}
/* If we create merge table, we have to test tables in merge, too */
if (lex->create_info.used_fields & HA_CREATE_USED_UNION)
@ -2869,9 +2872,10 @@ mysql_execute_command(THD *thd)
tab;
tab= tab->next_local)
{
if (unique_table(tab, select_tables))
TABLE_LIST *duplicate;
if ((duplicate= unique_table(tab, select_tables)))
{
my_error(ER_UPDATE_TABLE_USED, MYF(0), tab->table_name);
update_non_unique_table_error(tab, "CREATE", duplicate);
res= 1;
goto end_with_restart_wait;
}