mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
Bug#56922 SHOW ENGINE INNODB STATUS truncation limit is too strict and not instrumented
rb://459 approved by Jimmuy / Inaam
This commit is contained in:
@@ -674,6 +674,8 @@ static SHOW_VAR innodb_status_variables[]= {
|
|||||||
(char*) &export_vars.innodb_rows_read, SHOW_LONG},
|
(char*) &export_vars.innodb_rows_read, SHOW_LONG},
|
||||||
{"rows_updated",
|
{"rows_updated",
|
||||||
(char*) &export_vars.innodb_rows_updated, SHOW_LONG},
|
(char*) &export_vars.innodb_rows_updated, SHOW_LONG},
|
||||||
|
{"truncated_status_writes",
|
||||||
|
(char*) &export_vars.innodb_truncated_status_writes, SHOW_LONG},
|
||||||
{NullS, NullS, SHOW_LONG}
|
{NullS, NullS, SHOW_LONG}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -8969,7 +8971,7 @@ innodb_show_status(
|
|||||||
{
|
{
|
||||||
trx_t* trx;
|
trx_t* trx;
|
||||||
static const char truncated_msg[] = "... truncated...\n";
|
static const char truncated_msg[] = "... truncated...\n";
|
||||||
const long MAX_STATUS_SIZE = 64000;
|
const long MAX_STATUS_SIZE = 1048576;
|
||||||
ulint trx_list_start = ULINT_UNDEFINED;
|
ulint trx_list_start = ULINT_UNDEFINED;
|
||||||
ulint trx_list_end = ULINT_UNDEFINED;
|
ulint trx_list_end = ULINT_UNDEFINED;
|
||||||
|
|
||||||
@@ -8999,6 +9001,7 @@ innodb_show_status(
|
|||||||
|
|
||||||
if (flen > MAX_STATUS_SIZE) {
|
if (flen > MAX_STATUS_SIZE) {
|
||||||
usable_len = MAX_STATUS_SIZE;
|
usable_len = MAX_STATUS_SIZE;
|
||||||
|
srv_truncated_status_writes++;
|
||||||
} else {
|
} else {
|
||||||
usable_len = flen;
|
usable_len = flen;
|
||||||
}
|
}
|
||||||
|
@@ -225,6 +225,8 @@ extern ulong srv_thread_sleep_delay;
|
|||||||
extern ulong srv_spin_wait_delay;
|
extern ulong srv_spin_wait_delay;
|
||||||
extern ibool srv_priority_boost;
|
extern ibool srv_priority_boost;
|
||||||
|
|
||||||
|
extern ulint srv_truncated_status_writes;
|
||||||
|
|
||||||
extern ulint srv_mem_pool_size;
|
extern ulint srv_mem_pool_size;
|
||||||
extern ulint srv_lock_table_size;
|
extern ulint srv_lock_table_size;
|
||||||
|
|
||||||
@@ -710,6 +712,7 @@ struct export_var_struct{
|
|||||||
ulint innodb_rows_inserted; /*!< srv_n_rows_inserted */
|
ulint innodb_rows_inserted; /*!< srv_n_rows_inserted */
|
||||||
ulint innodb_rows_updated; /*!< srv_n_rows_updated */
|
ulint innodb_rows_updated; /*!< srv_n_rows_updated */
|
||||||
ulint innodb_rows_deleted; /*!< srv_n_rows_deleted */
|
ulint innodb_rows_deleted; /*!< srv_n_rows_deleted */
|
||||||
|
ulint innodb_truncated_status_writes; /*!< srv_truncated_status_writes */
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Thread slot in the thread table */
|
/** Thread slot in the thread table */
|
||||||
|
@@ -424,6 +424,7 @@ UNIV_INTERN ulint srv_n_lock_wait_current_count = 0;
|
|||||||
UNIV_INTERN ib_int64_t srv_n_lock_wait_time = 0;
|
UNIV_INTERN ib_int64_t srv_n_lock_wait_time = 0;
|
||||||
UNIV_INTERN ulint srv_n_lock_max_wait_time = 0;
|
UNIV_INTERN ulint srv_n_lock_max_wait_time = 0;
|
||||||
|
|
||||||
|
UNIV_INTERN ulint srv_truncated_status_writes = 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Set the following to 0 if you want InnoDB to write messages on
|
Set the following to 0 if you want InnoDB to write messages on
|
||||||
@@ -2032,6 +2033,7 @@ srv_export_innodb_status(void)
|
|||||||
export_vars.innodb_rows_inserted = srv_n_rows_inserted;
|
export_vars.innodb_rows_inserted = srv_n_rows_inserted;
|
||||||
export_vars.innodb_rows_updated = srv_n_rows_updated;
|
export_vars.innodb_rows_updated = srv_n_rows_updated;
|
||||||
export_vars.innodb_rows_deleted = srv_n_rows_deleted;
|
export_vars.innodb_rows_deleted = srv_n_rows_deleted;
|
||||||
|
export_vars.innodb_truncated_status_writes = srv_truncated_status_writes;
|
||||||
|
|
||||||
mutex_exit(&srv_innodb_monitor_mutex);
|
mutex_exit(&srv_innodb_monitor_mutex);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user