1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Many files:

Merge 3.23.52


innobase/btr/btr0btr.c:
  Merge 3.23.52
innobase/btr/btr0cur.c:
  Merge 3.23.52
innobase/btr/btr0sea.c:
  Merge 3.23.52
innobase/include/btr0btr.h:
  Merge 3.23.52
innobase/include/btr0cur.h:
  Merge 3.23.52
innobase/include/btr0sea.h:
  Merge 3.23.52
innobase/include/buf0buf.h:
  Merge 3.23.52
innobase/include/buf0rea.h:
  Merge 3.23.52
innobase/include/data0data.h:
  Merge 3.23.52
innobase/include/data0data.ic:
  Merge 3.23.52
innobase/include/log0log.h:
  Merge 3.23.52
innobase/include/log0log.ic:
  Merge 3.23.52
innobase/include/os0file.h:
  Merge 3.23.52
innobase/include/page0page.h:
  Merge 3.23.52
innobase/include/page0page.ic:
  Merge 3.23.52
innobase/include/row0mysql.h:
  Merge 3.23.52
innobase/include/trx0roll.h:
  Merge 3.23.52
innobase/include/trx0sys.h:
  Merge 3.23.52
innobase/include/trx0trx.h:
  Merge 3.23.52
innobase/include/ut0ut.h:
  Merge 3.23.52
innobase/include/univ.i:
  Merge 3.23.52
innobase/include/ut0ut.ic:
  Merge 3.23.52
innobase/buf/buf0buf.c:
  Merge 3.23.52
innobase/buf/buf0rea.c:
  Merge 3.23.52
innobase/data/data0data.c:
  Merge 3.23.52
innobase/dict/dict0crea.c:
  Merge 3.23.52
innobase/dict/dict0dict.c:
  Merge 3.23.52
innobase/dict/dict0load.c:
  Merge 3.23.52
innobase/dict/dict0mem.c:
  Merge 3.23.52
innobase/fsp/fsp0fsp.c:
  Merge 3.23.52
innobase/ibuf/ibuf0ibuf.c:
  Merge 3.23.52
innobase/lock/lock0lock.c:
  Merge 3.23.52
innobase/log/log0log.c:
  Merge 3.23.52
innobase/log/log0recv.c:
  Merge 3.23.52
innobase/mtr/mtr0log.c:
  Merge 3.23.52
innobase/mtr/mtr0mtr.c:
  Merge 3.23.52
innobase/os/os0file.c:
  Merge 3.23.52
innobase/page/page0cur.c:
  Merge 3.23.52
innobase/page/page0page.c:
  Merge 3.23.52
innobase/rem/rem0cmp.c:
  Merge 3.23.52
innobase/row/row0ins.c:
  Merge 3.23.52
innobase/row/row0mysql.c:
  Merge 3.23.52
innobase/row/row0purge.c:
  Merge 3.23.52
innobase/row/row0upd.c:
  Merge 3.23.52
innobase/srv/srv0srv.c:
  Merge 3.23.52
innobase/srv/srv0start.c:
  Merge 3.23.52
innobase/trx/trx0roll.c:
  Merge 3.23.52
innobase/trx/trx0sys.c:
  Merge 3.23.52
innobase/trx/trx0trx.c:
  Merge 3.23.52
innobase/trx/trx0undo.c:
  Merge 3.23.52
innobase/ut/ut0mem.c:
  Merge 3.23.52
innobase/ut/ut0ut.c:
  Merge 3.23.52
This commit is contained in:
unknown
2002-06-22 20:41:14 +03:00
parent b7b988b3c3
commit 1081513a12
52 changed files with 1884 additions and 766 deletions

View File

