Skip to content

Commit 12535fd

Browse files
author
tsmith@quadxeon.mysql.com
committed
Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/50
2 parents 73f0c5d + 83694ca commit 12535fd

File tree

3 files changed

+22
-21
lines changed

3 files changed

+22
-21
lines changed

innobase/dict/dict0dict.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,8 @@ dict_table_get_on_id(
628628
CREATE, for example, we already have the mutex! */
629629

630630
#ifdef UNIV_SYNC_DEBUG
631-
ut_ad(mutex_own(&(dict_sys->mutex)));
631+
ut_ad(mutex_own(&(dict_sys->mutex))
632+
|| trx->dict_operation_lock_mode == RW_X_LATCH);
632633
#endif /* UNIV_SYNC_DEBUG */
633634

634635
return(dict_table_get_on_id_low(table_id, trx));

innobase/os/os0file.c

+10-10
Original file line numberDiff line numberDiff line change
@@ -920,14 +920,14 @@ os_file_create_simple(
920920
}
921921

922922
file = CreateFile((LPCTSTR) name,
923-
access,
924-
FILE_SHARE_READ | FILE_SHARE_WRITE,
925-
/* file can be read ansd written also
926-
by other processes */
927-
NULL, /* default security attributes */
928-
create_flag,
929-
attributes,
930-
NULL); /* no template file */
923+
access,
924+
FILE_SHARE_READ | FILE_SHARE_WRITE,
925+
/* file can be read and written also
926+
by other processes */
927+
NULL, /* default security attributes */
928+
create_flag,
929+
attributes,
930+
NULL); /* no template file */
931931

932932
if (file == INVALID_HANDLE_VALUE) {
933933
*success = FALSE;
@@ -1494,7 +1494,7 @@ os_file_rename(
14941494
return(TRUE);
14951495
}
14961496

1497-
os_file_handle_error(oldpath, "rename");
1497+
os_file_handle_error_no_exit(oldpath, "rename");
14981498

14991499
return(FALSE);
15001500
#else
@@ -1503,7 +1503,7 @@ os_file_rename(
15031503
ret = rename((const char*)oldpath, (const char*)newpath);
15041504

15051505
if (ret != 0) {
1506-
os_file_handle_error(oldpath, "rename");
1506+
os_file_handle_error_no_exit(oldpath, "rename");
15071507

15081508
return(FALSE);
15091509
}

innobase/row/row0undo.c

+10-10
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ row_undo(
212212
ulint err;
213213
trx_t* trx;
214214
dulint roll_ptr;
215-
ibool froze_data_dict = FALSE;
215+
ibool locked_data_dict;
216216

217217
ut_ad(node && thr);
218218

@@ -263,15 +263,15 @@ row_undo(
263263
}
264264

265265
/* Prevent DROP TABLE etc. while we are rolling back this row.
266-
If we are doing a TABLE CREATE or some other dictionary operation,
267-
then we already have dict_operation_lock locked in x-mode. Do not
268-
try to lock again in s-mode, because that would cause a hang. */
266+
If we are doing a TABLE CREATE or some other dictionary operation,
267+
then we already have dict_operation_lock locked in x-mode. Do not
268+
try to lock again, because that would cause a hang. */
269269

270-
if (trx->dict_operation_lock_mode == 0) {
271-
272-
row_mysql_freeze_data_dictionary(trx);
270+
locked_data_dict = (trx->dict_operation_lock_mode == 0);
273271

274-
froze_data_dict = TRUE;
272+
if (locked_data_dict) {
273+
274+
row_mysql_lock_data_dictionary(trx);
275275
}
276276

277277
if (node->state == UNDO_NODE_INSERT) {
@@ -284,9 +284,9 @@ row_undo(
284284
err = row_undo_mod(node, thr);
285285
}
286286

287-
if (froze_data_dict) {
287+
if (locked_data_dict) {
288288

289-
row_mysql_unfreeze_data_dictionary(trx);
289+
row_mysql_unlock_data_dictionary(trx);
290290
}
291291

292292
/* Do some cleanup */

0 commit comments

Comments
 (0)