Commit 48b0cdc4 authored by heikki@hundin.mysql.fi's avatar heikki@hundin.mysql.fi
Browse files

row0undo.c:

  Partial fix to a hang introduced in CREATE TABLE in the push last night
parent 93b301ba
Loading
Loading
Loading
Loading
+14 −3
Original line number Diff line number Diff line
@@ -253,9 +253,17 @@ row_undo(
		}
	}

	/* Prevent DROP TABLE etc. while we are rolling back this row */
	/* Prevent DROP TABLE etc. while we are rolling back this row.
        If we are doing a TABLE CREATE or some other dictionary operation,
        then we already have dict_operation_lock locked in x-mode. Do not
        try to lock again in s-mode, because that would cause a hang.
	   
	TODO: keep track when trx exactly has the latch locked!!!
	TODO: trx->dict_operation tells it only in some cases!!! */
	
	if (!trx->dict_operation) {
	        rw_lock_s_lock(&dict_operation_lock);		
	}

	if (node->state == UNDO_NODE_INSERT) {

@@ -267,7 +275,10 @@ row_undo(
		err = row_undo_mod(node, thr);
	}

	if (!trx->dict_operation) {

	        rw_lock_s_unlock(&dict_operation_lock);
	}

	/* Do some cleanup */
	btr_pcur_close(&(node->pcur));