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

post merge fixes

mysql-test/t/merge.test:
  additional test
sql/item.h:
  parameter to detect need of saving view field names
sql/item_subselect.cc:
  arena fix
  used nearest thd pointer
sql/item_sum.cc:
  after merge fix
sql/mysql_priv.h:
  after merge fix
sql/sql_base.cc:
  fixed unique test
  fixed postmerge arena mamgement
sql/sql_class.h:
  mey method to detect conventional execution
sql/sql_handler.cc:
  new parameter
sql/sql_lex.cc:
  fixed postmerge arena mamgement
sql/sql_parse.cc:
  fixed unique test
sql/sql_select.cc:
  fixed postmerge arena mamgement
sql/sql_union.cc:
  fixed postmerge arena mamgement
sql/sql_view.cc:
  fixed postmerge arena mamgement
sql/table.cc:
  fixed postmerge arena mamgement
This commit is contained in:
unknown
2004-09-10 02:22:44 +03:00
parent ed2c4854dd
commit b386f888da
14 changed files with 81 additions and 62 deletions

View File

@@ -2404,20 +2404,6 @@ mysql_execute_command(THD *thd)
if (select_lex->item_list.elements) // With select
{
select_result *result;
if (lex->create_info.used_fields & HA_CREATE_USED_UNION)
{
TABLE_LIST *tab;
for (tab= select_tables; tab; tab= tab->next_local)
{
if (find_table_in_local_list((TABLE_LIST*) lex->create_info.
merge_list.first,
select_tables->db, tab->real_name))
{
net_printf(thd, ER_UPDATE_TABLE_USED, tab->real_name);
goto create_error;
}
}
}
if (select_tables &&
check_table_access(thd, SELECT_ACL, select_tables, 0))
@@ -2437,6 +2423,21 @@ mysql_execute_command(THD *thd)
net_printf(thd, ER_UPDATE_TABLE_USED, create_table->real_name);
goto create_error;
}
/* If we create merge table, we have to test tables in merge, too */
if (lex->create_info.used_fields & HA_CREATE_USED_UNION)
{
TABLE_LIST *tab;
for (tab= (TABLE_LIST*) lex->create_info.merge_list.first;
tab;
tab= tab->next_local)
{
if (unique_table(tab, select_tables))
{
net_printf(thd, ER_UPDATE_TABLE_USED, tab->real_name);
goto create_error;
}
}
}
if ((result= new select_create(create_table,
&lex->create_info,