diff options
Diffstat (limited to 'handler/ha_innodb.cc')
-rw-r--r-- | handler/ha_innodb.cc | 43 |
1 files changed, 40 insertions, 3 deletions
diff --git a/handler/ha_innodb.cc b/handler/ha_innodb.cc index f244cd94fdd..2d476d1bdf5 100644 --- a/handler/ha_innodb.cc +++ b/handler/ha_innodb.cc @@ -1050,6 +1050,13 @@ thd_to_trx( return(*(trx_t**) thd_ha_data(thd, innodb_hton_ptr)); } +my_bool +ha_innobase::is_fake_change_enabled(THD* thd) +{ + trx_t* trx = thd_to_trx(thd); + return(trx && trx->fake_changes); +} + /********************************************************************//** Call this function when mysqld passes control to the client. That is to avoid deadlocks on the adaptive hash S-latch possibly held by thd. For more @@ -3057,6 +3064,14 @@ innobase_change_buffering_inited_ok: srv_use_checksums = (ibool) innobase_use_checksums; srv_fast_checksum = (ibool) innobase_fast_checksum; + if (innobase_fast_checksum) { + fprintf(stderr, + "InnoDB: Warning: innodb_fast_checksum is DEPRECATED " + "and *WILL* be removed in Percona Server 5.6. Please " + "consult the Percona Server 5.6 documentation for " + "help in upgrading.\n"); + } + srv_blocking_lru_restore = (ibool) innobase_blocking_lru_restore; #ifdef HAVE_LARGE_PAGES @@ -5991,7 +6006,9 @@ no_commit: error = row_insert_for_mysql((byte*) record, prebuilt); #ifdef EXTENDED_FOR_USERSTAT - if (error == DB_SUCCESS) rows_changed++; + if (UNIV_LIKELY(error == DB_SUCCESS && !trx->fake_changes)) { + rows_changed++; + } #endif /* Handle duplicate key errors */ @@ -6355,7 +6372,9 @@ ha_innobase::update_row( } #ifdef EXTENDED_FOR_USERSTAT - if (error == DB_SUCCESS) rows_changed++; + if (UNIV_LIKELY(error == DB_SUCCESS && !trx->fake_changes)) { + rows_changed++; + } #endif innodb_srv_conc_exit_innodb(trx); @@ -6420,7 +6439,9 @@ ha_innobase::delete_row( error = row_update_for_mysql((byte*) record, prebuilt); #ifdef EXTENDED_FOR_USERSTAT - if (error == DB_SUCCESS) rows_changed++; + if (UNIV_LIKELY(error == DB_SUCCESS && !trx->fake_changes)) { + rows_changed++; + } #endif innodb_srv_conc_exit_innodb(trx); @@ -12351,6 +12372,8 @@ static MYSQL_SYSVAR_BOOL(checksums, innobase_use_checksums, static MYSQL_SYSVAR_BOOL(fast_checksum, innobase_fast_checksum, PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY, + "DEPRECATED. #### WARNING #### : This feature is DEPRECATED and WILL " + "be removed in Percona Server 5.6. " "Change the algorithm of checksum for the whole of datapage to 4-bytes word based. " "The original checksum is checked after the new one. It may be slow for reading page" " which has orginal checksum. Overwrite the page or recreate the InnoDB database, " @@ -12785,6 +12808,11 @@ static MYSQL_SYSVAR_BOOL(track_changed_pages, srv_track_changed_pages, "Track the redo log for changed pages and output a changed page bitmap", NULL, NULL, FALSE); +static MYSQL_SYSVAR_ULONGLONG(max_bitmap_file_size, srv_max_bitmap_file_size, + PLUGIN_VAR_RQCMDARG, + "The maximum size of changed page bitmap files", + NULL, NULL, 100*1024*1024ULL, 4096ULL, ULONGLONG_MAX, 0); + static MYSQL_SYSVAR_ULONGLONG(changed_pages_limit, srv_changed_pages_limit, PLUGIN_VAR_RQCMDARG, "The maximum number of rows for " @@ -12987,6 +13015,13 @@ static MYSQL_SYSVAR_ULONG(lazy_drop_table, srv_lazy_drop_table, "e.g. for http://bugs.mysql.com/51325", NULL, NULL, 0, 0, 1, 0); +static MYSQL_SYSVAR_BOOL(locking_fake_changes, srv_fake_changes_locks, + PLUGIN_VAR_NOCMDARG, + "###EXPERIMENTAL### if enabled, transactions will get S row locks instead " + "of X locks for fake changes. If disabled, fake change transactions will " + "not take any locks at all.", + NULL, NULL, TRUE); + static struct st_mysql_sys_var* innobase_system_variables[]= { MYSQL_SYSVAR(page_size), MYSQL_SYSVAR(log_block_size), @@ -13078,6 +13113,7 @@ static struct st_mysql_sys_var* innobase_system_variables[]= { MYSQL_SYSVAR(use_native_aio), MYSQL_SYSVAR(change_buffering), MYSQL_SYSVAR(track_changed_pages), + MYSQL_SYSVAR(max_bitmap_file_size), MYSQL_SYSVAR(changed_pages_limit), #if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG MYSQL_SYSVAR(change_buffering_debug), @@ -13096,6 +13132,7 @@ static struct st_mysql_sys_var* innobase_system_variables[]= { MYSQL_SYSVAR(corrupt_table_action), MYSQL_SYSVAR(lazy_drop_table), MYSQL_SYSVAR(fake_changes), + MYSQL_SYSVAR(locking_fake_changes), MYSQL_SYSVAR(merge_sort_block_size), NULL }; |