Commit 9f9dc3ad authored by heikki@hundin.mysql.fi's avatar heikki@hundin.mysql.fi
Browse files

lock0lock.c:

  Fix bug: if SHOW INNODB STATUS or innodb_monitor printed several hundred transactions, the output was truncated and we forgot to release the kernel mutex
parent cbd9978b
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
@@ -3599,6 +3599,8 @@ lock_print_info(
	mtr_t	mtr;

	if (buf_end - buf < 600) {
		sprintf(buf, "... output truncated!\n");
	
		return;
	}

@@ -3623,6 +3625,9 @@ lock_print_info(
		if ((ulint)(buf_end - buf)
			< 100 + strlen(lock_latest_err_buf)) {

			lock_mutex_exit_kernel();
			sprintf(buf, "... output truncated!\n");

			return;
		}

@@ -3630,6 +3635,9 @@ lock_print_info(
	}

	if (buf_end - buf < 600) {
		lock_mutex_exit_kernel();
		sprintf(buf, "... output truncated!\n");

		return;
	}

@@ -3641,6 +3649,9 @@ lock_print_info(

	while (trx) {
		if (buf_end - buf < 900) {
			lock_mutex_exit_kernel();
			sprintf(buf, "... output truncated!\n");

			return;
		}

@@ -3678,6 +3689,9 @@ lock_print_info(
	}

	if (buf_end - buf < 900) {
		lock_mutex_exit_kernel();
		sprintf(buf, "... output truncated!\n");

		return;
	}

@@ -3688,6 +3702,9 @@ lock_print_info(
		buf += strlen(buf);
		
		if (buf_end - buf < 500) {
			lock_mutex_exit_kernel();
			sprintf(buf, "... output truncated!\n");

			return;
		}
		
@@ -3742,6 +3759,9 @@ lock_print_info(
	}

	if (buf_end - buf < 500) {
		lock_mutex_exit_kernel();
		sprintf(buf, "... output truncated!\n");

		return;
	}