@ -934,6 +934,7 @@ row_update_for_mysql(
ut_ad(!prebuilt->sql_stat_start);
que_thr_move_to_run_state_for_mysql(thr, trx);
run_again:
thr->run_node = node;
thr->prev_node = node;
@ -998,7 +999,6 @@ row_update_cascade_for_mysql(
trx_t* trx;
trx = thr_get_trx(thr);
run_again:
thr->run_node = node;
thr->prev_node = node;
@ -1130,6 +1130,35 @@ row_mysql_recover_tmp_table(
return(row_rename_table_for_mysql(old_name, table->name, trx));
}
/*************************************************************************
Locks the data dictionary exclusively for performing a table create
operation. */
void
row_mysql_lock_data_dictionary(void)
/*================================*/
{
/* Serialize data dictionary operations with dictionary mutex:
no deadlocks or lock waits can occur then in these operations */
rw_lock_x_lock(&(dict_foreign_key_check_lock));
mutex_enter(&(dict_sys->mutex));
}
/*************************************************************************
Unlocks the data dictionary exclusively lock. */
void
row_mysql_unlock_data_dictionary(void)
/*==================================*/
{
/* Serialize data dictionary operations with dictionary mutex:
no deadlocks can occur then in these operations */
mutex_exit(&(dict_sys->mutex));
rw_lock_x_unlock(&(dict_foreign_key_check_lock));
}
/*************************************************************************
Does a table creation operation for MySQL. If the name of the created
table ends to characters INNODB_MONITOR, then this also starts
@ -1150,6 +1179,7 @@ row_create_table_for_mysql(
ulint err;
ut_ad(trx->mysql_thread_id == os_thread_get_curr_id());
ut_ad(mutex_own(&(dict_sys->mutex)));
if (srv_created_new_raw || srv_force_recovery) {
fprintf(stderr,
@ -1263,19 +1293,13 @@ row_create_table_for_mysql(
"to use this feature you must compile InnoDB with\n"
"UNIV_MEM_DEBUG defined in univ.i and the server must be\n"
"quiet because allocation from a mem heap is not protected\n"
"by any semaphore.\n");
"by any semaphore.\n");
ut_a(mem_validate());
printf("Memory validated\n");
}
/* Serialize data dictionary operations with dictionary mutex:
no deadlocks can occur then in these operations */
rw_lock_x_lock(&(dict_foreign_key_check_lock));
mutex_enter(&(dict_sys->mutex));
heap = mem_heap_create(512);
trx->dict_operation = TRUE;
@ -1325,9 +1349,6 @@ row_create_table_for_mysql(
trx->error_state = DB_SUCCESS;
}
mutex_exit(&(dict_sys->mutex));
rw_lock_x_unlock(&(dict_foreign_key_check_lock));
que_graph_free((que_t*) que_node_get_parent(thr));
trx->op_info = "";
@ -1354,6 +1375,7 @@ row_create_index_for_mysql(
ulint keywordlen;
ulint err;
ut_ad(mutex_own(&(dict_sys->mutex)));
ut_ad(trx->mysql_thread_id == os_thread_get_curr_id());
trx->op_info = "creating index";
@ -1372,12 +1394,6 @@ row_create_index_for_mysql(
return(DB_SUCCESS);
}
/* Serialize data dictionary operations with dictionary mutex:
no deadlocks can occur then in these operations */
rw_lock_x_lock(&(dict_foreign_key_check_lock));
mutex_enter(&(dict_sys->mutex));
heap = mem_heap_create(512);
trx->dict_operation = TRUE;
@ -1405,9 +1421,6 @@ row_create_index_for_mysql(
trx->error_state = DB_SUCCESS;
}
mutex_exit(&(dict_sys->mutex));
rw_lock_x_unlock(&(dict_foreign_key_check_lock));
que_graph_free((que_t*) que_node_get_parent(thr));
trx->op_info = "";
@ -1441,6 +1454,7 @@ row_table_add_foreign_constraints(
ulint keywordlen;
ulint err;
ut_ad(mutex_own(&(dict_sys->mutex)));
ut_a(sql_string);
trx->op_info = "adding foreign keys";
@ -1459,12 +1473,6 @@ row_table_add_foreign_constraints(
return(DB_SUCCESS);
}
/* Serialize data dictionary operations with dictionary mutex:
no deadlocks can occur then in these operations */
rw_lock_x_lock(&(dict_foreign_key_check_lock));
mutex_enter(&(dict_sys->mutex));
trx->dict_operation = TRUE;
err = dict_create_foreign_constraints(trx, sql_string, name);
@ -1486,9 +1494,6 @@ row_table_add_foreign_constraints(
trx->error_state = DB_SUCCESS;
}
mutex_exit(&(dict_sys->mutex));
rw_lock_x_unlock(&(dict_foreign_key_check_lock));
return((int) err);
}
@ -1917,6 +1922,13 @@ row_drop_table_for_mysql(
ut_a(0);
} else {
dict_table_remove_from_cache(table);
if (dict_load_table(name) != NULL) {
ut_print_timestamp(stderr);
fprintf(stderr,
" InnoDB: Error: dropping of table %s failed!\n", name);
}
}
funct_exit:
rw_lock_s_unlock(&(purge_sys->purge_is_running));