summaryrefslogtreecommitdiff
path: root/handler/ha_innodb.cc
diff options
context:
space:
mode:
authorunknown <knielsen@knielsen-hq.org>2010-09-03 17:41:57 +0200
committerunknown <knielsen@knielsen-hq.org>2010-09-03 17:41:57 +0200
commit9ec2d5b6e510b9a3ad2fd54c37eb302c0121f9e3 (patch)
treee034babf0c6b770d462c7492964ca3291854d448 /handler/ha_innodb.cc
parent0c6afe17dceb926b5c757157308188e540caec1e (diff)
downloadmariadb-git-9ec2d5b6e510b9a3ad2fd54c37eb302c0121f9e3.tar.gz
Updated with changes from lp:percona-server/release-5.1.49-12 as of September 3, 2010
Diffstat (limited to 'handler/ha_innodb.cc')
-rw-r--r--handler/ha_innodb.cc458
1 files changed, 343 insertions, 115 deletions
diff --git a/handler/ha_innodb.cc b/handler/ha_innodb.cc
index 5c01abd2e0c..80d1e0b0435 100644
--- a/handler/ha_innodb.cc
+++ b/handler/ha_innodb.cc
@@ -196,6 +196,7 @@ static my_bool innobase_overwrite_relay_log_info = FALSE;
static my_bool innobase_rollback_on_timeout = FALSE;
static my_bool innobase_create_status_file = FALSE;
static my_bool innobase_stats_on_metadata = TRUE;
+static my_bool innobase_use_sys_stats_table = FALSE;
static char* internal_innobase_data_file_path = NULL;
@@ -340,6 +341,12 @@ static MYSQL_THDVAR_ULONG(lock_wait_timeout, PLUGIN_VAR_RQCMDARG,
"Timeout in seconds an InnoDB transaction may wait for a lock before being rolled back. Values above 100000000 disable the timeout.",
NULL, NULL, 50, 1, 1024 * 1024 * 1024, 0);
+static MYSQL_THDVAR_ULONG(flush_log_at_trx_commit_session, PLUGIN_VAR_RQCMDARG,
+ "Control innodb_flush_log_at_trx_commit for each sessions. "
+ "The value 0~2 are same meanings to innodb_flush_log_at_trx_commit. "
+ "The value 3 regards innodb_flush_log_at_trx_commit (default).",
+ NULL, NULL, 3, 0, 3, 0);
+
static handler *innobase_create_handler(handlerton *hton,
TABLE_SHARE *table,
@@ -720,6 +727,17 @@ thd_lock_wait_timeout(
return(THDVAR((THD*) thd, lock_wait_timeout));
}
+/******************************************************************//**
+*/
+extern "C" UNIV_INTERN
+ulong
+thd_flush_log_at_trx_commit_session(
+/*================================*/
+ void* thd)
+{
+ return(THDVAR((THD*) thd, flush_log_at_trx_commit_session));
+}
+
/********************************************************************//**
Obtain the InnoDB transaction of a MySQL thread.
@return reference to transaction pointer */
@@ -1035,6 +1053,29 @@ innobase_get_charset(
return(thd_charset((THD*) mysql_thd));
}
+/**********************************************************************//**
+Determines the current SQL statement.
+@return SQL statement string */
+extern "C" UNIV_INTERN
+const char*
+innobase_get_stmt(
+/*==============*/
+ void* mysql_thd, /*!< in: MySQL thread handle */
+ size_t* length) /*!< out: length of the SQL statement */
+{
+#if MYSQL_VERSION_ID >= 50142
+ LEX_STRING* stmt;
+
+ stmt = thd_query_string((THD*) mysql_thd);
+ *length = stmt->length;
+ return(stmt->str);
+#else
+ const char* stmt_str = thd_query((THD*) mysql_thd);
+ *length = strlen(stmt_str);
+ return(stmt_str);
+#endif
+}
+
#if defined (__WIN__) && defined (MYSQL_DYNAMIC_PLUGIN)
extern MYSQL_PLUGIN_IMPORT MY_TMPDIR mysql_tmpdir_list;
/*******************************************************************//**
@@ -1355,7 +1396,6 @@ innobase_trx_allocate(
trx = trx_allocate_for_mysql();
trx->mysql_thd = thd;
- trx->mysql_query_str = thd_query(thd);
innobase_trx_init(thd, trx);
@@ -2039,12 +2079,12 @@ innobase_init(
srv_page_size_shift = 0;
if (innobase_page_size != (1 << 14)) {
- int n_shift;
+ uint n_shift;
fprintf(stderr,
"InnoDB: Warning: innodb_page_size has been changed from default value 16384. (###EXPERIMENTAL### operation)\n");
for (n_shift = 12; n_shift <= UNIV_PAGE_SIZE_SHIFT_MAX; n_shift++) {
- if (innobase_page_size == (1 << n_shift)) {
+ if (innobase_page_size == ((ulong)1 << n_shift)) {
srv_page_size_shift = n_shift;
srv_page_size = (1 << srv_page_size_shift);
fprintf(stderr,
@@ -2235,6 +2275,8 @@ mem_free_and_error:
srv_extra_undoslots = (ibool) innobase_extra_undoslots;
+ srv_use_sys_stats_table = (ibool) innobase_use_sys_stats_table;
+
/* -------------- Log files ---------------------------*/
/* The default dir for log files is the datadir of MySQL */
@@ -4230,6 +4272,11 @@ get_innobase_type_from_mysql_type(
case MYSQL_TYPE_BLOB:
case MYSQL_TYPE_LONG_BLOB:
return(DATA_BLOB);
+ case MYSQL_TYPE_NULL:
+ /* MySQL currently accepts "NULL" datatype, but will
+ reject such datatype in the next release. We will cope
+ with it and not trigger assertion failure in 5.1 */
+ break;
default:
ut_error;
}
@@ -5699,6 +5746,9 @@ ha_innobase::index_read(
prebuilt->index_usable = FALSE;
DBUG_RETURN(HA_ERR_CRASHED);
}
+ if (UNIV_UNLIKELY(!prebuilt->index_usable)) {
+ DBUG_RETURN(HA_ERR_TABLE_DEF_CHANGED);
+ }
/* Note that if the index for which the search template is built is not
necessarily prebuilt->index, but can also be the clustered index */
@@ -6338,7 +6388,22 @@ create_table_def(
field = form->field[i];
col_type = get_innobase_type_from_mysql_type(&unsigned_type,
- field);
+ field);
+
+ if (!col_type) {
+ push_warning_printf(
+ (THD*) trx->mysql_thd,
+ MYSQL_ERROR::WARN_LEVEL_WARN,
+ ER_CANT_CREATE_TABLE,
+ "Error creating table '%s' with "
+ "column '%s'. Please check its "
+ "column type and try to re-create "
+ "the table with an appropriate "
+ "column type.",
+ table->name, (char*) field->field_name);
+ goto err_col;
+ }
+
if (field->null_ptr) {
nulls_allowed = 0;
} else {
@@ -6396,7 +6461,7 @@ create_table_def(
if (dict_col_name_is_reserved(field->field_name)){
my_error(ER_WRONG_COLUMN_NAME, MYF(0),
field->field_name);
-
+err_col:
dict_mem_table_free(table);
trx_commit_for_mysql(trx);
@@ -6796,6 +6861,9 @@ ha_innobase::create(
/* Cache the value of innodb_file_format, in case it is
modified by another thread while the table is being created. */
const ulint file_format = srv_file_format;
+ const char* stmt;
+ size_t stmt_len;
+ enum row_type row_type;
DBUG_ENTER("ha_innobase::create");
@@ -6916,94 +6984,94 @@ ha_innobase::create(
}
}
- if (create_info->used_fields & HA_CREATE_USED_ROW_FORMAT) {
- if (flags) {
- /* KEY_BLOCK_SIZE was specified. */
- if (form->s->row_type != ROW_TYPE_COMPRESSED) {
- /* ROW_FORMAT other than COMPRESSED
- ignores KEY_BLOCK_SIZE. It does not
- make sense to reject conflicting
- KEY_BLOCK_SIZE and ROW_FORMAT, because
- such combinations can be obtained
- with ALTER TABLE anyway. */
- push_warning_printf(
- thd,
- MYSQL_ERROR::WARN_LEVEL_WARN,
- ER_ILLEGAL_HA_CREATE_OPTION,
- "InnoDB: ignoring KEY_BLOCK_SIZE=%lu"
- " unless ROW_FORMAT=COMPRESSED.",
- create_info->key_block_size);
- flags = 0;
- }
- } else {
- /* No KEY_BLOCK_SIZE */
- if (form->s->row_type == ROW_TYPE_COMPRESSED) {
- /* ROW_FORMAT=COMPRESSED without
- KEY_BLOCK_SIZE implies half the
- maximum KEY_BLOCK_SIZE. */
- flags = (DICT_TF_ZSSIZE_MAX - 1)
- << DICT_TF_ZSSIZE_SHIFT
- | DICT_TF_COMPACT
- | DICT_TF_FORMAT_ZIP
- << DICT_TF_FORMAT_SHIFT;
+ row_type = form->s->row_type;
+
+ if (flags) {
+ /* KEY_BLOCK_SIZE was specified. */
+ if (!(create_info->used_fields & HA_CREATE_USED_ROW_FORMAT)) {
+ /* ROW_FORMAT was not specified;
+ default to ROW_FORMAT=COMPRESSED */
+ row_type = ROW_TYPE_COMPRESSED;
+ } else if (row_type != ROW_TYPE_COMPRESSED) {
+ /* ROW_FORMAT other than COMPRESSED
+ ignores KEY_BLOCK_SIZE. It does not
+ make sense to reject conflicting
+ KEY_BLOCK_SIZE and ROW_FORMAT, because
+ such combinations can be obtained
+ with ALTER TABLE anyway. */
+ push_warning_printf(
+ thd,
+ MYSQL_ERROR::WARN_LEVEL_WARN,
+ ER_ILLEGAL_HA_CREATE_OPTION,
+ "InnoDB: ignoring KEY_BLOCK_SIZE=%lu"
+ " unless ROW_FORMAT=COMPRESSED.",
+ create_info->key_block_size);
+ flags = 0;
+ }
+ } else {
+ /* No KEY_BLOCK_SIZE */
+ if (row_type == ROW_TYPE_COMPRESSED) {
+ /* ROW_FORMAT=COMPRESSED without
+ KEY_BLOCK_SIZE implies half the
+ maximum KEY_BLOCK_SIZE. */
+ flags = (DICT_TF_ZSSIZE_MAX - 1)
+ << DICT_TF_ZSSIZE_SHIFT
+ | DICT_TF_COMPACT
+ | DICT_TF_FORMAT_ZIP
+ << DICT_TF_FORMAT_SHIFT;
//#if DICT_TF_ZSSIZE_MAX < 1
//# error "DICT_TF_ZSSIZE_MAX < 1"
//#endif
- }
}
+ }
- switch (form->s->row_type) {
- const char* row_format_name;
- case ROW_TYPE_REDUNDANT:
- break;
- case ROW_TYPE_COMPRESSED:
- case ROW_TYPE_DYNAMIC:
- row_format_name
- = form->s->row_type == ROW_TYPE_COMPRESSED
- ? "COMPRESSED"
- : "DYNAMIC";
-
- if (!srv_file_per_table) {
- push_warning_printf(
- thd,
- MYSQL_ERROR::WARN_LEVEL_WARN,
- ER_ILLEGAL_HA_CREATE_OPTION,
- "InnoDB: ROW_FORMAT=%s"
- " requires innodb_file_per_table.",
- row_format_name);
- } else if (file_format < DICT_TF_FORMAT_ZIP) {
- push_warning_printf(
- thd,
- MYSQL_ERROR::WARN_LEVEL_WARN,
- ER_ILLEGAL_HA_CREATE_OPTION,
- "InnoDB: ROW_FORMAT=%s"
- " requires innodb_file_format >"
- " Antelope.",
- row_format_name);
- } else {
- flags |= DICT_TF_COMPACT
- | (DICT_TF_FORMAT_ZIP
- << DICT_TF_FORMAT_SHIFT);
- break;
- }
+ switch (row_type) {
+ const char* row_format_name;
+ case ROW_TYPE_REDUNDANT:
+ break;
+ case ROW_TYPE_COMPRESSED:
+ case ROW_TYPE_DYNAMIC:
+ row_format_name
+ = row_type == ROW_TYPE_COMPRESSED
+ ? "COMPRESSED"
+ : "DYNAMIC";
- /* fall through */
- case ROW_TYPE_NOT_USED:
- case ROW_TYPE_FIXED:
- default:
- push_warning(thd,
- MYSQL_ERROR::WARN_LEVEL_WARN,
- ER_ILLEGAL_HA_CREATE_OPTION,
- "InnoDB: assuming ROW_FORMAT=COMPACT.");
- case ROW_TYPE_DEFAULT:
- case ROW_TYPE_COMPACT:
- flags = DICT_TF_COMPACT;
+ if (!srv_file_per_table) {
+ push_warning_printf(
+ thd,
+ MYSQL_ERROR::WARN_LEVEL_WARN,
+ ER_ILLEGAL_HA_CREATE_OPTION,
+ "InnoDB: ROW_FORMAT=%s"
+ " requires innodb_file_per_table.",
+ row_format_name);
+ } else if (file_format < DICT_TF_FORMAT_ZIP) {
+ push_warning_printf(
+ thd,
+ MYSQL_ERROR::WARN_LEVEL_WARN,
+ ER_ILLEGAL_HA_CREATE_OPTION,
+ "InnoDB: ROW_FORMAT=%s"
+ " requires innodb_file_format >"
+ " Antelope.",
+ row_format_name);
+ } else {
+ flags |= DICT_TF_COMPACT
+ | (DICT_TF_FORMAT_ZIP
+ << DICT_TF_FORMAT_SHIFT);
break;
}
- } else if (!flags) {
- /* No KEY_BLOCK_SIZE or ROW_FORMAT specified:
- use ROW_FORMAT=COMPACT by default. */
+
+ /* fall through */
+ case ROW_TYPE_NOT_USED:
+ case ROW_TYPE_FIXED:
+ default:
+ push_warning(thd,
+ MYSQL_ERROR::WARN_LEVEL_WARN,
+ ER_ILLEGAL_HA_CREATE_OPTION,
+ "InnoDB: assuming ROW_FORMAT=COMPACT.");
+ case ROW_TYPE_DEFAULT:
+ case ROW_TYPE_COMPACT:
flags = DICT_TF_COMPACT;
+ break;
}
/* Look for a primary key */
@@ -7012,7 +7080,7 @@ ha_innobase::create(
(int) form->s->primary_key :
-1);
- /* Our function row_get_mysql_key_number_for_index assumes
+ /* Our function innobase_get_mysql_key_number_for_index assumes
the primary key is always number 0, if it exists */
ut_a(primary_key_no == -1 || primary_key_no == 0);
@@ -7072,9 +7140,11 @@ ha_innobase::create(
}
}
- if (*trx->mysql_query_str) {
- error = row_table_add_foreign_constraints(trx,
- *trx->mysql_query_str, norm_name,
+ stmt = innobase_get_stmt(thd, &stmt_len);
+
+ if (stmt) {
+ error = row_table_add_foreign_constraints(
+ trx, stmt, stmt_len, norm_name,
create_info->options & HA_LEX_CREATE_TMP_TABLE);
error = convert_error_code_to_mysql(error, flags, NULL);
@@ -7367,7 +7437,6 @@ innobase_drop_database(
/* In the Windows plugin, thd = current_thd is always NULL */
trx = trx_allocate_for_mysql();
trx->mysql_thd = NULL;
- trx->mysql_query_str = NULL;
#else
trx = innobase_trx_allocate(thd);
#endif
@@ -7567,6 +7636,10 @@ ha_innobase::records_in_range(
n_rows = HA_POS_ERROR;
goto func_exit;
}
+ if (UNIV_UNLIKELY(!row_merge_is_index_usable(prebuilt->trx, index))) {
+ n_rows = HA_ERR_TABLE_DEF_CHANGED;
+ goto func_exit;
+ }
heap = mem_heap_create(2 * (key->key_parts * sizeof(dfield_t)
+ sizeof(dtuple_t)));
@@ -7746,6 +7819,86 @@ ha_innobase::is_corrupt() const
}
/*********************************************************************//**
+Calculates the key number used inside MySQL for an Innobase index. We will
+first check the "index translation table" for a match of the index to get
+the index number. If there does not exist an "index translation table",
+or not able to find the index in the translation table, then we will fall back
+to the traditional way of looping through dict_index_t list to find a
+match. In this case, we have to take into account if we generated a
+default clustered index for the table
+@return the key number used inside MySQL */
+static
+unsigned int
+innobase_get_mysql_key_number_for_index(
+/*====================================*/
+ INNOBASE_SHARE* share, /*!< in: share structure for index
+ translation table. */
+ const TABLE* table, /*!< in: table in MySQL data
+ dictionary */
+ dict_table_t* ib_table,/*!< in: table in Innodb data
+ dictionary */
+ const dict_index_t* index) /*!< in: index */
+{
+ const dict_index_t* ind;
+ unsigned int i;
+
+ ut_ad(index);
+ ut_ad(ib_table);
+ ut_ad(table);
+ ut_ad(share);
+
+ /* If index does not belong to the table of share structure. Search
+ index->table instead */
+ if (index->table != ib_table) {
+ i = 0;
+ ind = dict_table_get_first_index(index->table);
+
+ while (index != ind) {
+ ind = dict_table_get_next_index(ind);
+ i++;
+ }
+
+ if (row_table_got_default_clust_index(index->table)) {
+ ut_a(i > 0);
+ i--;
+ }
+
+ return(i);
+ }
+
+ /* If index translation table exists, we will first check
+ the index through index translation table for a match. */
+ if (share->idx_trans_tbl.index_mapping) {
+ for (i = 0; i < share->idx_trans_tbl.index_count; i++) {
+ if (share->idx_trans_tbl.index_mapping[i] == index) {
+ return(i);
+ }
+ }
+
+ /* Print an error message if we cannot find the index
+ ** in the "index translation table". */
+ sql_print_error("Cannot find index %s in InnoDB index "
+ "translation table.", index->name);
+ }
+
+ /* If we do not have an "index translation table", or not able
+ to find the index in the translation table, we'll directly find
+ matching index in the dict_index_t list */
+ for (i = 0; i < table->s->keys; i++) {
+ ind = dict_table_get_index_on_name(
+ ib_table, table->key_info[i].name);
+
+ if (index == ind) {
+ return(i);
+ }
+ }
+
+ sql_print_error("Cannot find matching index number for index %s "
+ "in InnoDB index list.", index->name);
+
+ return(0);
+}
+/*********************************************************************//**
Returns statistics information of the table to the MySQL interpreter,
in various fields of the handle object. */
UNIV_INTERN
@@ -7802,9 +7955,30 @@ ha_innobase::info(
/* In sql_show we call with this flag: update
then statistics so that they are up-to-date */
+ if (srv_use_sys_stats_table
+ && thd_sql_command(user_thd) == SQLCOM_ANALYZE) {
+ /* If the indexes on the table don't have enough rows in SYS_STATS system table, */
+ /* they need to be created. */
+ dict_index_t* index;
+
+ prebuilt->trx->op_info = "confirming rows of SYS_STATS to store statistics";
+
+ ut_a(prebuilt->trx->conc_state == TRX_NOT_STARTED);
+
+ for (index = dict_table_get_first_index(ib_table);
+ index != NULL;
+ index = dict_table_get_next_index(index)) {
+ row_insert_stats_for_mysql(index, prebuilt->trx);
+ innobase_commit_low(prebuilt->trx);
+ }
+
+ ut_a(prebuilt->trx->conc_state == TRX_NOT_STARTED);
+ }
+
prebuilt->trx->op_info = "updating table statistics";
- dict_update_statistics(ib_table);
+ dict_update_statistics(ib_table,
+ (thd_sql_command(user_thd) == SQLCOM_ANALYZE)?TRUE:FALSE);
prebuilt->trx->op_info = "returning various info to MySQL";
}
@@ -8016,8 +8190,8 @@ ha_innobase::info(
err_index = trx_get_error_info(prebuilt->trx);
if (err_index) {
- errkey = (unsigned int)
- row_get_mysql_key_number_for_index(err_index);
+ errkey = innobase_get_mysql_key_number_for_index(
+ share, table, ib_table, err_index);
} else {
errkey = (unsigned int) prebuilt->trx->error_key_num;
}
@@ -10766,7 +10940,35 @@ innodb_old_blocks_pct_update(
}
/*************************************************************//**
-Check if it is a valid value of innodb_change_buffering. This function is
+Find the corresponding ibuf_use_t value that indexes into
+innobase_change_buffering_values[] array for the input
+change buffering option name.
+@return corresponding IBUF_USE_* value for the input variable
+name, or IBUF_USE_COUNT if not able to find a match */
+static
+ibuf_use_t
+innodb_find_change_buffering_value(
+/*===============================*/
+ const char* input_name) /*!< in: input change buffering
+ option name */
+{
+ ulint use;
+
+ for (use = 0; use < UT_ARR_SIZE(innobase_change_buffering_values);
+ use++) {
+ /* found a match */
+ if (!innobase_strcasecmp(
+ input_name, innobase_change_buffering_values[use])) {
+ return((ibuf_use_t)use);
+ }
+ }
+
+ /* Did not find any match */
+ return(IBUF_USE_COUNT);
+}
+
+/*************************************************************//**
+Check if it is a valid value of innodb_change_buffering. This function is
registered as a callback with MySQL.
@return 0 for valid innodb_change_buffering */
static
@@ -10790,19 +10992,22 @@ innodb_change_buffering_validate(
change_buffering_input = value->val_str(value, buff, &len);
if (change_buffering_input != NULL) {
- ulint use;
+ ibuf_use_t use;
- for (use = 0; use < UT_ARR_SIZE(innobase_change_buffering_values);
- use++) {
- if (!innobase_strcasecmp(
- change_buffering_input,
- innobase_change_buffering_values[use])) {
- *(ibuf_use_t*) save = (ibuf_use_t) use;
- return(0);
- }
+ use = innodb_find_change_buffering_value(
+ change_buffering_input);
+
+ if (use != IBUF_USE_COUNT) {
+ /* Find a matching change_buffering option value. */
+ *static_cast<const char**>(save) =
+ innobase_change_buffering_values[use];
+
+ return(0);
}
}
+ /* No corresponding change buffering option for user supplied
+ "change_buffering_input" */
return(1);
}
@@ -10813,21 +11018,27 @@ static
void
innodb_change_buffering_update(
/*===========================*/
- THD* thd, /*!< in: thread handle */
- struct st_mysql_sys_var* var, /*!< in: pointer to
- system variable */
- void* var_ptr, /*!< out: where the
- formal string goes */
- const void* save) /*!< in: immediate result
- from check function */
+ THD* thd, /*!< in: thread handle */
+ struct st_mysql_sys_var* var, /*!< in: pointer to
+ system variable */
+ void* var_ptr,/*!< out: where the
+ formal string goes */
+ const void* save) /*!< in: immediate result
+ from check function */
{
+ ibuf_use_t use;
+
ut_a(var_ptr != NULL);
ut_a(save != NULL);
- ut_a((*(ibuf_use_t*) save) < IBUF_USE_COUNT);
- ibuf_use = *(const ibuf_use_t*) save;
+ use = innodb_find_change_buffering_value(
+ *static_cast<const char*const*>(save));
+
+ ut_a(use < IBUF_USE_COUNT);
- *(const char**) var_ptr = innobase_change_buffering_values[ibuf_use];
+ ibuf_use = use;
+ *static_cast<const char**>(var_ptr) =
+ *static_cast<const char*const*>(save);
}
static int show_innodb_vars(THD *thd, SHOW_VAR *var, char *buff)
@@ -11093,6 +11304,14 @@ static MYSQL_SYSVAR_ULONG(stats_update_need_lock, srv_stats_update_need_lock,
"e.g. Data_free.",
NULL, NULL, 1, 0, 1, 0);
+static MYSQL_SYSVAR_BOOL(use_sys_stats_table, innobase_use_sys_stats_table,
+ PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY,
+ "Enable to use SYS_STATS system table to store statistics statically, "
+ "And avoids to calculate statistics at every first open of the tables. "
+ "This option may make the opportunities of update statistics less. "
+ "So you should use ANALYZE TABLE command intentionally.",
+ NULL, NULL, FALSE);
+
static MYSQL_SYSVAR_BOOL(adaptive_hash_index, btr_search_enabled,
PLUGIN_VAR_OPCMDARG,
"Enable InnoDB adaptive hash index (enabled by default). "
@@ -11118,7 +11337,12 @@ static MYSQL_SYSVAR_ULONG(autoextend_increment, srv_auto_extend_increment,
static MYSQL_SYSVAR_LONGLONG(buffer_pool_size, innobase_buffer_pool_size,
PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
"The size of the memory buffer InnoDB uses to cache data and indexes of its tables.",
- NULL, NULL, 128*1024*1024L, 5*1024*1024L, LONGLONG_MAX, 1024*1024L);
+ NULL, NULL, 128*1024*1024L, 32*1024*1024L, LONGLONG_MAX, 1024*1024L);
+
+static MYSQL_SYSVAR_UINT(buffer_pool_shm_key, srv_buffer_pool_shm_key,
+ PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
+ "[experimental] The key value of shared memory segment for the buffer pool. 0 means disable the feature (default).",
+ NULL, NULL, 0, 0, INT_MAX32, 0);
static MYSQL_SYSVAR_ULONG(commit_concurrency, innobase_commit_concurrency,
PLUGIN_VAR_RQCMDARG,
@@ -11249,7 +11473,7 @@ static MYSQL_SYSVAR_STR(change_buffering, innobase_change_buffering,
"Buffer changes to reduce random access: "
"OFF, ON, none, inserts.",
innodb_change_buffering_validate,
- innodb_change_buffering_update, NULL);
+ innodb_change_buffering_update, "inserts");
static MYSQL_SYSVAR_ULONG(read_ahead_threshold, srv_read_ahead_threshold,
PLUGIN_VAR_RQCMDARG,
@@ -11379,6 +11603,7 @@ static struct st_mysql_sys_var* innobase_system_variables[]= {
MYSQL_SYSVAR(additional_mem_pool_size),
MYSQL_SYSVAR(autoextend_increment),
MYSQL_SYSVAR(buffer_pool_size),
+ MYSQL_SYSVAR(buffer_pool_shm_key),
MYSQL_SYSVAR(checksums),
MYSQL_SYSVAR(fast_checksum),
MYSQL_SYSVAR(commit_concurrency),
@@ -11423,6 +11648,7 @@ static struct st_mysql_sys_var* innobase_system_variables[]= {
MYSQL_SYSVAR(stats_method),
MYSQL_SYSVAR(stats_auto_update),
MYSQL_SYSVAR(stats_update_need_lock),
+ MYSQL_SYSVAR(use_sys_stats_table),
MYSQL_SYSVAR(stats_sample_pages),
MYSQL_SYSVAR(adaptive_hash_index),
MYSQL_SYSVAR(replication_delay),
@@ -11446,6 +11672,7 @@ static struct st_mysql_sys_var* innobase_system_variables[]= {
MYSQL_SYSVAR(flush_neighbor_pages),
MYSQL_SYSVAR(read_ahead),
MYSQL_SYSVAR(adaptive_checkpoint),
+ MYSQL_SYSVAR(flush_log_at_trx_commit_session),
MYSQL_SYSVAR(enable_unsafe_group_commit),
MYSQL_SYSVAR(expand_import),
MYSQL_SYSVAR(extra_rsegments),
@@ -11465,7 +11692,7 @@ mysql_declare_plugin(innodb_plugin)
&innobase_storage_engine,
innobase_hton_name,
"Innobase Oy",
- "Supports transactions, row-level locking, and foreign keys",
+ "Percona-XtraDB, Supports transactions, row-level locking, and foreign keys",
PLUGIN_LICENSE_GPL,
innobase_init, /* Plugin Init */
NULL, /* Plugin Deinit */
@@ -11490,6 +11717,7 @@ i_s_innodb_index_stats,
i_s_innodb_admin_command,
i_s_innodb_sys_tables,
i_s_innodb_sys_indexes,
+i_s_innodb_sys_stats,
i_s_innodb_patches
mysql_declare_plugin_end;