1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +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

@@ -2265,31 +2265,32 @@ int mysql_check_table(THD* thd, TABLE_LIST* tables,HA_CHECK_OPT* check_opt)
&handler::check));
}
/* table_list should contain just one table */
int mysql_discard_or_import_tablespace(THD *thd,
TABLE_LIST *table_list,
enum tablespace_op_type tablespace_op)
static int
mysql_discard_or_import_tablespace(THD *thd,
TABLE_LIST *table_list,
enum tablespace_op_type tablespace_op)
{
TABLE *table;
my_bool discard;
int error;
DBUG_ENTER("mysql_discard_or_import_tablespace");
/* Note that DISCARD/IMPORT TABLESPACE always is the only operation in an
ALTER TABLE */
/*
Note that DISCARD/IMPORT TABLESPACE always is the only operation in an
ALTER TABLE
*/
thd->proc_info="discard_or_import_tablespace";
if (tablespace_op == DISCARD_TABLESPACE)
discard = TRUE;
else
discard = FALSE;
thd->tablespace_op=TRUE; /* we set this flag so that ha_innobase::open
and ::external_lock() do not complain when we
lock the table */
mysql_ha_close(thd, table_list, /*dont_send_ok*/ 1, /*dont_lock*/ 1);
discard= test(tablespace_op == DISCARD_TABLESPACE);
/*
We set this flag so that ha_innobase::open and ::external_lock() do
not complain when we lock the table
*/
thd->tablespace_op= TRUE;
if (!(table=open_ltable(thd,table_list,TL_WRITE)))
{
thd->tablespace_op=FALSE;
@@ -2303,8 +2304,10 @@ int mysql_discard_or_import_tablespace(THD *thd,
if (error)
goto err;
/* The 0 in the call below means 'not in a transaction', which means
immediate invalidation; that is probably what we wish here */
/*
The 0 in the call below means 'not in a transaction', which means
immediate invalidation; that is probably what we wish here
*/
query_cache_invalidate3(thd, table_list, 0);
/* The ALTER TABLE is always in its own transaction */