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

After merge fixes

Some bigger code changes was necessary becasue of the multi-table-update and the new HANDLER code


include/hash.h:
  Added back function that's was used in 4.0
mysql-test/r/delete.result:
  Update results after merge
mysql-test/r/flush_table.result:
  Update results after merge
mysql-test/r/func_str.result:
  Update results after merge
mysql-test/r/handler.result:
  Update results after merge
  Change is big becasue in MySQL 4.1 you are not allowed to qualify the handler alias with a databasename
mysql-test/r/multi_update.result:
  More startup cleanups
mysql-test/r/rename.result:
  More startup-cleanups
mysql-test/r/select.result:
  More startup cleanups
mysql-test/r/show_check.result:
  More startup-cleanups
mysql-test/t/ctype_latin1_de.test:
  Cleanup
mysql-test/t/derived.test:
  Portability fix
mysql-test/t/handler.test:
  Update results after merge
  Change is big becasue in MySQL 4.1 you are not allowed to qualify the handler alias with a databasename
mysql-test/t/multi_update.test:
  More startup cleanups
mysql-test/t/range.test:
  More comments
mysql-test/t/rename.test:
  More startup cleanups
mysql-test/t/select.test:
  More startup cleanups
mysql-test/t/show_check.test:
  More startup cleanups
mysql-test/t/type_timestamp.test:
  Add back test deleted during merge
sql/item_cmpfunc.cc:
  After merge fixes
sql/item_func.cc:
  Remove compiler warning
sql/mysql_priv.h:
  After merge fixes
sql/mysqld.cc:
  After merge fixes
sql/sql_acl.cc:
  More debugging
sql/sql_base.cc:
  After merge fixes
  (This fix was needed bacause of multi-table-update reopens tables)
sql/sql_handler.cc:
  After merge fixes
sql/sql_lex.h:
  After merge fixes
sql/sql_select.cc:
  After merge fixes
sql/sql_show.cc:
  After merge fixes
sql/sql_table.cc:
  After merge fixes
  Simple cleanup of mysql_discard_or_import_tablespace
sql/sql_update.cc:
  After merge fixes
  Rework mysql_multi_update to take into account derived tables.
sql/sql_yacc.yy:
  After merge fixes
This commit is contained in:
unknown
2004-10-07 10:50:13 +03:00
parent bbab9ec678
commit 96e7be58c8
31 changed files with 193 additions and 124 deletions

View File

@@ -1695,10 +1695,18 @@ int open_and_lock_tables(THD *thd, TABLE_LIST *tables)
uint counter;
if (open_tables(thd, tables, &counter) || lock_tables(thd, tables, counter))
DBUG_RETURN(-1); /* purecov: inspected */
/*
Let us propagate pointers to open tables from global table list
to table lists in particular selects if needed.
*/
relink_tables_for_derived(thd);
DBUG_RETURN(mysql_handle_derived(thd->lex));
}
/*
Let us propagate pointers to open tables from global table list
to table lists in particular selects if needed.
*/
void relink_tables_for_derived(THD *thd)
{
if (thd->lex->all_selects_list->next_select_in_list() ||
thd->lex->time_zone_tables_used)
{
@@ -1711,7 +1719,6 @@ int open_and_lock_tables(THD *thd, TABLE_LIST *tables)
if (cursor->table_list)
cursor->table= cursor->table_list->table;
}
DBUG_RETURN(mysql_handle_derived(thd->lex));
}
@@ -1751,7 +1758,7 @@ int lock_tables(THD *thd, TABLE_LIST *tables, uint count)
if (!table->derived)
*(ptr++)= table->table;
}
if (!(thd->lock=mysql_lock_tables(thd,start,count)))
if (!(thd->lock=mysql_lock_tables(thd,start, (uint) (ptr - start))))
return -1; /* purecov: inspected */
}
else