mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Merge remote-tracking branch 'origin/10.0' into 10.0
This commit is contained in:
@@ -2142,6 +2142,7 @@ static void print_xml_comment(FILE *xml_file, size_t len,
|
||||
case '-':
|
||||
if (*(comment_string + 1) == '-') /* Only one hyphen allowed. */
|
||||
break;
|
||||
/* fall through */
|
||||
default:
|
||||
fputc(*comment_string, xml_file);
|
||||
break;
|
||||
|
@@ -174,6 +174,7 @@ register char **argv[];
|
||||
break;
|
||||
case 'V':
|
||||
version=1;
|
||||
/* fall through */
|
||||
case 'I':
|
||||
case '?':
|
||||
help=1; /* Help text written */
|
||||
|
@@ -3,6 +3,7 @@
|
||||
#
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
--source include/have_profiling.inc
|
||||
--source include/platform.inc
|
||||
|
||||
#
|
||||
|
@@ -1,17 +1,17 @@
|
||||
##############################################################################
|
||||
#
|
||||
# List the test cases which, unlike tests from disabled.def files,
|
||||
# can still be run on the current tree meaningfully, but are known
|
||||
# can still be run on the current tree meaningfully, but are known
|
||||
# or suspected to fail sporadically on different reasons.
|
||||
#
|
||||
# Most common reasons are either test failures observed in buildbot,
|
||||
# or recent modifications to the tests which make their stability
|
||||
# unknown.
|
||||
# or recent modifications to the tests which make their stability
|
||||
# unknown.
|
||||
#
|
||||
# Tests included due to recent modifications are later removed from the
|
||||
# list, if during a certain period they do not fail (and are not
|
||||
# modified again). Tests included due to intermittent failures are
|
||||
# removed when corresponding bug reports are closed.
|
||||
# Tests included due to recent modifications are later removed from the
|
||||
# list, if during a certain period they do not fail (and are not
|
||||
# modified again). Tests included due to intermittent failures are
|
||||
# removed when corresponding bug reports are closed.
|
||||
#
|
||||
# Separate the test case name and the comment with ':'.
|
||||
#
|
||||
@@ -19,44 +19,46 @@
|
||||
#
|
||||
# '*' wildcard in testcase names is supported.
|
||||
#
|
||||
# To use the list, run MTR with --skip-test-list=unstable-tests option.
|
||||
# To use the list, run MTR with --skip-test-list=unstable-tests option.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
main.alter_table : Modified in 10.0.30
|
||||
main.count_distinct2 : MDEV-11768 - timeout
|
||||
main.create_delayed : MDEV-10605 - failed with timeout
|
||||
main.debug_sync : MDEV-10607 - internal error
|
||||
main.derived : Modified in 10.0.30
|
||||
main.derived_opt : MDEV-11768 - timeout
|
||||
main.events_restart : MDEV-11221 - assertion failure
|
||||
main.grant : Modified in 10.0.30
|
||||
main.derived_view : Modified in 10.0.31
|
||||
main.events_2 : Modified in 10.0.31
|
||||
main.events_slowlog : MDEV-12821 - wrong result
|
||||
main.func_regexp_pcre : Modified in 10.0.31
|
||||
main.gis : Modified in 10.0.31
|
||||
main.host_cache_size_functionality : MDEV-10606 - sporadic failure on shutdown
|
||||
main.index_intersect_innodb : MDEV-10643 - failed with timeout
|
||||
main.index_merge_innodb : MDEV-7142 - wrong result
|
||||
main.innodb_mysql_lock : MDEV-7861 - sporadic lock detection failure
|
||||
main.join_nested : Modified in 10.0.30
|
||||
main.loaddata : Modified in 10.0.31
|
||||
main.log_tables-big : Modified in 10.0.31
|
||||
main.mdev-504 : MDEV-10607 - sporadic "can't connect"
|
||||
main.mdev375 : MDEV-10607 - sporadic "can't connect"
|
||||
main.merge : MDEV-10607 - sporadic "can't connect"
|
||||
main.mysqldump : Modified in 10.0.30
|
||||
main.mysqld--help : Modified in 10.0.31
|
||||
main.mysqldump : Modified in 10.0.31
|
||||
main.mysqlhotcopy_myisam : MDEV-10995 - test hangs on debug build
|
||||
main.mysqltest : MDEV-9269 - fails on Alpha
|
||||
main.partition_innodb : Modified in 10.0.30
|
||||
main.partition_myisam : Modified in 10.0.30
|
||||
main.ps : MDEV-11017 - sporadic wrong Prepared_stmt_count
|
||||
main.range_vs_index_merge : Modified in 10.0.30
|
||||
main.repair_symlink-5543 : Modified in 10.0.30
|
||||
main.show_explain : MDEV-10674 - wrong result
|
||||
main.signal_demo3 : MDEV-11720 - Thread stack overrun on Solaris
|
||||
main.sp : Modified in 10.0.30
|
||||
main.sp_notembedded : MDEV-10607 - internal error
|
||||
main.sp-security : MDEV-10607 - sporadic "can't connect"
|
||||
main.subselect_innodb : MDEV-10614 - sporadic wrong results
|
||||
main.symlink-aria-11902 : Added in 10.0.30
|
||||
main.symlink-myisam-11902 : Added in 10.0.30
|
||||
main.table_elim : Modified in 10.0.30
|
||||
main.view : Modified in 10.0.30
|
||||
main.subselect4 : Modified in 10.0.31
|
||||
main.subselect_exists2in : Modified in 10.0.31
|
||||
main.subselect_innodb : MDEV-10614 - sporadic wrong results; modified in 10.0.31
|
||||
main.subselect_mat_cost_bugs : Modified in 10.0.31
|
||||
main.subselect_sj : Modified in 10.0.31
|
||||
main.subselect_sj_mat : Modified in 10.0.31
|
||||
main.subselect_sj2_mat : Modified in 10.0.31
|
||||
main.symlink : Modified in 10.0.31
|
||||
main.symlink-myisam-11902 : Modified in 10.0.31
|
||||
main.view : Modified in 10.0.31
|
||||
main.xa : MDEV-11769 - lock wait timeout
|
||||
|
||||
#----------------------------------------------------------------
|
||||
@@ -70,15 +72,16 @@ archive.mysqlhotcopy_archive : MDEV-10995 - test hangs on debug build
|
||||
#----------------------------------------------------------------
|
||||
|
||||
binlog.binlog_commit_wait : MDEV-10150 - Error: too much time elapsed
|
||||
binlog.binlog_max_binlog_stmt_cache_size : Added in 10.0.30
|
||||
binlog.binlog_xa_recover : MDEV-8517 - Extra checkpoint
|
||||
|
||||
#----------------------------------------------------------------
|
||||
|
||||
connect.jdbc_new : Modified in 10.0.31
|
||||
connect.tbl : MDEV-9844, MDEV-10179 - sporadic crashes, valgrind warnings, wrong results
|
||||
connect.xml : Uses xsample2.xml modified in 10.0.30
|
||||
connect.xml_zip : Added in 10.0.30
|
||||
connect.zip : Added in 10.0.30
|
||||
|
||||
#----------------------------------------------------------------
|
||||
|
||||
csv.read_only : Added in 10.0.31
|
||||
|
||||
#----------------------------------------------------------------
|
||||
|
||||
@@ -86,7 +89,6 @@ engines/rr_trx.* : MDEV-10998 - tests not maintained
|
||||
|
||||
#----------------------------------------------------------------
|
||||
|
||||
federated_bug_35333 : Modified in 10.0.30
|
||||
federated.federatedx : MDEV-10617 - Wrong checksum, timeouts
|
||||
federated.federated_innodb : MDEV-10617, MDEV-10417 - Wrong checksum, timeouts, fails on Mips
|
||||
federated.federated_partition : MDEV-10417 - Fails on Mips
|
||||
@@ -101,22 +103,19 @@ funcs_2/charset.* : MDEV-10999 - test not maintained
|
||||
|
||||
#----------------------------------------------------------------
|
||||
|
||||
innodb.alter_key_block_size-11757 : Added in 10.0.30
|
||||
innodb.binlog_consistent : MDEV-10618 - Server fails to start
|
||||
innodb.autoinc_debug : Added in 10.0.31
|
||||
innodb.binlog_consistent : MDEV-10618 - Server fails to start
|
||||
innodb.group_commit_crash_no_optimize_thread : MDEV-11770 - checksum mismatch
|
||||
innodb.innodb-alter-debug : Added in 10.0.31
|
||||
innodb.innodb-alter-nullable : Added in 10.0.31
|
||||
innodb.innodb-alter-table : MDEV-10619 - Testcase timeout
|
||||
innodb.innodb_blob_unrecoverable_crash : Modified in 10.0.30
|
||||
innodb.innodb_bug14676111 : Modified in 10.0.30
|
||||
innodb.innodb_bug14676111 : Modified in 10.0.31
|
||||
innodb.innodb_bug30423 : MDEV-7311 - Wrong number of rows in the plan
|
||||
innodb.innodb_bug59641 : Modified in 10.0.30
|
||||
innodb.innodb-get-fk : Modified in 10.0.30
|
||||
innodb.innodb-index-online-norebuild : Added in 10.0.31
|
||||
innodb.log_file_size : Modified in 10.0.31
|
||||
innodb.innodb_monitor : MDEV-10939 - Testcase timeout
|
||||
innodb.log_file_size : Added in 10.0.30
|
||||
innodb.read_only_recovery : Added in 10.0.30
|
||||
innodb.xa_recovery : Modified in 10.0.30
|
||||
|
||||
innodb_fts.create : Added in 10.0.30
|
||||
innodb_fts.innodb_fts_stopword_charset : MDEV-12052 - Crash on shutdown
|
||||
innodb_fts.innodb_fts_stopword_charset : MDEV-12052 - Crash on shutdown; modified in 10.0.31
|
||||
|
||||
#----------------------------------------------------------------
|
||||
|
||||
@@ -134,29 +133,13 @@ multi_source.multisource : MDEV-10417 - Fails on Mips
|
||||
multi_source.simple : MDEV-4633 - Wrong slave status output
|
||||
multi_source.status_vars : MDEV-4632 - failed while waiting for Slave_received_heartbeats
|
||||
|
||||
#----------------------------------------------------------------
|
||||
|
||||
myisam_debug : Modified in 10.0.31
|
||||
|
||||
#----------------------------------------------------------------
|
||||
|
||||
oqgraph.regression_mdev6282 : Modified in 10.0.30
|
||||
oqgraph.regression_mdev6345 : Modified in 10.0.30
|
||||
|
||||
#----------------------------------------------------------------
|
||||
|
||||
parts.partition_bigint_innodb : Added in 10.0.30
|
||||
parts.partition_bigint_myisam : Added in 10.0.30
|
||||
parts.partition_double_innodb : Added in 10.0.30
|
||||
parts.partition_double_myisam : Added in 10.0.30
|
||||
parts.partition_exch_qa_10 : MDEV-11765 - wrong result
|
||||
parts.partition_float_innodb : Modified in 10.0.30
|
||||
parts.partition_float_myisam : Modified in 10.0.30
|
||||
parts.partition_int_innodb : Modified in 10.0.30
|
||||
parts.partition_int_myisam : Modified in 10.0.30
|
||||
parts.partition_mediumint_innodb : Added in 10.0.30
|
||||
parts.partition_mediumint_myisam : Added in 10.0.30
|
||||
parts.partition_smallint_innodb : Added in 10.0.30
|
||||
parts.partition_smallint_myisam : Added in 10.0.30
|
||||
parts.partition_tinyint_innodb : Added in 10.0.30
|
||||
parts.partition_tinyint_myisam : Added in 10.0.30
|
||||
|
||||
#----------------------------------------------------------------
|
||||
|
||||
@@ -165,7 +148,7 @@ perfschema.func_mutex : MDEV-5708 - fails for s390x
|
||||
perfschema.hostcache_ipv6_ssl : MDEV-10696 - crash on shutdown
|
||||
perfschema.socket_summary_by_event_name_func : MDEV-10622 - Socket summary tables do not match
|
||||
perfschema.stage_mdl_procedure : MDEV-11545 - Wrong result
|
||||
perfschema.threads_mysql : MDEV-12177 - Wrong result
|
||||
perfschema.start_server_1_digest : Added in 10.0.31
|
||||
|
||||
perfschema_stress.* : MDEV-10996 - tests not maintained
|
||||
|
||||
@@ -191,13 +174,11 @@ rpl.rpl_ddl : MDEV-10417 - Fails on Mips
|
||||
rpl.rpl_gtid_crash : MDEV-9501 - Warning: failed registering on master
|
||||
rpl.rpl_gtid_stop_start : MDEV-10629 - Crash on shutdown
|
||||
rpl.rpl_gtid_until : MDEV-10625 - warnings in error log
|
||||
rpl.rpl_heartbeat_basic : Modified in 10.0.30
|
||||
rpl.rpl_innodb_bug30888 : MDEV-10417 - Fails on Mips
|
||||
rpl.rpl_insert : MDEV-9329 - Fails on Ubuntu/s390x
|
||||
rpl.rpl_insert_delayed : MDEV-9329 - Fails on Ubuntu/s390x
|
||||
rpl.rpl_invoked_features : MDEV-10417 - Fails on Mips
|
||||
rpl.rpl_mdev6020 : MDEV-10630, MDEV-10417 - Timeouts, fails on Mips
|
||||
rpl.rpl_mdev6386 : Modified in 10.0.30
|
||||
rpl.rpl_parallel : MDEV-10653 - Timeouts
|
||||
rpl.rpl_parallel_temptable : MDEV-10356 - Crash in close_thread_tables
|
||||
rpl.rpl_partition_innodb : MDEV-10417 - Fails on Mips
|
||||
@@ -238,31 +219,46 @@ stress.ddl_innodb : MDEV-10635 - Testcase timeout
|
||||
|
||||
sys_vars.autocommit_func2 : MDEV-9329 - Fails on Ubuntu/s390x
|
||||
sys_vars.innodb_buffer_pool_dump_pct_basic : MDEV-10651 - sporadic failure on file_exists
|
||||
sys_vars.innodb_force_recovery_crash_basic : Modified in 10.0.30
|
||||
sys_vars.innodb_stats_include_delete_marked_basic : Added in 10.0.30
|
||||
sys_vars.innodb_status_output_basic : MDEV-12174 - Timeout
|
||||
sys_vars.secure_file_priv : Modified in 10.0.30
|
||||
sys_vars.thread_cache_size_func : MDEV-11775 - wrong result
|
||||
|
||||
#----------------------------------------------------------------
|
||||
|
||||
tokudb.background_job_manager : Modified in 10.0.31
|
||||
tokudb.bug-1657908 : Added in 10.0.31
|
||||
tokudb.card_auto_analyze_lots : Modified in 10.0.31
|
||||
tokudb.change_column_all_1000_10 : MDEV-12640 - Lost connection during query
|
||||
tokudb.change_column_bin : MDEV-12640 - Lost connection during query
|
||||
tokudb.change_column_char : MDEV-12822 - Lost connection during query
|
||||
tokudb.cluster_filter_unpack_varchar : MDEV-10636 - Wrong execution plan
|
||||
tokudb.dir_cmd : Added in 10.0.31
|
||||
tokudb.dir_per_db : MDEV-11537 - wrong result
|
||||
tokudb.dir_per_db_rename_to_nonexisting_schema : Added in 10.0.30
|
||||
tokudb.gap_lock_error : Added in 10.0.30
|
||||
tokudb.locks-select-update-3 : Modified in 10.0.30
|
||||
tokudb.percona_kill_idle_trx_tokudb : Added in 10.0.30
|
||||
tokudb.dir_per_db_rename_to_nonexisting_schema : MDEV-12823 - Valgrind
|
||||
tokudb.hotindex-update-1 : MDEV-12640 - Lost connection during query
|
||||
tokudb.i_s_tokudb_lock_waits_timeout : Modified in 10.0.31
|
||||
tokudb.i_s_tokudb_locks : Modified in 10.0.31
|
||||
tokudb.rows-32m-rand-insert : MDEV-12640 - Lost connection during query
|
||||
tokudb.rows-32m-seq-insert : MDEV-12640 - Lost connection during query
|
||||
|
||||
tokudb_backup.* : MDEV-11001 - tests don't work
|
||||
|
||||
tokudb_backup.backup_master_info : Added in 10.0.31
|
||||
tokudb_backup.backup_master_state : Added in 10.0.31
|
||||
tokudb_backup.empty_slave_info_file : Added in 10.0.31
|
||||
tokudb_backup.innodb_use_native_aio_enabled : Added in 10.0.31
|
||||
tokudb_backup.rpl_safe_slave : Added in 10.0.31
|
||||
tokudb_backup.rpl_tokudb_commit_sync : Added in 10.0.31
|
||||
|
||||
tokudb_bugs.checkpoint_lock : MDEV-10637 - Wrong processlist output
|
||||
tokudb_bugs.checkpoint_lock_3 : MDEV-10637 - Wrong processlist output
|
||||
tokudb_bugs.db233 : Modified in 10.0.31
|
||||
tokudb_bugs.frm_store2 : MDEV-12823 - Valgrind
|
||||
tokudb_bugs.leak172 : Modified in 10.0.31
|
||||
tokudb_bugs.xa : MDEV-11804 - Lock wait timeout
|
||||
|
||||
tokudb_rpl.* : MDEV-11001 - tests don't work
|
||||
tokudb_sys_vars.* : MDEV-11001 - tests don't work
|
||||
|
||||
rpl-tokudb.rpl_extra_col_slave_tokudb : Result file modified in 10.0.30
|
||||
|
||||
#----------------------------------------------------------------
|
||||
|
||||
unit.ma_test_loghandler : MDEV-10638 - record read not ok
|
||||
@@ -272,10 +268,5 @@ unit.pfs : MySQL:84457 - unittest pft-t failing
|
||||
|
||||
vcol.not_supported : MDEV-10639 - Testcase timeout
|
||||
vcol.vcol_keys_innodb : MDEV-10639 - Testcase timeout
|
||||
vcol.vcol_misc : Modified in 10.0.30
|
||||
vcol.vcol_select_myisam : Modified in 10.0.30
|
||||
vcol.vcol_trigger_sp_innodb : Include file modified in 10.0.30
|
||||
vcol.vcol_trigger_sp_myisam : Include file modified in 10.0.30
|
||||
vcol.wrong_arena : Added in 10.0.30
|
||||
|
||||
#----------------------------------------------------------------
|
||||
|
@@ -4039,6 +4039,7 @@ mariadb_dyncol_val_double(double *dbl, DYNAMIC_COLUMN_VALUE *val)
|
||||
*dbl= strtod(str, &end);
|
||||
if (*end != '\0')
|
||||
rc= ER_DYNCOL_TRUNCATED;
|
||||
break;
|
||||
}
|
||||
case DYN_COL_DECIMAL:
|
||||
if (decimal2double(&val->x.decimal.value, dbl) != E_DEC_OK)
|
||||
|
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
Copyright (c) 2005, 2013, Oracle and/or its affiliates.
|
||||
Copyright (c) 2017, MariaDB Corporation.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -242,6 +243,7 @@ common_1_lev_code:
|
||||
break;
|
||||
case INTERVAL_WEEK:
|
||||
expr/= 7;
|
||||
/* fall through */
|
||||
default:
|
||||
close_quote= FALSE;
|
||||
break;
|
||||
|
@@ -9464,7 +9464,7 @@ bool Create_field::init(THD *thd, char *fld_name, enum_field_types fld_type,
|
||||
case MYSQL_TYPE_DATE:
|
||||
/* We don't support creation of MYSQL_TYPE_DATE anymore */
|
||||
sql_type= MYSQL_TYPE_NEWDATE;
|
||||
/* fall trough */
|
||||
/* fall through */
|
||||
case MYSQL_TYPE_NEWDATE:
|
||||
length= MAX_DATE_WIDTH;
|
||||
break;
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Copyright (c) 2000, 2016, Oracle and/or its affiliates.
|
||||
Copyright (c) 2010, 2016, MariaDB
|
||||
Copyright (c) 2010, 2017, MariaDB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -5925,7 +5925,7 @@ Field *Item::tmp_table_field_from_field_type(TABLE *table, bool fixed_length)
|
||||
collation.collation);
|
||||
break;
|
||||
}
|
||||
/* Fall through to make_string_field() */
|
||||
/* Fall through */
|
||||
case MYSQL_TYPE_ENUM:
|
||||
case MYSQL_TYPE_SET:
|
||||
case MYSQL_TYPE_VAR_STRING:
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/* Copyright (c) 2000, 2015, Oracle and/or its affiliates.
|
||||
Copyright (c) 2009, 2015, MariaDB
|
||||
Copyright (c) 2009, 2017, MariaDB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -2034,6 +2034,7 @@ my_decimal *Item_func_mod::decimal_op(my_decimal *decimal_value)
|
||||
return decimal_value;
|
||||
case E_DEC_DIV_ZERO:
|
||||
signal_divide_by_null();
|
||||
/* fall through */
|
||||
default:
|
||||
null_value= 1;
|
||||
return 0;
|
||||
|
@@ -5090,7 +5090,7 @@ bool Item_dyncol_get::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date)
|
||||
goto null;
|
||||
case DYN_COL_INT:
|
||||
signed_value= 1; // For error message
|
||||
/* fall_trough */
|
||||
/* fall through */
|
||||
case DYN_COL_UINT:
|
||||
if (signed_value || val.x.ulong_value <= LONGLONG_MAX)
|
||||
{
|
||||
@@ -5103,7 +5103,7 @@ bool Item_dyncol_get::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date)
|
||||
}
|
||||
/* let double_to_datetime_with_warn() issue the warning message */
|
||||
val.x.double_value= static_cast<double>(ULONGLONG_MAX);
|
||||
/* fall_trough */
|
||||
/* fall through */
|
||||
case DYN_COL_DOUBLE:
|
||||
if (double_to_datetime_with_warn(val.x.double_value, ltime, fuzzy_date,
|
||||
0 /* TODO */))
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/* Copyright (c) 2000, 2016, Oracle and/or its affiliates.
|
||||
Copyright (c) 2009, 2016, MariaDB
|
||||
Copyright (c) 2009, 2017, MariaDB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -8822,8 +8822,10 @@ void TC_LOG_MMAP::close()
|
||||
mysql_cond_destroy(&COND_pool);
|
||||
mysql_cond_destroy(&COND_active);
|
||||
mysql_cond_destroy(&COND_queue_busy);
|
||||
/* fall through */
|
||||
case 5:
|
||||
data[0]='A'; // garble the first (signature) byte, in case mysql_file_delete fails
|
||||
/* fall through */
|
||||
case 4:
|
||||
for (i=0; i < npages; i++)
|
||||
{
|
||||
@@ -8832,10 +8834,13 @@ void TC_LOG_MMAP::close()
|
||||
mysql_mutex_destroy(&pages[i].lock);
|
||||
mysql_cond_destroy(&pages[i].cond);
|
||||
}
|
||||
/* fall through */
|
||||
case 3:
|
||||
my_free(pages);
|
||||
/* fall through */
|
||||
case 2:
|
||||
my_munmap((char*)data, (size_t)file_length);
|
||||
/* fall through */
|
||||
case 1:
|
||||
mysql_file_close(fd, MYF(0));
|
||||
}
|
||||
|
@@ -8724,6 +8724,9 @@ mysql_getopt_value(const char *name, uint length,
|
||||
return (uchar**) &key_cache->changed_blocks_hash_size;
|
||||
}
|
||||
}
|
||||
/* We return in all cases above. Let us silence -Wimplicit-fallthrough */
|
||||
DBUG_ASSERT(0);
|
||||
/* fall through */
|
||||
case OPT_REPLICATE_DO_DB:
|
||||
case OPT_REPLICATE_DO_TABLE:
|
||||
case OPT_REPLICATE_IGNORE_DB:
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/* Copyright (c) 2000, 2011, Oracle and/or its affiliates.
|
||||
Copyright (c) 2008-2011 Monty Program Ab
|
||||
Copyright (c) 2008, 2017, MariaDB Corporation.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -1050,6 +1050,7 @@ static int maxmin_in_range(bool max_fl, Field* field, COND *cond)
|
||||
case Item_func::LT_FUNC:
|
||||
case Item_func::LE_FUNC:
|
||||
less_fl= 1;
|
||||
/* fall through */
|
||||
case Item_func::GT_FUNC:
|
||||
case Item_func::GE_FUNC:
|
||||
{
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/* Copyright (c) 2000, 2016, Oracle and/or its affiliates.
|
||||
Copyright (c) 2009, 2016, MariaDB
|
||||
Copyright (c) 2009, 2017, MariaDB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -5798,9 +5798,8 @@ static int queue_event(Master_info* mi,const char* buf, ulong event_len)
|
||||
mi->last_queued_gtid.seq_no == 1000)
|
||||
goto skip_relay_logging;
|
||||
});
|
||||
/* Fall through to default case ... */
|
||||
#endif
|
||||
|
||||
/* fall through */
|
||||
default:
|
||||
default_action:
|
||||
if (mi->using_gtid != Master_info::USE_GTID_NO && mi->gtid_event_seen)
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Copyright (c) 2002, 2016, Oracle and/or its affiliates.
|
||||
Copyright (c) 2011, 2016, MariaDB
|
||||
Copyright (c) 2011, 2017, MariaDB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -142,6 +142,7 @@ sp_get_item_value(THD *thd, Item *item, String *str)
|
||||
if (item->field_type() != MYSQL_TYPE_BIT)
|
||||
return item->val_str(str);
|
||||
else {/* Bit type is handled as binary string */}
|
||||
/* fall through */
|
||||
case STRING_RESULT:
|
||||
{
|
||||
String *result= item->val_str(str);
|
||||
|
@@ -1,4 +1,5 @@
|
||||
/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
Copyright (c) 2017, MariaDB Corporation.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -453,7 +454,8 @@ sql_digest_state* digest_add_token(sql_digest_state *state,
|
||||
}
|
||||
} while (found_unary);
|
||||
}
|
||||
/* fall through, for case NULL_SYM below */
|
||||
/* for case NULL_SYM below */
|
||||
/* fall through */
|
||||
case LEX_HOSTNAME:
|
||||
case TEXT_STRING:
|
||||
case NCHAR_STRING:
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/* Copyright (c) 2000, 2014, Oracle and/or its affiliates.
|
||||
Copyright (c) 2009, 2016, MariaDB
|
||||
Copyright (c) 2009, 2017, MariaDB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -1174,12 +1174,14 @@ static int lex_one_token(YYSTYPE *yylval, THD *thd)
|
||||
state= MY_LEX_HEX_NUMBER;
|
||||
break;
|
||||
}
|
||||
/* fall through */
|
||||
case MY_LEX_IDENT_OR_BIN:
|
||||
if (lip->yyPeek() == '\'')
|
||||
{ // Found b'bin-number'
|
||||
state= MY_LEX_BIN_NUMBER;
|
||||
break;
|
||||
}
|
||||
/* fall through */
|
||||
case MY_LEX_IDENT:
|
||||
const char *start;
|
||||
#if defined(USE_MB) && defined(USE_MB_IDENT)
|
||||
@@ -1527,6 +1529,7 @@ static int lex_one_token(YYSTYPE *yylval, THD *thd)
|
||||
break;
|
||||
}
|
||||
/* " used for strings */
|
||||
/* fall through */
|
||||
case MY_LEX_STRING: // Incomplete text string
|
||||
if (!(yylval->lex_str.str = get_text(lip, 1, 1)))
|
||||
{
|
||||
|
@@ -2518,8 +2518,8 @@ mysql_execute_command(THD *thd)
|
||||
MYF(0));
|
||||
goto error;
|
||||
}
|
||||
/* no break; fall through */
|
||||
}
|
||||
/* fall through */
|
||||
case SQLCOM_SHOW_STATUS_PROC:
|
||||
case SQLCOM_SHOW_STATUS_FUNC:
|
||||
case SQLCOM_SHOW_DATABASES:
|
||||
@@ -3323,8 +3323,8 @@ end_with_restore_list:
|
||||
/* mysql_update return 2 if we need to switch to multi-update */
|
||||
if (up_result != 2)
|
||||
break;
|
||||
/* Fall through */
|
||||
}
|
||||
/* Fall through */
|
||||
case SQLCOM_UPDATE_MULTI:
|
||||
{
|
||||
DBUG_ASSERT(first_table == all_tables && first_table != 0);
|
||||
@@ -3434,6 +3434,7 @@ end_with_restore_list:
|
||||
DBUG_PRINT("debug", ("Just after generate_incident()"));
|
||||
}
|
||||
#endif
|
||||
/* fall through */
|
||||
case SQLCOM_INSERT:
|
||||
{
|
||||
DBUG_ASSERT(first_table == all_tables && first_table != 0);
|
||||
@@ -4273,6 +4274,7 @@ end_with_restore_list:
|
||||
initialize this variable because RESET shares the same code as FLUSH
|
||||
*/
|
||||
lex->no_write_to_binlog= 1;
|
||||
/* fall through */
|
||||
case SQLCOM_FLUSH:
|
||||
{
|
||||
int write_to_binlog;
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Copyright (c) 2005, 2013, Oracle and/or its affiliates.
|
||||
Copyright (c) 2010, 2014, SkySQL Ab.
|
||||
Copyright (c) 2010, 2017, MariaDB Corporation.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -1816,8 +1816,8 @@ static bool plugin_load_list(MEM_ROOT *tmp_root, const char *list)
|
||||
switch ((*(p++)= *(list++))) {
|
||||
case '\0':
|
||||
list= NULL; /* terminate the loop */
|
||||
/* fall through */
|
||||
#ifndef __WIN__
|
||||
/* fall through */
|
||||
case ':': /* can't use this as delimiter as it may be drive letter */
|
||||
#endif
|
||||
case ';':
|
||||
@@ -1858,6 +1858,7 @@ static bool plugin_load_list(MEM_ROOT *tmp_root, const char *list)
|
||||
str->str= p;
|
||||
continue;
|
||||
}
|
||||
/* fall through */
|
||||
default:
|
||||
str->length++;
|
||||
continue;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/* Copyright (c) 2002, 2015, Oracle and/or its affiliates.
|
||||
Copyright (c) 2008, 2015, MariaDB
|
||||
Copyright (c) 2008, 2017, MariaDB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -2108,7 +2108,7 @@ static bool check_prepared_statement(Prepared_statement *stmt)
|
||||
/* mysql_test_update returns 2 if we need to switch to multi-update */
|
||||
if (res != 2)
|
||||
break;
|
||||
|
||||
/* fall through */
|
||||
case SQLCOM_UPDATE_MULTI:
|
||||
res= mysql_test_multiupdate(stmt, tables, res == 2);
|
||||
break;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/* Copyright (c) 2000, 2015, Oracle and/or its affiliates.
|
||||
Copyright (c) 2009, 2016, MariaDB
|
||||
Copyright (c) 2009, 2017, MariaDB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -983,6 +983,7 @@ public:
|
||||
is_handled= FALSE;
|
||||
break;
|
||||
}
|
||||
/* fall through */
|
||||
case ER_COLUMNACCESS_DENIED_ERROR:
|
||||
case ER_VIEW_NO_EXPLAIN: /* Error was anonymized, ignore all the same. */
|
||||
case ER_PROCACCESS_DENIED_ERROR:
|
||||
|
@@ -6851,7 +6851,8 @@ bool alter_table_manage_keys(TABLE *table, int indexes_were_disabled,
|
||||
case Alter_info::LEAVE_AS_IS:
|
||||
if (!indexes_were_disabled)
|
||||
break;
|
||||
/* fall-through: disabled indexes */
|
||||
/* disabled indexes */
|
||||
/* fall through */
|
||||
case Alter_info::DISABLE:
|
||||
error= table->file->ha_disable_indexes(HA_KEY_SWITCH_NONUNIQ_SAVE);
|
||||
}
|
||||
|
@@ -4681,9 +4681,11 @@ size_number:
|
||||
case 'g':
|
||||
case 'G':
|
||||
text_shift_number+=10;
|
||||
/* fall through */
|
||||
case 'm':
|
||||
case 'M':
|
||||
text_shift_number+=10;
|
||||
/* fall through */
|
||||
case 'k':
|
||||
case 'K':
|
||||
text_shift_number+=10;
|
||||
|
@@ -155,6 +155,7 @@ ARRAY::ARRAY(PGLOBAL g, int type, int size, int length, int prec)
|
||||
switch (type) {
|
||||
case TYPE_STRING:
|
||||
Len = length;
|
||||
/* fall through */
|
||||
case TYPE_SHORT:
|
||||
case TYPE_INT:
|
||||
case TYPE_DOUBLE:
|
||||
@@ -592,6 +593,7 @@ int ARRAY::Convert(PGLOBAL g, int k, PVAL vp)
|
||||
switch (Type) {
|
||||
case TYPE_DOUBLE:
|
||||
prec = 2;
|
||||
/* fall through */
|
||||
case TYPE_SHORT:
|
||||
case TYPE_INT:
|
||||
case TYPE_DATE:
|
||||
|
@@ -503,7 +503,8 @@ bool DBFFAM::OpenTableFile(PGLOBAL g)
|
||||
break;
|
||||
} // endif
|
||||
|
||||
// Selective delete, pass thru
|
||||
// Selective delete
|
||||
/* fall through */
|
||||
case MODE_UPDATE:
|
||||
UseTemp = Tdbp->IsUsingTemp(g);
|
||||
strcpy(opmode, (UseTemp) ? "rb" : "r+b");
|
||||
@@ -623,6 +624,7 @@ bool DBFFAM::AllocateBuffer(PGLOBAL g)
|
||||
case 'L': // Large (big) integer
|
||||
case 'T': // Tiny integer
|
||||
c = 'N'; // Numeric
|
||||
/* fall through */
|
||||
case 'N': // Numeric (integer)
|
||||
case 'F': // Float (double)
|
||||
descp->Decimals = (uchar)cdp->F.Prec;
|
||||
|
@@ -920,7 +920,8 @@ bool BGXFAM::OpenTableFile(PGLOBAL g)
|
||||
break;
|
||||
} // endif
|
||||
|
||||
// Selective delete, pass thru
|
||||
// Selective delete
|
||||
/* fall through */
|
||||
case MODE_UPDATE:
|
||||
UseTemp = Tdbp->IsUsingTemp(g);
|
||||
oflag |= (UseTemp) ? O_RDONLY : O_RDWR;
|
||||
|
@@ -574,6 +574,7 @@ bool DOSFAM::OpenTableFile(PGLOBAL g)
|
||||
|
||||
// Selective delete, pass thru
|
||||
Bin = true;
|
||||
/* fall through */
|
||||
case MODE_UPDATE:
|
||||
if ((UseTemp = Tdbp->IsUsingTemp(g))) {
|
||||
strcpy(opmode, "r");
|
||||
|
@@ -440,6 +440,7 @@ bool VCTFAM::OpenTableFile(PGLOBAL g)
|
||||
} // endif
|
||||
|
||||
// Selective delete, pass thru
|
||||
/* fall through */
|
||||
case MODE_UPDATE:
|
||||
UseTemp = Tdbp->IsUsingTemp(g);
|
||||
strcpy(opmode, (UseTemp) ? "rb" : "r+b");
|
||||
@@ -1919,6 +1920,7 @@ bool VECFAM::OpenTableFile(PGLOBAL g)
|
||||
} // endif filter
|
||||
|
||||
// Selective delete, pass thru
|
||||
/* fall through */
|
||||
case MODE_UPDATE:
|
||||
UseTemp = Tdbp->IsUsingTemp(g);
|
||||
strcpy(opmode, (UseTemp) ? "rb": "r+b");
|
||||
@@ -3586,6 +3588,7 @@ bool BGVFAM::OpenTableFile(PGLOBAL g)
|
||||
} // endif
|
||||
|
||||
// Selective delete, pass thru
|
||||
/* fall through */
|
||||
case MODE_UPDATE:
|
||||
UseTemp = Tdbp->IsUsingTemp(g);
|
||||
oflag = (UseTemp) ? O_RDONLY : O_RDWR;
|
||||
|
@@ -1193,7 +1193,7 @@ bool FILTER::Convert(PGLOBAL g, bool having)
|
||||
Arg(0) = pXVOID;
|
||||
} // endif void
|
||||
|
||||
// pass thru
|
||||
// fall through
|
||||
case OP_IN:
|
||||
// For IN operator do optimize if operand is an array
|
||||
if (GetArgType(1) != TYPE_ARRAY)
|
||||
@@ -1260,6 +1260,7 @@ bool FILTER::Eval(PGLOBAL g)
|
||||
} // endif Opm
|
||||
|
||||
// For modified operators, pass thru
|
||||
/* fall through */
|
||||
case OP_IN:
|
||||
case OP_EXIST:
|
||||
// For IN operations, special processing is done here
|
||||
|
@@ -1427,7 +1427,7 @@ void *ha_connect::GetColumnOption(PGLOBAL g, void *field, PCOLINFO pcf)
|
||||
case MYSQL_TYPE_VARCHAR:
|
||||
case MYSQL_TYPE_VAR_STRING:
|
||||
pcf->Flags |= U_VAR;
|
||||
/* no break */
|
||||
/* fall through */
|
||||
default:
|
||||
pcf->Type= MYSQLtoPLG(fp->type(), &v);
|
||||
break;
|
||||
@@ -2802,6 +2802,7 @@ PCFIL ha_connect::CheckCond(PGLOBAL g, PCFIL filp, const Item *cond)
|
||||
case Item_func::LIKE_FUNC: vop= OP_LIKE; break;
|
||||
case Item_func::ISNOTNULL_FUNC:
|
||||
neg = true;
|
||||
/* fall through */
|
||||
case Item_func::ISNULL_FUNC: vop= OP_NULL; break;
|
||||
case Item_func::IN_FUNC: vop= OP_IN;
|
||||
case Item_func::BETWEEN:
|
||||
@@ -4246,7 +4247,8 @@ bool ha_connect::check_privileges(THD *thd, PTOS options, char *dbn, bool quick)
|
||||
} else
|
||||
return false;
|
||||
|
||||
/* Fall through to check FILE_ACL */
|
||||
/* check FILE_ACL */
|
||||
/* fall through */
|
||||
case TAB_ODBC:
|
||||
case TAB_JDBC:
|
||||
case TAB_MYSQL:
|
||||
@@ -5475,16 +5477,16 @@ static int connect_assisted_discovery(handlerton *, THD* thd,
|
||||
supfnc |= (FNC_DRIVER | FNC_TABLE);
|
||||
break;
|
||||
#endif // JDBC_SUPPORT
|
||||
case TAB_DBF:
|
||||
dbf = true;
|
||||
// Passthru
|
||||
case TAB_CSV:
|
||||
if (!fn && fnc != FNC_NO)
|
||||
sprintf(g->Message, "Missing %s file name", topt->type);
|
||||
else if (sep && strlen(sep) > 1)
|
||||
sprintf(g->Message, "Invalid separator %s", sep);
|
||||
else
|
||||
ok = true;
|
||||
case TAB_DBF:
|
||||
dbf= true;
|
||||
// fall through
|
||||
case TAB_CSV:
|
||||
if (!fn && fnc != FNC_NO)
|
||||
sprintf(g->Message, "Missing %s file name", topt->type);
|
||||
else if (sep && strlen(sep) > 1)
|
||||
sprintf(g->Message, "Invalid separator %s", sep);
|
||||
else
|
||||
ok= true;
|
||||
|
||||
break;
|
||||
case TAB_MYSQL:
|
||||
|
@@ -507,7 +507,7 @@ PVAL ParseNumeric(PGLOBAL g, int& i, STRG& src)
|
||||
if (!has_e)
|
||||
goto err;
|
||||
|
||||
// passthru
|
||||
// fall through
|
||||
case '-':
|
||||
if (found_digit)
|
||||
goto err;
|
||||
@@ -797,7 +797,7 @@ bool JOUTSTR::Escape(const char *s)
|
||||
case '\r':
|
||||
case '\b':
|
||||
case '\f': WriteChr('\\');
|
||||
// passthru
|
||||
// fall through
|
||||
default:
|
||||
WriteChr(s[i]);
|
||||
break;
|
||||
|
@@ -915,7 +915,7 @@ int PlugCloseFile(PGLOBAL g __attribute__((unused)), PFBLOCK fp, bool all)
|
||||
|
||||
fp->Memory = NULL;
|
||||
fp->Mode = MODE_ANY;
|
||||
// Passthru
|
||||
// fall through
|
||||
case TYPE_FB_HANDLE:
|
||||
if (fp->Handle && fp->Handle != INVALID_HANDLE_VALUE)
|
||||
if (CloseFileHandle(fp->Handle))
|
||||
|
@@ -129,6 +129,7 @@ int RELDEF::GetSizeCatInfo(PCSZ what, PCSZ sdef)
|
||||
switch (toupper(c)) {
|
||||
case 'M':
|
||||
n *= 1024;
|
||||
// fall through
|
||||
case 'K':
|
||||
n *= 1024;
|
||||
} // endswitch c
|
||||
|
@@ -1309,6 +1309,7 @@ PBF TDBDOS::InitBlockFilter(PGLOBAL g, PFIL filp)
|
||||
} // endif !opm
|
||||
|
||||
// if opm, pass thru
|
||||
/* fall through */
|
||||
case OP_IN:
|
||||
if (filp->GetArgType(0) == TYPE_COLBLK &&
|
||||
filp->GetArgType(1) == TYPE_ARRAY) {
|
||||
|
@@ -1591,7 +1591,7 @@ void JSONCOL::WriteColumn(PGLOBAL g)
|
||||
break;
|
||||
} // endif Op
|
||||
|
||||
// Passthru
|
||||
// fall through
|
||||
case TYPE_DATE:
|
||||
case TYPE_INT:
|
||||
case TYPE_TINY:
|
||||
|
@@ -118,7 +118,7 @@ ulonglong CharToNumber(const char *p, int n, ulonglong maxval,
|
||||
maxval++;
|
||||
if (minus) *minus = true;
|
||||
} // endif Unsigned
|
||||
|
||||
/* fall through */
|
||||
case '+':
|
||||
p++;
|
||||
break;
|
||||
|
@@ -464,7 +464,7 @@ bool XINDEX::Make(PGLOBAL g, PIXDEF sxp)
|
||||
if (ApplyFilter(g, filp))
|
||||
break;
|
||||
|
||||
// passthru
|
||||
// fall through
|
||||
case RC_NF:
|
||||
continue;
|
||||
case RC_EF:
|
||||
|
@@ -408,7 +408,7 @@ bool STRING::Append_quoted(PCSZ s)
|
||||
case '\r':
|
||||
case '\b':
|
||||
case '\f': b |= Append('\\');
|
||||
// passthru
|
||||
// fall through
|
||||
default:
|
||||
b |= Append(*p);
|
||||
break;
|
||||
|
@@ -1,4 +1,5 @@
|
||||
/* Copyright (c) 2004, 2015, Oracle and/or its affiliates.
|
||||
Copyright (c) 2017, MariaDB Corporation.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -2952,6 +2953,7 @@ int ha_federated::extra(ha_extra_function operation)
|
||||
break;
|
||||
case HA_EXTRA_PREPARE_FOR_DROP:
|
||||
table_will_be_deleted = TRUE;
|
||||
break;
|
||||
default:
|
||||
/* do nothing */
|
||||
DBUG_PRINT("info",("unhandled operation: %d", (uint) operation));
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/* Copyright (c) 2000, 2011, Oracle and/or its affiliates.
|
||||
Copyright (c) 2010, 2014, SkySQL Ab.
|
||||
Copyright (c) 2010, 2017, MariaDB Corporation.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -94,7 +94,7 @@ int heap_create(const char *name, HP_CREATE_INFO *create_info,
|
||||
case HA_KEYTYPE_VARBINARY1:
|
||||
/* Case-insensitiveness is handled in coll->hash_sort */
|
||||
keyinfo->seg[j].type= HA_KEYTYPE_VARTEXT1;
|
||||
/* fall_through */
|
||||
/* fall through */
|
||||
case HA_KEYTYPE_VARTEXT1:
|
||||
keyinfo->flag|= HA_VAR_LENGTH_KEY;
|
||||
length+= 2;
|
||||
|
@@ -3,6 +3,7 @@
|
||||
Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2008, Google Inc.
|
||||
Copyright (c) 2012, Facebook Inc.
|
||||
Copyright (c) 2017, MariaDB Corporation.
|
||||
|
||||
Portions of this file contain modifications contributed and copyrighted by
|
||||
Google, Inc. Those modifications are gratefully acknowledged and are described
|
||||
@@ -1163,18 +1164,21 @@ btr_cur_ins_lock_and_undo(
|
||||
index, thr, mtr, inherit);
|
||||
|
||||
if (err != DB_SUCCESS
|
||||
|| !(~flags | (BTR_NO_UNDO_LOG_FLAG | BTR_KEEP_SYS_FLAG))
|
||||
|| !dict_index_is_clust(index) || dict_index_is_ibuf(index)) {
|
||||
|
||||
return(err);
|
||||
}
|
||||
|
||||
err = trx_undo_report_row_operation(flags, TRX_UNDO_INSERT_OP,
|
||||
thr, index, entry,
|
||||
NULL, 0, NULL, NULL,
|
||||
&roll_ptr);
|
||||
if (err != DB_SUCCESS) {
|
||||
|
||||
return(err);
|
||||
if (flags & BTR_NO_UNDO_LOG_FLAG) {
|
||||
roll_ptr = 0;
|
||||
} else {
|
||||
err = trx_undo_report_row_operation(thr, index, entry,
|
||||
NULL, 0, NULL, NULL,
|
||||
&roll_ptr);
|
||||
if (err != DB_SUCCESS) {
|
||||
return(err);
|
||||
}
|
||||
}
|
||||
|
||||
/* Now we can fill in the roll ptr field in entry */
|
||||
@@ -1223,15 +1227,17 @@ btr_cur_optimistic_insert(
|
||||
btr_cur_t* cursor, /*!< in: cursor on page after which to insert;
|
||||
cursor stays valid */
|
||||
ulint** offsets,/*!< out: offsets on *rec */
|
||||
mem_heap_t** heap, /*!< in/out: pointer to memory heap, or NULL */
|
||||
mem_heap_t** heap, /*!< in/out: pointer to memory heap */
|
||||
dtuple_t* entry, /*!< in/out: entry to insert */
|
||||
rec_t** rec, /*!< out: pointer to inserted record if
|
||||
succeed */
|
||||
big_rec_t** big_rec,/*!< out: big rec vector whose fields have to
|
||||
be stored externally by the caller, or
|
||||
NULL */
|
||||
be stored externally by the caller */
|
||||
ulint n_ext, /*!< in: number of externally stored columns */
|
||||
que_thr_t* thr, /*!< in: query thread or NULL */
|
||||
que_thr_t* thr, /*!< in/out: query thread; can be NULL if
|
||||
!(~flags
|
||||
& (BTR_NO_LOCKING_FLAG
|
||||
| BTR_NO_UNDO_LOG_FLAG)) */
|
||||
mtr_t* mtr) /*!< in/out: mini-transaction;
|
||||
if this function returns DB_SUCCESS on
|
||||
a leaf page of a secondary index in a
|
||||
@@ -1252,6 +1258,7 @@ btr_cur_optimistic_insert(
|
||||
ulint rec_size;
|
||||
dberr_t err;
|
||||
|
||||
ut_ad(thr || !(~flags & (BTR_NO_LOCKING_FLAG | BTR_NO_UNDO_LOG_FLAG)));
|
||||
*big_rec = NULL;
|
||||
|
||||
block = btr_cur_get_block(cursor);
|
||||
@@ -1510,15 +1517,17 @@ btr_cur_pessimistic_insert(
|
||||
cursor stays valid */
|
||||
ulint** offsets,/*!< out: offsets on *rec */
|
||||
mem_heap_t** heap, /*!< in/out: pointer to memory heap
|
||||
that can be emptied, or NULL */
|
||||
that can be emptied */
|
||||
dtuple_t* entry, /*!< in/out: entry to insert */
|
||||
rec_t** rec, /*!< out: pointer to inserted record if
|
||||
succeed */
|
||||
big_rec_t** big_rec,/*!< out: big rec vector whose fields have to
|
||||
be stored externally by the caller, or
|
||||
NULL */
|
||||
be stored externally by the caller */
|
||||
ulint n_ext, /*!< in: number of externally stored columns */
|
||||
que_thr_t* thr, /*!< in: query thread or NULL */
|
||||
que_thr_t* thr, /*!< in/out: query thread; can be NULL if
|
||||
!(~flags
|
||||
& (BTR_NO_LOCKING_FLAG
|
||||
| BTR_NO_UNDO_LOG_FLAG)) */
|
||||
mtr_t* mtr) /*!< in/out: mini-transaction */
|
||||
{
|
||||
dict_index_t* index = cursor->index;
|
||||
@@ -1530,6 +1539,7 @@ btr_cur_pessimistic_insert(
|
||||
ulint n_reserved = 0;
|
||||
|
||||
ut_ad(dtuple_check_typed(entry));
|
||||
ut_ad(thr || !(~flags & (BTR_NO_LOCKING_FLAG | BTR_NO_UNDO_LOG_FLAG)));
|
||||
|
||||
*big_rec = NULL;
|
||||
|
||||
@@ -1705,9 +1715,10 @@ btr_cur_upd_lock_and_undo(
|
||||
|
||||
/* Append the info about the update in the undo log */
|
||||
|
||||
return(trx_undo_report_row_operation(
|
||||
flags, TRX_UNDO_MODIFY_OP, thr,
|
||||
index, NULL, update,
|
||||
return((flags & BTR_NO_UNDO_LOG_FLAG)
|
||||
? DB_SUCCESS
|
||||
: trx_undo_report_row_operation(
|
||||
thr, index, NULL, update,
|
||||
cmpl_info, rec, offsets, roll_ptr));
|
||||
}
|
||||
|
||||
@@ -2426,12 +2437,12 @@ btr_cur_pessimistic_update(
|
||||
ulint** offsets,/*!< out: offsets on cursor->page_cur.rec */
|
||||
mem_heap_t** offsets_heap,
|
||||
/*!< in/out: pointer to memory heap
|
||||
that can be emptied, or NULL */
|
||||
that can be emptied */
|
||||
mem_heap_t* entry_heap,
|
||||
/*!< in/out: memory heap for allocating
|
||||
big_rec and the index tuple */
|
||||
big_rec_t** big_rec,/*!< out: big rec vector whose fields have to
|
||||
be stored externally by the caller, or NULL */
|
||||
be stored externally by the caller */
|
||||
const upd_t* update, /*!< in: update vector; this is allowed also
|
||||
contain trx id and roll ptr fields, but
|
||||
the values in update vector have no effect */
|
||||
@@ -2978,7 +2989,7 @@ btr_cur_del_mark_set_clust_rec(
|
||||
return(err);
|
||||
}
|
||||
|
||||
err = trx_undo_report_row_operation(0, TRX_UNDO_MODIFY_OP, thr,
|
||||
err = trx_undo_report_row_operation(thr,
|
||||
index, NULL, NULL, 0, rec, offsets,
|
||||
&roll_ptr);
|
||||
if (err != DB_SUCCESS) {
|
||||
|
@@ -2,6 +2,7 @@
|
||||
|
||||
Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2008, Google Inc.
|
||||
Copyright (c) 2017, MariaDB Corporation.
|
||||
|
||||
Portions of this file contain modifications contributed and copyrighted by
|
||||
Google, Inc. Those modifications are gratefully acknowledged and are described
|
||||
@@ -1343,8 +1344,6 @@ buf_pool_init_instance(
|
||||
buf_pool->chunks = chunk =
|
||||
(buf_chunk_t*) mem_zalloc(sizeof *chunk);
|
||||
|
||||
UT_LIST_INIT(buf_pool->free);
|
||||
|
||||
if (!buf_chunk_init(buf_pool, chunk, buf_pool_size)) {
|
||||
mem_free(chunk);
|
||||
mem_free(buf_pool);
|
||||
|
@@ -1547,8 +1547,6 @@ fil_init(
|
||||
fil_system->spaces = hash_create(hash_size);
|
||||
fil_system->name_hash = hash_create(hash_size);
|
||||
|
||||
UT_LIST_INIT(fil_system->LRU);
|
||||
|
||||
fil_system->max_n_open = max_n_open;
|
||||
}
|
||||
|
||||
@@ -2274,14 +2272,12 @@ fil_op_log_parse_or_replay(
|
||||
} else if (log_flags & MLOG_FILE_FLAG_TEMP) {
|
||||
/* Temporary table, do nothing */
|
||||
} else {
|
||||
const char* path = NULL;
|
||||
|
||||
/* Create the database directory for name, if it does
|
||||
not exist yet */
|
||||
fil_create_directory_for_tablename(name);
|
||||
|
||||
if (fil_create_new_single_table_tablespace(
|
||||
space_id, name, path, flags,
|
||||
space_id, name, NULL, flags,
|
||||
DICT_TF2_USE_TABLESPACE,
|
||||
FIL_IBD_FILE_INITIAL_SIZE) != DB_SUCCESS) {
|
||||
ut_error;
|
||||
|
@@ -1321,19 +1321,6 @@ thd_is_replication_slave_thread(
|
||||
return((ibool) thd_slave_thread(thd));
|
||||
}
|
||||
|
||||
/******************************************************************//**
|
||||
Gets information on the durability property requested by thread.
|
||||
Used when writing either a prepare or commit record to the log
|
||||
buffer. @return the durability property. */
|
||||
UNIV_INTERN
|
||||
enum durability_properties
|
||||
thd_requested_durability(
|
||||
/*=====================*/
|
||||
const THD* thd) /*!< in: thread handle */
|
||||
{
|
||||
return(thd_get_durability_property(thd));
|
||||
}
|
||||
|
||||
/******************************************************************//**
|
||||
Returns true if transaction should be flagged as read-only.
|
||||
@return true if the thd is marked as read-only */
|
||||
@@ -1998,15 +1985,11 @@ innobase_get_stmt(
|
||||
THD* thd, /*!< in: MySQL thread handle */
|
||||
size_t* length) /*!< out: length of the SQL statement */
|
||||
{
|
||||
const char* query = NULL;
|
||||
LEX_STRING *stmt = NULL;
|
||||
ut_ad(thd != NULL);
|
||||
stmt = thd_query_string(thd);
|
||||
if (stmt) {
|
||||
if (const LEX_STRING *stmt = thd_query_string(thd)) {
|
||||
*length = stmt->length;
|
||||
query = stmt->str;
|
||||
return stmt->str;
|
||||
}
|
||||
return (query);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**********************************************************************//**
|
||||
@@ -7063,8 +7046,8 @@ ha_innobase::innobase_lock_autoinc(void)
|
||||
break;
|
||||
}
|
||||
}
|
||||
/* Fall through to old style locking. */
|
||||
|
||||
/* Use old style locking. */
|
||||
/* fall through */
|
||||
case AUTOINC_OLD_STYLE_LOCKING:
|
||||
DBUG_EXECUTE_IF("die_if_autoinc_old_lock_style_used",
|
||||
ut_ad(0););
|
||||
@@ -7523,8 +7506,8 @@ calc_row_difference(
|
||||
}
|
||||
}
|
||||
|
||||
if (o_len != n_len || (o_len != UNIV_SQL_NULL &&
|
||||
0 != memcmp(o_ptr, n_ptr, o_len))) {
|
||||
if (o_len != n_len || (o_len != 0 && o_len != UNIV_SQL_NULL
|
||||
&& 0 != memcmp(o_ptr, n_ptr, o_len))) {
|
||||
/* The field has changed */
|
||||
|
||||
ufield = uvect->fields + n_changed;
|
||||
@@ -9725,7 +9708,8 @@ create_options_are_invalid(
|
||||
case ROW_TYPE_DYNAMIC:
|
||||
CHECK_ERROR_ROW_TYPE_NEEDS_FILE_PER_TABLE(use_tablespace);
|
||||
CHECK_ERROR_ROW_TYPE_NEEDS_GT_ANTELOPE;
|
||||
/* fall through since dynamic also shuns KBS */
|
||||
/* ROW_FORMAT=DYNAMIC also shuns KEY_BLOCK_SIZE */
|
||||
/* fall through */
|
||||
case ROW_TYPE_COMPACT:
|
||||
case ROW_TYPE_REDUNDANT:
|
||||
if (kbs_specified) {
|
||||
@@ -10111,7 +10095,8 @@ index_bad:
|
||||
break;
|
||||
}
|
||||
zip_allowed = FALSE;
|
||||
/* fall through to set row_format = COMPACT */
|
||||
/* Set ROW_FORMAT = COMPACT */
|
||||
/* fall through */
|
||||
case ROW_TYPE_NOT_USED:
|
||||
case ROW_TYPE_FIXED:
|
||||
case ROW_TYPE_PAGE:
|
||||
@@ -10119,6 +10104,7 @@ index_bad:
|
||||
thd, Sql_condition::WARN_LEVEL_WARN,
|
||||
ER_ILLEGAL_HA_CREATE_OPTION,
|
||||
"InnoDB: assuming ROW_FORMAT=COMPACT.");
|
||||
/* fall through */
|
||||
case ROW_TYPE_DEFAULT:
|
||||
/* If we fell through, set row format to Compact. */
|
||||
row_format = ROW_TYPE_COMPACT;
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2013, 2016, MariaDB Corporation.
|
||||
Copyright (c) 2013, 2017, MariaDB Corporation.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
@@ -476,7 +476,7 @@ innobase_index_name_is_reserved(
|
||||
const KEY* key_info, /*!< in: Indexes to be created */
|
||||
ulint num_of_keys) /*!< in: Number of indexes to
|
||||
be created. */
|
||||
MY_ATTRIBUTE((nonnull, warn_unused_result));
|
||||
MY_ATTRIBUTE((nonnull(1), warn_unused_result));
|
||||
|
||||
/*****************************************************************//**
|
||||
Determines InnoDB table flags.
|
||||
|
@@ -1,6 +1,7 @@
|
||||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 2005, 2016, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2017, MariaDB Corporation.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
@@ -2277,10 +2278,10 @@ online_retry_drop_indexes_with_trx(
|
||||
@param drop_fk constraints being dropped
|
||||
@param n_drop_fk number of constraints that are being dropped
|
||||
@return whether the constraint is being dropped */
|
||||
inline MY_ATTRIBUTE((pure, nonnull, warn_unused_result))
|
||||
MY_ATTRIBUTE((pure, nonnull(1), warn_unused_result))
|
||||
inline
|
||||
bool
|
||||
innobase_dropping_foreign(
|
||||
/*======================*/
|
||||
const dict_foreign_t* foreign,
|
||||
dict_foreign_t** drop_fk,
|
||||
ulint n_drop_fk)
|
||||
@@ -2304,10 +2305,10 @@ column that is being dropped or modified to NOT NULL.
|
||||
@retval true Not allowed (will call my_error())
|
||||
@retval false Allowed
|
||||
*/
|
||||
static MY_ATTRIBUTE((pure, nonnull, warn_unused_result))
|
||||
MY_ATTRIBUTE((pure, nonnull(1,4), warn_unused_result))
|
||||
static
|
||||
bool
|
||||
innobase_check_foreigns_low(
|
||||
/*========================*/
|
||||
const dict_table_t* user_table,
|
||||
dict_foreign_t** drop_fk,
|
||||
ulint n_drop_fk,
|
||||
@@ -2404,10 +2405,10 @@ column that is being dropped or modified to NOT NULL.
|
||||
@retval true Not allowed (will call my_error())
|
||||
@retval false Allowed
|
||||
*/
|
||||
static MY_ATTRIBUTE((pure, nonnull, warn_unused_result))
|
||||
MY_ATTRIBUTE((pure, nonnull(1,2,3,4), warn_unused_result))
|
||||
static
|
||||
bool
|
||||
innobase_check_foreigns(
|
||||
/*====================*/
|
||||
Alter_inplace_info* ha_alter_info,
|
||||
const TABLE* altered_table,
|
||||
const TABLE* old_table,
|
||||
|
@@ -1,6 +1,7 @@
|
||||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2017, MariaDB Corporation.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
@@ -2894,8 +2895,7 @@ ibuf_get_volume_buffered_hash(
|
||||
fold = ut_fold_binary(data, len);
|
||||
|
||||
hash += (fold / (CHAR_BIT * sizeof *hash)) % size;
|
||||
bitmask = static_cast<ulint>(
|
||||
1 << (fold % (CHAR_BIT * sizeof(*hash))));
|
||||
bitmask = static_cast<ulint>(1) << (fold % (CHAR_BIT * sizeof(*hash)));
|
||||
|
||||
if (*hash & bitmask) {
|
||||
|
||||
@@ -3662,7 +3662,7 @@ fail_exit:
|
||||
|
||||
if (mode == BTR_MODIFY_PREV) {
|
||||
err = btr_cur_optimistic_insert(
|
||||
BTR_NO_LOCKING_FLAG,
|
||||
BTR_NO_LOCKING_FLAG | BTR_NO_UNDO_LOG_FLAG,
|
||||
cursor, &offsets, &offsets_heap,
|
||||
ibuf_entry, &ins_rec,
|
||||
&dummy_big_rec, 0, thr, &mtr);
|
||||
|
@@ -1,6 +1,7 @@
|
||||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2017, MariaDB Corporation.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
@@ -220,15 +221,17 @@ btr_cur_optimistic_insert(
|
||||
btr_cur_t* cursor, /*!< in: cursor on page after which to insert;
|
||||
cursor stays valid */
|
||||
ulint** offsets,/*!< out: offsets on *rec */
|
||||
mem_heap_t** heap, /*!< in/out: pointer to memory heap, or NULL */
|
||||
mem_heap_t** heap, /*!< in/out: pointer to memory heap */
|
||||
dtuple_t* entry, /*!< in/out: entry to insert */
|
||||
rec_t** rec, /*!< out: pointer to inserted record if
|
||||
succeed */
|
||||
big_rec_t** big_rec,/*!< out: big rec vector whose fields have to
|
||||
be stored externally by the caller, or
|
||||
NULL */
|
||||
be stored externally by the caller */
|
||||
ulint n_ext, /*!< in: number of externally stored columns */
|
||||
que_thr_t* thr, /*!< in: query thread or NULL */
|
||||
que_thr_t* thr, /*!< in/out: query thread; can be NULL if
|
||||
!(~flags
|
||||
& (BTR_NO_LOCKING_FLAG
|
||||
| BTR_NO_UNDO_LOG_FLAG)) */
|
||||
mtr_t* mtr) /*!< in/out: mini-transaction;
|
||||
if this function returns DB_SUCCESS on
|
||||
a leaf page of a secondary index in a
|
||||
@@ -256,15 +259,17 @@ btr_cur_pessimistic_insert(
|
||||
cursor stays valid */
|
||||
ulint** offsets,/*!< out: offsets on *rec */
|
||||
mem_heap_t** heap, /*!< in/out: pointer to memory heap
|
||||
that can be emptied, or NULL */
|
||||
that can be emptied */
|
||||
dtuple_t* entry, /*!< in/out: entry to insert */
|
||||
rec_t** rec, /*!< out: pointer to inserted record if
|
||||
succeed */
|
||||
big_rec_t** big_rec,/*!< out: big rec vector whose fields have to
|
||||
be stored externally by the caller, or
|
||||
NULL */
|
||||
be stored externally by the caller */
|
||||
ulint n_ext, /*!< in: number of externally stored columns */
|
||||
que_thr_t* thr, /*!< in: query thread or NULL */
|
||||
que_thr_t* thr, /*!< in/out: query thread; can be NULL if
|
||||
!(~flags
|
||||
& (BTR_NO_LOCKING_FLAG
|
||||
| BTR_NO_UNDO_LOG_FLAG)) */
|
||||
mtr_t* mtr) /*!< in/out: mini-transaction */
|
||||
MY_ATTRIBUTE((nonnull(2,3,4,5,6,7,10), warn_unused_result));
|
||||
/*************************************************************//**
|
||||
@@ -390,12 +395,12 @@ btr_cur_pessimistic_update(
|
||||
ulint** offsets,/*!< out: offsets on cursor->page_cur.rec */
|
||||
mem_heap_t** offsets_heap,
|
||||
/*!< in/out: pointer to memory heap
|
||||
that can be emptied, or NULL */
|
||||
that can be emptied */
|
||||
mem_heap_t* entry_heap,
|
||||
/*!< in/out: memory heap for allocating
|
||||
big_rec and the index tuple */
|
||||
big_rec_t** big_rec,/*!< out: big rec vector whose fields have to
|
||||
be stored externally by the caller, or NULL */
|
||||
be stored externally by the caller */
|
||||
const upd_t* update, /*!< in: update vector; this is allowed also
|
||||
contain trx id and roll ptr fields, but
|
||||
the values in update vector have no effect */
|
||||
|
@@ -1,6 +1,7 @@
|
||||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2017, MariaDB Corporation.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
@@ -574,7 +575,8 @@ dtype_get_fixed_size_low(
|
||||
#else /* !UNIV_HOTBACKUP */
|
||||
return(len);
|
||||
#endif /* !UNIV_HOTBACKUP */
|
||||
/* fall through for variable-length charsets */
|
||||
/* Treat as variable-length. */
|
||||
/* Fall through */
|
||||
case DATA_VARCHAR:
|
||||
case DATA_BINARY:
|
||||
case DATA_DECIMAL:
|
||||
|
@@ -782,7 +782,7 @@ fil_create_new_single_table_tablespace(
|
||||
ulint size) /*!< in: the initial size of the
|
||||
tablespace file in pages,
|
||||
must be >= FIL_IBD_FILE_INITIAL_SIZE */
|
||||
MY_ATTRIBUTE((nonnull, warn_unused_result));
|
||||
MY_ATTRIBUTE((nonnull(2), warn_unused_result));
|
||||
#ifndef UNIV_HOTBACKUP
|
||||
/********************************************************************//**
|
||||
Tries to open a single-table tablespace and optionally checks the space id is
|
||||
|
@@ -126,18 +126,6 @@ thd_is_replication_slave_thread(
|
||||
/*============================*/
|
||||
THD* thd); /*!< in: thread handle */
|
||||
|
||||
/******************************************************************//**
|
||||
Gets information on the durability property requested by thread.
|
||||
Used when writing either a prepare or commit record to the log
|
||||
buffer.
|
||||
@return the durability property. */
|
||||
UNIV_INTERN
|
||||
enum durability_properties
|
||||
thd_requested_durability(
|
||||
/*=====================*/
|
||||
const THD* thd) /*!< in: thread handle */
|
||||
MY_ATTRIBUTE((nonnull, warn_unused_result));
|
||||
|
||||
/******************************************************************//**
|
||||
Returns true if the transaction this thread is processing has edited
|
||||
non-transactional tables. Used by the deadlock detector when deciding
|
||||
|
@@ -1,6 +1,7 @@
|
||||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 1995, 2009, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2017, MariaDB Corporation.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
@@ -787,13 +788,13 @@ mach_swap_byte_order(
|
||||
dest += len;
|
||||
|
||||
switch (len & 0x7) {
|
||||
case 0: *--dest = *from++;
|
||||
case 7: *--dest = *from++;
|
||||
case 6: *--dest = *from++;
|
||||
case 5: *--dest = *from++;
|
||||
case 4: *--dest = *from++;
|
||||
case 3: *--dest = *from++;
|
||||
case 2: *--dest = *from++;
|
||||
case 0: *--dest = *from++; /* fall through */
|
||||
case 7: *--dest = *from++; /* fall through */
|
||||
case 6: *--dest = *from++; /* fall through */
|
||||
case 5: *--dest = *from++; /* fall through */
|
||||
case 4: *--dest = *from++; /* fall through */
|
||||
case 3: *--dest = *from++; /* fall through */
|
||||
case 2: *--dest = *from++; /* fall through */
|
||||
case 1: *--dest = *from;
|
||||
}
|
||||
}
|
||||
|
@@ -2,6 +2,7 @@
|
||||
|
||||
Copyright (c) 2005, 2013, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2012, Facebook Inc.
|
||||
Copyright (c) 2017, MariaDB Corporation.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
@@ -172,7 +173,8 @@ page_zip_rec_needs_ext(
|
||||
ignored if zip_size == 0 */
|
||||
ulint zip_size) /*!< in: compressed page size in bytes, or 0 */
|
||||
{
|
||||
ut_ad(rec_size > comp ? REC_N_NEW_EXTRA_BYTES : REC_N_OLD_EXTRA_BYTES);
|
||||
ut_ad(rec_size
|
||||
> (comp ? REC_N_NEW_EXTRA_BYTES : REC_N_OLD_EXTRA_BYTES));
|
||||
ut_ad(ut_is_2pow(zip_size));
|
||||
ut_ad(comp || !zip_size);
|
||||
|
||||
|
@@ -1,6 +1,7 @@
|
||||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2017, MariaDB Corporation.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
@@ -212,10 +213,6 @@ UNIV_INTERN
|
||||
dberr_t
|
||||
trx_undo_report_row_operation(
|
||||
/*==========================*/
|
||||
ulint flags, /*!< in: if BTR_NO_UNDO_LOG_FLAG bit is
|
||||
set, does nothing */
|
||||
ulint op_type, /*!< in: TRX_UNDO_INSERT_OP or
|
||||
TRX_UNDO_MODIFY_OP */
|
||||
que_thr_t* thr, /*!< in: query thread */
|
||||
dict_index_t* index, /*!< in: clustered index */
|
||||
const dtuple_t* clust_entry, /*!< in: in the case of an insert,
|
||||
@@ -233,7 +230,7 @@ trx_undo_report_row_operation(
|
||||
inserted undo log record,
|
||||
0 if BTR_NO_UNDO_LOG
|
||||
flag was specified */
|
||||
MY_ATTRIBUTE((nonnull(3,4,10), warn_unused_result));
|
||||
MY_ATTRIBUTE((nonnull(1,2,8), warn_unused_result));
|
||||
/******************************************************************//**
|
||||
Copies an undo record to heap. This function can be called if we know that
|
||||
the undo log record exists.
|
||||
@@ -313,10 +310,6 @@ record */
|
||||
storage fields: used by purge to
|
||||
free the external storage */
|
||||
|
||||
/* Operation type flags used in trx_undo_report_row_operation */
|
||||
#define TRX_UNDO_INSERT_OP 1
|
||||
#define TRX_UNDO_MODIFY_OP 2
|
||||
|
||||
#ifndef UNIV_NONINL
|
||||
#include "trx0rec.ic"
|
||||
#endif
|
||||
|
@@ -1,6 +1,7 @@
|
||||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 1994, 2009, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2017, MariaDB Corporation.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
@@ -237,16 +238,22 @@ ut_fold_binary(
|
||||
switch (len & 0x7) {
|
||||
case 7:
|
||||
fold = ut_fold_ulint_pair(fold, (ulint)(*str++));
|
||||
/* fall through */
|
||||
case 6:
|
||||
fold = ut_fold_ulint_pair(fold, (ulint)(*str++));
|
||||
/* fall through */
|
||||
case 5:
|
||||
fold = ut_fold_ulint_pair(fold, (ulint)(*str++));
|
||||
/* fall through */
|
||||
case 4:
|
||||
fold = ut_fold_ulint_pair(fold, (ulint)(*str++));
|
||||
/* fall through */
|
||||
case 3:
|
||||
fold = ut_fold_ulint_pair(fold, (ulint)(*str++));
|
||||
/* fall through */
|
||||
case 2:
|
||||
fold = ut_fold_ulint_pair(fold, (ulint)(*str++));
|
||||
/* fall through */
|
||||
case 1:
|
||||
fold = ut_fold_ulint_pair(fold, (ulint)(*str++));
|
||||
}
|
||||
|
@@ -4742,13 +4742,11 @@ lock_rec_unlock(
|
||||
trx_mutex_exit(trx);
|
||||
|
||||
stmt = innobase_get_stmt(trx->mysql_thd, &stmt_len);
|
||||
ut_print_timestamp(stderr);
|
||||
fprintf(stderr,
|
||||
" InnoDB: Error: unlock row could not"
|
||||
" find a %lu mode lock on the record\n",
|
||||
(ulong) lock_mode);
|
||||
ut_print_timestamp(stderr);
|
||||
fprintf(stderr, " InnoDB: current statement: %.*s\n",
|
||||
|
||||
ib_logf(IB_LOG_LEVEL_ERROR,
|
||||
"unlock row could not find a %u mode lock on the record;"
|
||||
" statement=%.*s",
|
||||
lock_mode,
|
||||
(int) stmt_len, stmt);
|
||||
|
||||
return;
|
||||
|
@@ -2,6 +2,7 @@
|
||||
|
||||
Copyright (c) 2005, 2016, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2012, Facebook Inc.
|
||||
Copyright (c) 2017, MariaDB Corporation.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
@@ -68,8 +69,8 @@ using namespace std;
|
||||
# define buf_LRU_stat_inc_unzip() ((void) 0)
|
||||
#endif /* !UNIV_HOTBACKUP */
|
||||
|
||||
#ifndef UNIV_HOTBACKUP
|
||||
#ifndef UNIV_INNOCHECKSUM
|
||||
#ifndef UNIV_HOTBACKUP
|
||||
/** Statistics on compression, indexed by page_zip_des_t::ssize - 1 */
|
||||
UNIV_INTERN page_zip_stat_t page_zip_stat[PAGE_ZIP_SSIZE_MAX];
|
||||
/** Statistics on compression, indexed by index->id */
|
||||
@@ -79,7 +80,6 @@ UNIV_INTERN ib_mutex_t page_zip_stat_per_index_mutex;
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
UNIV_INTERN mysql_pfs_key_t page_zip_stat_per_index_mutex_key;
|
||||
#endif /* HAVE_PSI_INTERFACE */
|
||||
#endif /* !UNIV_INNOCHECKSUM */
|
||||
#endif /* !UNIV_HOTBACKUP */
|
||||
|
||||
/* Compression level to be used by zlib. Settable by user. */
|
||||
@@ -128,7 +128,6 @@ Compare at most sizeof(field_ref_zero) bytes.
|
||||
|
||||
/* Enable some extra debugging output. This code can be enabled
|
||||
independently of any UNIV_ debugging conditions. */
|
||||
#ifndef UNIV_INNOCHECKSUM
|
||||
#if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUG
|
||||
# include <stdarg.h>
|
||||
MY_ATTRIBUTE((format (printf, 1, 2)))
|
||||
|
@@ -1285,8 +1285,10 @@ rec_convert_dtuple_to_rec_comp(
|
||||
}
|
||||
}
|
||||
|
||||
memcpy(end, dfield_get_data(field), len);
|
||||
end += len;
|
||||
if (len) {
|
||||
memcpy(end, dfield_get_data(field), len);
|
||||
end += len;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1,6 +1,7 @@
|
||||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 2010, 2016, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2017, MariaDB Corporation.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
@@ -225,9 +226,6 @@ row_fts_psort_info_init(
|
||||
each parallel sort thread. Each "sort bucket" holds records for
|
||||
a particular "FTS index partition" */
|
||||
for (j = 0; j < fts_sort_pll_degree; j++) {
|
||||
|
||||
UT_LIST_INIT(psort_info[j].fts_doc_list);
|
||||
|
||||
for (i = 0; i < FTS_NUM_AUX_INDEX; i++) {
|
||||
|
||||
psort_info[j].merge_file[i] =
|
||||
|
@@ -2018,6 +2018,7 @@ PageConverter::update_page(
|
||||
case FIL_PAGE_TYPE_XDES:
|
||||
err = set_current_xdes(
|
||||
buf_block_get_page_no(block), get_frame(block));
|
||||
/* fall through */
|
||||
case FIL_PAGE_INODE:
|
||||
case FIL_PAGE_TYPE_TRX_SYS:
|
||||
case FIL_PAGE_IBUF_FREE_LIST:
|
||||
|
@@ -1,6 +1,7 @@
|
||||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2017, MariaDB Corporation.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
@@ -2121,14 +2122,10 @@ for a clustered index!
|
||||
@retval DB_SUCCESS if no error
|
||||
@retval DB_DUPLICATE_KEY if error,
|
||||
@retval DB_LOCK_WAIT if we have to wait for a lock on a possible duplicate
|
||||
record
|
||||
@retval DB_SUCCESS_LOCKED_REC if an exact match of the record was found
|
||||
in online table rebuild (flags & (BTR_KEEP_SYS_FLAG | BTR_NO_LOCKING_FLAG)) */
|
||||
record */
|
||||
static MY_ATTRIBUTE((nonnull, warn_unused_result))
|
||||
dberr_t
|
||||
row_ins_duplicate_error_in_clust(
|
||||
/*=============================*/
|
||||
ulint flags, /*!< in: undo logging and locking flags */
|
||||
btr_cur_t* cursor, /*!< in: B-tree cursor */
|
||||
const dtuple_t* entry, /*!< in: entry to insert */
|
||||
que_thr_t* thr, /*!< in: query thread */
|
||||
@@ -2386,7 +2383,7 @@ row_ins_clust_index_entry_low(
|
||||
DB_LOCK_WAIT */
|
||||
|
||||
err = row_ins_duplicate_error_in_clust(
|
||||
flags, &cursor, entry, thr, &mtr);
|
||||
&cursor, entry, thr, &mtr);
|
||||
}
|
||||
|
||||
if (err != DB_SUCCESS) {
|
||||
|
@@ -1,6 +1,7 @@
|
||||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 2011, 2016, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2017, MariaDB Corporation.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
@@ -1872,6 +1873,7 @@ row_log_table_apply_update(
|
||||
|
||||
When applying the subsequent ROW_T_DELETE, no matching
|
||||
record will be found. */
|
||||
/* fall through */
|
||||
case DB_SUCCESS:
|
||||
ut_ad(row != NULL);
|
||||
break;
|
||||
|
@@ -5407,7 +5407,8 @@ loop:
|
||||
fputs(" InnoDB: Warning: CHECK TABLE on ", stderr);
|
||||
dict_index_name_print(stderr, prebuilt->trx, index);
|
||||
fprintf(stderr, " returned %lu\n", ret);
|
||||
/* fall through (this error is ignored by CHECK TABLE) */
|
||||
/* (this error is ignored by CHECK TABLE) */
|
||||
/* fall through */
|
||||
case DB_END_OF_INDEX:
|
||||
func_exit:
|
||||
mem_free(buf);
|
||||
|
@@ -1,6 +1,7 @@
|
||||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2017, MariaDB Corporation.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
@@ -488,8 +489,9 @@ row_purge_remove_sec_if_poss_leaf(
|
||||
success = false;
|
||||
}
|
||||
}
|
||||
/* fall through (the index entry is still needed,
|
||||
/* (The index entry is still needed,
|
||||
or the deletion succeeded) */
|
||||
/* fall through */
|
||||
case ROW_NOT_DELETED_REF:
|
||||
/* The index entry is still needed. */
|
||||
case ROW_BUFFERED:
|
||||
|
@@ -293,7 +293,7 @@ UNIV_INTERN double srv_adaptive_flushing_lwm = 10.0;
|
||||
UNIV_INTERN ulong srv_flushing_avg_loops = 30;
|
||||
|
||||
/* The number of purge threads to use.*/
|
||||
UNIV_INTERN ulong srv_n_purge_threads = 1;
|
||||
UNIV_INTERN ulong srv_n_purge_threads;
|
||||
|
||||
/* the number of pages to purge in one batch */
|
||||
UNIV_INTERN ulong srv_purge_batch_size = 20;
|
||||
@@ -490,16 +490,16 @@ UNIV_INTERN uint srv_simulate_comp_failures = 0;
|
||||
|
||||
/** Acquire the system_mutex. */
|
||||
#define srv_sys_mutex_enter() do { \
|
||||
mutex_enter(&srv_sys->mutex); \
|
||||
mutex_enter(&srv_sys.mutex); \
|
||||
} while (0)
|
||||
|
||||
/** Test if the system mutex is owned. */
|
||||
#define srv_sys_mutex_own() (mutex_own(&srv_sys->mutex) \
|
||||
#define srv_sys_mutex_own() (mutex_own(&srv_sys.mutex) \
|
||||
&& !srv_read_only_mode)
|
||||
|
||||
/** Release the system mutex. */
|
||||
#define srv_sys_mutex_exit() do { \
|
||||
mutex_exit(&srv_sys->mutex); \
|
||||
mutex_exit(&srv_sys.mutex); \
|
||||
} while (0)
|
||||
|
||||
#define fetch_lock_wait_timeout(trx) \
|
||||
@@ -591,7 +591,7 @@ struct srv_sys_t{
|
||||
ulint n_sys_threads; /*!< size of the sys_threads
|
||||
array */
|
||||
|
||||
srv_slot_t* sys_threads; /*!< server thread table;
|
||||
srv_slot_t sys_threads[32 + 1]; /*!< server thread table;
|
||||
os_event_set() and
|
||||
os_event_reset() on
|
||||
sys_threads[]->event are
|
||||
@@ -611,7 +611,7 @@ struct srv_sys_t{
|
||||
UNIV_INTERN ib_mutex_t server_mutex;
|
||||
#endif /* !HAVE_ATOMIC_BUILTINS */
|
||||
|
||||
static srv_sys_t* srv_sys = NULL;
|
||||
static srv_sys_t srv_sys;
|
||||
|
||||
/** Event to signal srv_monitor_thread. Not protected by a mutex.
|
||||
Set after setting srv_print_innodb_monitor. */
|
||||
@@ -633,10 +633,10 @@ and/or load it during startup. */
|
||||
UNIV_INTERN char srv_buffer_pool_dump_at_shutdown = FALSE;
|
||||
UNIV_INTERN char srv_buffer_pool_load_at_startup = FALSE;
|
||||
|
||||
/** Slot index in the srv_sys->sys_threads array for the purge thread. */
|
||||
/** Slot index in the srv_sys.sys_threads array for the purge thread. */
|
||||
static const ulint SRV_PURGE_SLOT = 1;
|
||||
|
||||
/** Slot index in the srv_sys->sys_threads array for the master thread. */
|
||||
/** Slot index in the srv_sys.sys_threads array for the master thread. */
|
||||
static const ulint SRV_MASTER_SLOT = 0;
|
||||
|
||||
/*********************************************************************//**
|
||||
@@ -737,21 +737,21 @@ srv_reserve_slot(
|
||||
|
||||
switch (type) {
|
||||
case SRV_MASTER:
|
||||
slot = &srv_sys->sys_threads[SRV_MASTER_SLOT];
|
||||
slot = &srv_sys.sys_threads[SRV_MASTER_SLOT];
|
||||
break;
|
||||
|
||||
case SRV_PURGE:
|
||||
slot = &srv_sys->sys_threads[SRV_PURGE_SLOT];
|
||||
slot = &srv_sys.sys_threads[SRV_PURGE_SLOT];
|
||||
break;
|
||||
|
||||
case SRV_WORKER:
|
||||
/* Find an empty slot, skip the master and purge slots. */
|
||||
for (slot = &srv_sys->sys_threads[2];
|
||||
for (slot = &srv_sys.sys_threads[2];
|
||||
slot->in_use;
|
||||
++slot) {
|
||||
|
||||
ut_a(slot < &srv_sys->sys_threads[
|
||||
srv_sys->n_sys_threads]);
|
||||
ut_a(slot < &srv_sys.sys_threads[
|
||||
srv_sys.n_sys_threads]);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -767,7 +767,7 @@ srv_reserve_slot(
|
||||
|
||||
ut_ad(srv_slot_get_type(slot) == type);
|
||||
|
||||
++srv_sys->n_threads_active[type];
|
||||
++srv_sys.n_threads_active[type];
|
||||
|
||||
srv_sys_mutex_exit();
|
||||
|
||||
@@ -797,27 +797,27 @@ srv_suspend_thread_low(
|
||||
case SRV_MASTER:
|
||||
/* We have only one master thread and it
|
||||
should be the first entry always. */
|
||||
ut_a(srv_sys->n_threads_active[type] == 1);
|
||||
ut_a(srv_sys.n_threads_active[type] == 1);
|
||||
break;
|
||||
|
||||
case SRV_PURGE:
|
||||
/* We have only one purge coordinator thread
|
||||
and it should be the second entry always. */
|
||||
ut_a(srv_sys->n_threads_active[type] == 1);
|
||||
ut_a(srv_sys.n_threads_active[type] == 1);
|
||||
break;
|
||||
|
||||
case SRV_WORKER:
|
||||
ut_a(srv_n_purge_threads > 1);
|
||||
ut_a(srv_sys->n_threads_active[type] > 0);
|
||||
ut_a(srv_sys.n_threads_active[type] > 0);
|
||||
break;
|
||||
}
|
||||
|
||||
ut_a(!slot->suspended);
|
||||
slot->suspended = TRUE;
|
||||
|
||||
ut_a(srv_sys->n_threads_active[type] > 0);
|
||||
ut_a(srv_sys.n_threads_active[type] > 0);
|
||||
|
||||
srv_sys->n_threads_active[type]--;
|
||||
srv_sys.n_threads_active[type]--;
|
||||
|
||||
return(os_event_reset(slot->event));
|
||||
}
|
||||
@@ -872,7 +872,7 @@ srv_resume_thread(srv_slot_t* slot, ib_int64_t sig_count = 0, bool wait = true,
|
||||
ut_ad(slot->suspended);
|
||||
|
||||
slot->suspended = FALSE;
|
||||
++srv_sys->n_threads_active[slot->type];
|
||||
++srv_sys.n_threads_active[slot->type];
|
||||
srv_sys_mutex_exit();
|
||||
return(timeout);
|
||||
}
|
||||
@@ -894,8 +894,8 @@ srv_release_threads(enum srv_thread_type type, ulint n)
|
||||
|
||||
srv_sys_mutex_enter();
|
||||
|
||||
for (ulint i = 0; i < srv_sys->n_sys_threads; i++) {
|
||||
srv_slot_t* slot = &srv_sys->sys_threads[i];
|
||||
for (ulint i = 0; i < srv_sys.n_sys_threads; i++) {
|
||||
srv_slot_t* slot = &srv_sys.sys_threads[i];
|
||||
|
||||
if (!slot->in_use || srv_slot_get_type(slot) != type) {
|
||||
continue;
|
||||
@@ -915,7 +915,7 @@ srv_release_threads(enum srv_thread_type type, ulint n)
|
||||
should be the first entry always. */
|
||||
ut_a(n == 1);
|
||||
ut_a(i == SRV_MASTER_SLOT);
|
||||
ut_a(srv_sys->n_threads_active[type] == 0);
|
||||
ut_a(srv_sys.n_threads_active[type] == 0);
|
||||
break;
|
||||
|
||||
case SRV_PURGE:
|
||||
@@ -924,12 +924,12 @@ srv_release_threads(enum srv_thread_type type, ulint n)
|
||||
ut_a(n == 1);
|
||||
ut_a(i == SRV_PURGE_SLOT);
|
||||
ut_a(srv_n_purge_threads > 0);
|
||||
ut_a(srv_sys->n_threads_active[type] == 0);
|
||||
ut_a(srv_sys.n_threads_active[type] == 0);
|
||||
break;
|
||||
|
||||
case SRV_WORKER:
|
||||
ut_a(srv_n_purge_threads > 1);
|
||||
ut_a(srv_sys->n_threads_active[type]
|
||||
ut_a(srv_sys.n_threads_active[type]
|
||||
< srv_n_purge_threads - 1);
|
||||
break;
|
||||
}
|
||||
@@ -967,9 +967,6 @@ void
|
||||
srv_init(void)
|
||||
/*==========*/
|
||||
{
|
||||
ulint n_sys_threads = 0;
|
||||
ulint srv_sys_sz = sizeof(*srv_sys);
|
||||
|
||||
#ifndef HAVE_ATOMIC_BUILTINS
|
||||
mutex_create(server_mutex_key, &server_mutex, SYNC_ANY_LATCH);
|
||||
#endif /* !HAVE_ATOMIC_BUILTINS */
|
||||
@@ -977,29 +974,19 @@ srv_init(void)
|
||||
mutex_create(srv_innodb_monitor_mutex_key,
|
||||
&srv_innodb_monitor_mutex, SYNC_NO_ORDER_CHECK);
|
||||
|
||||
if (!srv_read_only_mode) {
|
||||
|
||||
/* Number of purge threads + master thread */
|
||||
n_sys_threads = srv_n_purge_threads + 1;
|
||||
|
||||
srv_sys_sz += n_sys_threads * sizeof(*srv_sys->sys_threads);
|
||||
}
|
||||
|
||||
srv_sys = static_cast<srv_sys_t*>(mem_zalloc(srv_sys_sz));
|
||||
|
||||
srv_sys->n_sys_threads = n_sys_threads;
|
||||
srv_sys.n_sys_threads = srv_read_only_mode
|
||||
? 0
|
||||
: srv_n_purge_threads + 1/* purge coordinator */;
|
||||
|
||||
if (!srv_read_only_mode) {
|
||||
|
||||
mutex_create(srv_sys_mutex_key, &srv_sys->mutex, SYNC_THREADS);
|
||||
mutex_create(srv_sys_mutex_key, &srv_sys.mutex, SYNC_THREADS);
|
||||
|
||||
mutex_create(srv_sys_tasks_mutex_key,
|
||||
&srv_sys->tasks_mutex, SYNC_ANY_LATCH);
|
||||
&srv_sys.tasks_mutex, SYNC_ANY_LATCH);
|
||||
|
||||
srv_sys->sys_threads = (srv_slot_t*) &srv_sys[1];
|
||||
|
||||
for (ulint i = 0; i < srv_sys->n_sys_threads; ++i) {
|
||||
srv_slot_t* slot = &srv_sys->sys_threads[i];
|
||||
for (ulint i = 0; i < srv_sys.n_sys_threads; ++i) {
|
||||
srv_slot_t* slot = &srv_sys.sys_threads[i];
|
||||
|
||||
slot->event = os_event_create();
|
||||
|
||||
@@ -1011,8 +998,6 @@ srv_init(void)
|
||||
srv_monitor_event = os_event_create();
|
||||
|
||||
srv_buf_dump_event = os_event_create();
|
||||
|
||||
UT_LIST_INIT(srv_sys->tasks);
|
||||
}
|
||||
|
||||
/* page_zip_stat_per_index_mutex is acquired from:
|
||||
@@ -1050,10 +1035,8 @@ srv_free(void)
|
||||
{
|
||||
srv_conc_free();
|
||||
|
||||
/* The mutexes srv_sys->mutex and srv_sys->tasks_mutex should have
|
||||
/* The mutexes srv_sys.mutex and srv_sys.tasks_mutex should have
|
||||
been freed by sync_close() already. */
|
||||
mem_free(srv_sys);
|
||||
srv_sys = NULL;
|
||||
|
||||
trx_i_s_cache_free(trx_i_s_cache);
|
||||
|
||||
@@ -1884,7 +1867,7 @@ void
|
||||
srv_inc_activity_count(void)
|
||||
/*========================*/
|
||||
{
|
||||
srv_sys->activity_count.inc();
|
||||
srv_sys.activity_count.inc();
|
||||
}
|
||||
|
||||
/**********************************************************************//**
|
||||
@@ -1906,7 +1889,7 @@ srv_get_active_thread_type(void)
|
||||
srv_sys_mutex_enter();
|
||||
|
||||
for (ulint i = SRV_WORKER; i <= SRV_MASTER; ++i) {
|
||||
if (srv_sys->n_threads_active[i] != 0) {
|
||||
if (srv_sys.n_threads_active[i] != 0) {
|
||||
ret = static_cast<srv_thread_type>(i);
|
||||
break;
|
||||
}
|
||||
@@ -1979,12 +1962,12 @@ srv_active_wake_master_thread(void)
|
||||
|
||||
srv_inc_activity_count();
|
||||
|
||||
if (srv_sys->n_threads_active[SRV_MASTER] == 0) {
|
||||
if (srv_sys.n_threads_active[SRV_MASTER] == 0) {
|
||||
srv_slot_t* slot;
|
||||
|
||||
srv_sys_mutex_enter();
|
||||
|
||||
slot = &srv_sys->sys_threads[SRV_MASTER_SLOT];
|
||||
slot = &srv_sys.sys_threads[SRV_MASTER_SLOT];
|
||||
|
||||
/* Only if the master thread has been started. */
|
||||
|
||||
@@ -2011,7 +1994,7 @@ srv_wake_purge_thread_if_not_active(void)
|
||||
ut_ad(!srv_sys_mutex_own());
|
||||
|
||||
if (purge_sys->state == PURGE_STATE_RUN
|
||||
&& srv_sys->n_threads_active[SRV_PURGE] == 0) {
|
||||
&& srv_sys.n_threads_active[SRV_PURGE] == 0) {
|
||||
|
||||
srv_release_threads(SRV_PURGE, 1);
|
||||
}
|
||||
@@ -2040,7 +2023,7 @@ ulint
|
||||
srv_get_activity_count(void)
|
||||
/*========================*/
|
||||
{
|
||||
return(srv_sys->activity_count);
|
||||
return(srv_sys.activity_count);
|
||||
}
|
||||
|
||||
/*******************************************************************//**
|
||||
@@ -2052,7 +2035,7 @@ srv_check_activity(
|
||||
/*===============*/
|
||||
ulint old_activity_count) /*!< in: old activity count */
|
||||
{
|
||||
return(srv_sys->activity_count != old_activity_count);
|
||||
return(srv_sys.activity_count != old_activity_count);
|
||||
}
|
||||
|
||||
/********************************************************************//**
|
||||
@@ -2419,7 +2402,7 @@ DECLARE_THREAD(srv_master_thread)(
|
||||
srv_main_thread_id = os_thread_pf(os_thread_get_curr_id());
|
||||
|
||||
slot = srv_reserve_slot(SRV_MASTER);
|
||||
ut_a(slot == srv_sys->sys_threads);
|
||||
ut_a(slot == srv_sys.sys_threads);
|
||||
|
||||
last_print_time = ut_time();
|
||||
loop:
|
||||
@@ -2510,18 +2493,18 @@ srv_task_execute(void)
|
||||
ut_ad(!srv_read_only_mode);
|
||||
ut_a(srv_force_recovery < SRV_FORCE_NO_BACKGROUND);
|
||||
|
||||
mutex_enter(&srv_sys->tasks_mutex);
|
||||
mutex_enter(&srv_sys.tasks_mutex);
|
||||
|
||||
if (UT_LIST_GET_LEN(srv_sys->tasks) > 0) {
|
||||
if (UT_LIST_GET_LEN(srv_sys.tasks) > 0) {
|
||||
|
||||
thr = UT_LIST_GET_FIRST(srv_sys->tasks);
|
||||
thr = UT_LIST_GET_FIRST(srv_sys.tasks);
|
||||
|
||||
ut_a(que_node_get_type(thr->child) == QUE_NODE_PURGE);
|
||||
|
||||
UT_LIST_REMOVE(queue, srv_sys->tasks, thr);
|
||||
UT_LIST_REMOVE(queue, srv_sys.tasks, thr);
|
||||
}
|
||||
|
||||
mutex_exit(&srv_sys->tasks_mutex);
|
||||
mutex_exit(&srv_sys.tasks_mutex);
|
||||
|
||||
if (thr != NULL) {
|
||||
|
||||
@@ -2563,7 +2546,7 @@ DECLARE_THREAD(srv_worker_thread)(
|
||||
|
||||
srv_sys_mutex_enter();
|
||||
|
||||
ut_a(srv_sys->n_threads_active[SRV_WORKER] < srv_n_purge_threads);
|
||||
ut_a(srv_sys.n_threads_active[SRV_WORKER] < srv_n_purge_threads);
|
||||
|
||||
srv_sys_mutex_exit();
|
||||
|
||||
@@ -2896,11 +2879,11 @@ srv_que_task_enqueue_low(
|
||||
que_thr_t* thr) /*!< in: query thread */
|
||||
{
|
||||
ut_ad(!srv_read_only_mode);
|
||||
mutex_enter(&srv_sys->tasks_mutex);
|
||||
mutex_enter(&srv_sys.tasks_mutex);
|
||||
|
||||
UT_LIST_ADD_LAST(queue, srv_sys->tasks, thr);
|
||||
UT_LIST_ADD_LAST(queue, srv_sys.tasks, thr);
|
||||
|
||||
mutex_exit(&srv_sys->tasks_mutex);
|
||||
mutex_exit(&srv_sys.tasks_mutex);
|
||||
|
||||
srv_release_threads(SRV_WORKER, 1);
|
||||
}
|
||||
@@ -2917,11 +2900,11 @@ srv_get_task_queue_length(void)
|
||||
|
||||
ut_ad(!srv_read_only_mode);
|
||||
|
||||
mutex_enter(&srv_sys->tasks_mutex);
|
||||
mutex_enter(&srv_sys.tasks_mutex);
|
||||
|
||||
n_tasks = UT_LIST_GET_LEN(srv_sys->tasks);
|
||||
n_tasks = UT_LIST_GET_LEN(srv_sys.tasks);
|
||||
|
||||
mutex_exit(&srv_sys->tasks_mutex);
|
||||
mutex_exit(&srv_sys.tasks_mutex);
|
||||
|
||||
return(n_tasks);
|
||||
}
|
||||
|
@@ -1123,6 +1123,7 @@ sync_thread_add_level(
|
||||
upgrading in innobase_start_or_create_for_mysql(). */
|
||||
break;
|
||||
}
|
||||
/* fall through */
|
||||
case SYNC_MEM_POOL:
|
||||
case SYNC_MEM_HASH:
|
||||
case SYNC_RECV:
|
||||
|
@@ -503,7 +503,9 @@ fill_trx_row(
|
||||
|
||||
row->trx_mysql_thread_id = thd_get_thread_id(trx->mysql_thd);
|
||||
|
||||
stmt = innobase_get_stmt(trx->mysql_thd, &stmt_len);
|
||||
stmt = trx->mysql_thd
|
||||
? innobase_get_stmt(trx->mysql_thd, &stmt_len)
|
||||
: NULL;
|
||||
|
||||
if (stmt != NULL) {
|
||||
char query[TRX_I_S_TRX_QUERY_MAX_LEN + 1];
|
||||
|
@@ -1,6 +1,7 @@
|
||||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2017, MariaDB Corporation.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
@@ -1185,10 +1186,6 @@ UNIV_INTERN
|
||||
dberr_t
|
||||
trx_undo_report_row_operation(
|
||||
/*==========================*/
|
||||
ulint flags, /*!< in: if BTR_NO_UNDO_LOG_FLAG bit is
|
||||
set, does nothing */
|
||||
ulint op_type, /*!< in: TRX_UNDO_INSERT_OP or
|
||||
TRX_UNDO_MODIFY_OP */
|
||||
que_thr_t* thr, /*!< in: query thread */
|
||||
dict_index_t* index, /*!< in: clustered index */
|
||||
const dtuple_t* clust_entry, /*!< in: in the case of an insert,
|
||||
@@ -1221,17 +1218,8 @@ trx_undo_report_row_operation(
|
||||
ut_ad(!srv_read_only_mode);
|
||||
ut_a(dict_index_is_clust(index));
|
||||
ut_ad(!rec || rec_offs_validate(rec, index, offsets));
|
||||
|
||||
if (flags & BTR_NO_UNDO_LOG_FLAG) {
|
||||
|
||||
*roll_ptr = 0;
|
||||
|
||||
return(DB_SUCCESS);
|
||||
}
|
||||
|
||||
ut_ad(thr);
|
||||
ut_ad((op_type != TRX_UNDO_INSERT_OP)
|
||||
|| (clust_entry && !update && !rec));
|
||||
ut_ad(!clust_entry || (!update && !rec));
|
||||
|
||||
trx = thr_get_trx(thr);
|
||||
|
||||
@@ -1252,8 +1240,7 @@ trx_undo_report_row_operation(
|
||||
|
||||
/* If the undo log is not assigned yet, assign one */
|
||||
|
||||
switch (op_type) {
|
||||
case TRX_UNDO_INSERT_OP:
|
||||
if (clust_entry) {
|
||||
undo = trx->insert_undo;
|
||||
|
||||
if (undo == NULL) {
|
||||
@@ -1269,10 +1256,7 @@ trx_undo_report_row_operation(
|
||||
|
||||
ut_ad(err == DB_SUCCESS);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
ut_ad(op_type == TRX_UNDO_MODIFY_OP);
|
||||
|
||||
} else {
|
||||
undo = trx->update_undo;
|
||||
|
||||
if (undo == NULL) {
|
||||
@@ -1296,23 +1280,14 @@ trx_undo_report_row_operation(
|
||||
buf_block_dbg_add_level(undo_block, SYNC_TRX_UNDO_PAGE);
|
||||
|
||||
do {
|
||||
page_t* undo_page;
|
||||
ulint offset;
|
||||
|
||||
undo_page = buf_block_get_frame(undo_block);
|
||||
ut_ad(page_no == buf_block_get_page_no(undo_block));
|
||||
|
||||
switch (op_type) {
|
||||
case TRX_UNDO_INSERT_OP:
|
||||
offset = trx_undo_page_report_insert(
|
||||
undo_page, trx, index, clust_entry, &mtr);
|
||||
break;
|
||||
default:
|
||||
ut_ad(op_type == TRX_UNDO_MODIFY_OP);
|
||||
offset = trx_undo_page_report_modify(
|
||||
page_t* undo_page = buf_block_get_frame(undo_block);
|
||||
ulint offset = clust_entry
|
||||
? trx_undo_page_report_insert(
|
||||
undo_page, trx, index, clust_entry, &mtr)
|
||||
: trx_undo_page_report_modify(
|
||||
undo_page, trx, index, rec, offsets, update,
|
||||
cmpl_info, &mtr);
|
||||
}
|
||||
|
||||
if (UNIV_UNLIKELY(offset == 0)) {
|
||||
/* The record did not fit on the page. We erase the
|
||||
@@ -1363,7 +1338,7 @@ trx_undo_report_row_operation(
|
||||
mutex_exit(&trx->undo_mutex);
|
||||
|
||||
*roll_ptr = trx_undo_build_roll_ptr(
|
||||
op_type == TRX_UNDO_INSERT_OP,
|
||||
clust_entry != NULL,
|
||||
rseg->id, page_no, offset);
|
||||
return(DB_SUCCESS);
|
||||
}
|
||||
|
@@ -1,6 +1,7 @@
|
||||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 1996, 2011, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2017, MariaDB Corporation.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
@@ -48,8 +49,6 @@ sess_open(void)
|
||||
sess->trx = trx_allocate_for_background();
|
||||
sess->trx->sess = sess;
|
||||
|
||||
UT_LIST_INIT(sess->graphs);
|
||||
|
||||
return(sess);
|
||||
}
|
||||
|
||||
|
@@ -157,6 +157,7 @@ int maria_extra(MARIA_HA *info, enum ha_extra_function function,
|
||||
if (info->s->data_file_type != DYNAMIC_RECORD)
|
||||
break;
|
||||
/* Remove read/write cache if dynamic rows */
|
||||
/* fall through */
|
||||
case HA_EXTRA_NO_CACHE:
|
||||
if (info->opt_flag & (READ_CACHE_USED | WRITE_CACHE_USED))
|
||||
{
|
||||
@@ -313,7 +314,7 @@ int maria_extra(MARIA_HA *info, enum ha_extra_function function,
|
||||
share->state.open_count= 1;
|
||||
share->changed= 1;
|
||||
_ma_mark_file_changed_now(share);
|
||||
/* Fall trough */
|
||||
/* Fall through */
|
||||
case HA_EXTRA_PREPARE_FOR_RENAME:
|
||||
{
|
||||
my_bool do_flush= MY_TEST(function != HA_EXTRA_PREPARE_FOR_DROP);
|
||||
|
@@ -3061,7 +3061,7 @@ static MARIA_HA *get_MARIA_HA_from_REDO_record(const
|
||||
case LOGREC_REDO_INDEX:
|
||||
case LOGREC_REDO_INDEX_FREE_PAGE:
|
||||
index_page_redo_entry= 1;
|
||||
/* Fall trough*/
|
||||
/* Fall through */
|
||||
case LOGREC_REDO_INSERT_ROW_HEAD:
|
||||
case LOGREC_REDO_INSERT_ROW_TAIL:
|
||||
case LOGREC_REDO_PURGE_ROW_HEAD:
|
||||
|
@@ -150,6 +150,7 @@ int mi_extra(MI_INFO *info, enum ha_extra_function function, void *extra_arg)
|
||||
if (info->s->data_file_type != DYNAMIC_RECORD)
|
||||
break;
|
||||
/* Remove read/write cache if dynamic rows */
|
||||
/* fall through */
|
||||
case HA_EXTRA_NO_CACHE:
|
||||
if (info->opt_flag & (READ_CACHE_USED | WRITE_CACHE_USED))
|
||||
{
|
||||
@@ -262,7 +263,7 @@ int mi_extra(MI_INFO *info, enum ha_extra_function function, void *extra_arg)
|
||||
//share->deleting= TRUE;
|
||||
share->global_changed= FALSE; /* force writing changed flag */
|
||||
_mi_mark_file_changed(info);
|
||||
/* Fall trough */
|
||||
/* Fall through */
|
||||
case HA_EXTRA_PREPARE_FOR_RENAME:
|
||||
mysql_mutex_lock(&THR_LOCK_myisam);
|
||||
share->last_version= 0L; /* Impossible version */
|
||||
|
@@ -216,7 +216,9 @@ enum ESphGroupBy
|
||||
SPH_GROUPBY_WEEK = 1, ///< group by week
|
||||
SPH_GROUPBY_MONTH = 2, ///< group by month
|
||||
SPH_GROUPBY_YEAR = 3, ///< group by year
|
||||
SPH_GROUPBY_ATTR = 4 ///< group by attribute value
|
||||
SPH_GROUPBY_ATTR = 4, ///< group by attribute value
|
||||
SPH_GROUPBY_ATTRPAIR = 5, ///< group by sequential attrs pair (rendered redundant by 64bit attrs support; removed)
|
||||
SPH_GROUPBY_MULTIPLE = 6 ///< group by on multiple attribute values
|
||||
};
|
||||
|
||||
/// known attribute types
|
||||
@@ -1555,6 +1557,7 @@ bool CSphSEQuery::ParseField ( char * sField )
|
||||
{ "month:", SPH_GROUPBY_MONTH },
|
||||
{ "year:", SPH_GROUPBY_YEAR },
|
||||
{ "attr:", SPH_GROUPBY_ATTR },
|
||||
{ "multi:", SPH_GROUPBY_MULTIPLE }
|
||||
};
|
||||
|
||||
int i;
|
||||
|
@@ -1844,8 +1844,8 @@ int spider_db_append_key_where_internal(
|
||||
#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 100000
|
||||
case HA_READ_PREFIX_LAST:
|
||||
result_list->desc_flg = TRUE;
|
||||
/* fall through */
|
||||
#endif
|
||||
/* fall through */
|
||||
case HA_READ_KEY_EXACT:
|
||||
if (sql_kind == SPIDER_SQL_KIND_SQL)
|
||||
{
|
||||
|
@@ -3,6 +3,7 @@
|
||||
Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2008, Google Inc.
|
||||
Copyright (c) 2012, Facebook Inc.
|
||||
Copyright (c) 2017, MariaDB Corporation.
|
||||
|
||||
Portions of this file contain modifications contributed and copyrighted by
|
||||
Google, Inc. Those modifications are gratefully acknowledged and are described
|
||||
@@ -1268,18 +1269,21 @@ btr_cur_ins_lock_and_undo(
|
||||
index, thr, mtr, inherit);
|
||||
|
||||
if (err != DB_SUCCESS
|
||||
|| !(~flags | (BTR_NO_UNDO_LOG_FLAG | BTR_KEEP_SYS_FLAG))
|
||||
|| !dict_index_is_clust(index) || dict_index_is_ibuf(index)) {
|
||||
|
||||
return(err);
|
||||
}
|
||||
|
||||
err = trx_undo_report_row_operation(flags, TRX_UNDO_INSERT_OP,
|
||||
thr, index, entry,
|
||||
NULL, 0, NULL, NULL,
|
||||
&roll_ptr);
|
||||
if (err != DB_SUCCESS) {
|
||||
|
||||
return(err);
|
||||
if (flags & BTR_NO_UNDO_LOG_FLAG) {
|
||||
roll_ptr = 0;
|
||||
} else {
|
||||
err = trx_undo_report_row_operation(thr, index, entry,
|
||||
NULL, 0, NULL, NULL,
|
||||
&roll_ptr);
|
||||
if (err != DB_SUCCESS) {
|
||||
return(err);
|
||||
}
|
||||
}
|
||||
|
||||
/* Now we can fill in the roll ptr field in entry */
|
||||
@@ -1328,15 +1332,17 @@ btr_cur_optimistic_insert(
|
||||
btr_cur_t* cursor, /*!< in: cursor on page after which to insert;
|
||||
cursor stays valid */
|
||||
ulint** offsets,/*!< out: offsets on *rec */
|
||||
mem_heap_t** heap, /*!< in/out: pointer to memory heap, or NULL */
|
||||
mem_heap_t** heap, /*!< in/out: pointer to memory heap */
|
||||
dtuple_t* entry, /*!< in/out: entry to insert */
|
||||
rec_t** rec, /*!< out: pointer to inserted record if
|
||||
succeed */
|
||||
big_rec_t** big_rec,/*!< out: big rec vector whose fields have to
|
||||
be stored externally by the caller, or
|
||||
NULL */
|
||||
be stored externally by the caller */
|
||||
ulint n_ext, /*!< in: number of externally stored columns */
|
||||
que_thr_t* thr, /*!< in: query thread or NULL */
|
||||
que_thr_t* thr, /*!< in/out: query thread; can be NULL if
|
||||
!(~flags
|
||||
& (BTR_NO_LOCKING_FLAG
|
||||
| BTR_NO_UNDO_LOG_FLAG)) */
|
||||
mtr_t* mtr) /*!< in/out: mini-transaction;
|
||||
if this function returns DB_SUCCESS on
|
||||
a leaf page of a secondary index in a
|
||||
@@ -1357,6 +1363,7 @@ btr_cur_optimistic_insert(
|
||||
ulint rec_size;
|
||||
dberr_t err;
|
||||
|
||||
ut_ad(thr || !(~flags & (BTR_NO_LOCKING_FLAG | BTR_NO_UNDO_LOG_FLAG)));
|
||||
*big_rec = NULL;
|
||||
|
||||
block = btr_cur_get_block(cursor);
|
||||
@@ -1366,7 +1373,10 @@ btr_cur_optimistic_insert(
|
||||
page = buf_block_get_frame(block);
|
||||
index = cursor->index;
|
||||
|
||||
ut_ad((thr && thr_get_trx(thr)->fake_changes)
|
||||
const bool fake_changes = (~flags & (BTR_NO_LOCKING_FLAG
|
||||
| BTR_NO_UNDO_LOG_FLAG))
|
||||
&& thr_get_trx(thr)->fake_changes;
|
||||
ut_ad(fake_changes
|
||||
|| mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX));
|
||||
ut_ad(!dict_index_is_online_ddl(index)
|
||||
|| dict_index_is_clust(index)
|
||||
@@ -1507,7 +1517,7 @@ fail_err:
|
||||
goto fail_err;
|
||||
}
|
||||
|
||||
if (UNIV_UNLIKELY(thr && thr_get_trx(thr)->fake_changes)) {
|
||||
if (UNIV_UNLIKELY(fake_changes)) {
|
||||
/* skip CHANGE, LOG */
|
||||
*big_rec = big_rec_vec;
|
||||
return(err); /* == DB_SUCCESS */
|
||||
@@ -1625,15 +1635,17 @@ btr_cur_pessimistic_insert(
|
||||
cursor stays valid */
|
||||
ulint** offsets,/*!< out: offsets on *rec */
|
||||
mem_heap_t** heap, /*!< in/out: pointer to memory heap
|
||||
that can be emptied, or NULL */
|
||||
that can be emptied */
|
||||
dtuple_t* entry, /*!< in/out: entry to insert */
|
||||
rec_t** rec, /*!< out: pointer to inserted record if
|
||||
succeed */
|
||||
big_rec_t** big_rec,/*!< out: big rec vector whose fields have to
|
||||
be stored externally by the caller, or
|
||||
NULL */
|
||||
be stored externally by the caller */
|
||||
ulint n_ext, /*!< in: number of externally stored columns */
|
||||
que_thr_t* thr, /*!< in: query thread or NULL */
|
||||
que_thr_t* thr, /*!< in/out: query thread; can be NULL if
|
||||
!(~flags
|
||||
& (BTR_NO_LOCKING_FLAG
|
||||
| BTR_NO_UNDO_LOG_FLAG)) */
|
||||
mtr_t* mtr) /*!< in/out: mini-transaction */
|
||||
{
|
||||
dict_index_t* index = cursor->index;
|
||||
@@ -1645,13 +1657,17 @@ btr_cur_pessimistic_insert(
|
||||
ulint n_reserved = 0;
|
||||
|
||||
ut_ad(dtuple_check_typed(entry));
|
||||
ut_ad(thr || !(~flags & (BTR_NO_LOCKING_FLAG | BTR_NO_UNDO_LOG_FLAG)));
|
||||
|
||||
*big_rec = NULL;
|
||||
|
||||
ut_ad((thr && thr_get_trx(thr)->fake_changes) || mtr_memo_contains(mtr,
|
||||
const bool fake_changes = (~flags & (BTR_NO_LOCKING_FLAG
|
||||
| BTR_NO_UNDO_LOG_FLAG))
|
||||
&& thr_get_trx(thr)->fake_changes;
|
||||
ut_ad(fake_changes || mtr_memo_contains(mtr,
|
||||
dict_index_get_lock(btr_cur_get_index(cursor)),
|
||||
MTR_MEMO_X_LOCK));
|
||||
ut_ad((thr && thr_get_trx(thr)->fake_changes) || mtr_memo_contains(mtr, btr_cur_get_block(cursor),
|
||||
ut_ad(fake_changes || mtr_memo_contains(mtr, btr_cur_get_block(cursor),
|
||||
MTR_MEMO_PAGE_X_FIX));
|
||||
ut_ad(!dict_index_is_online_ddl(index)
|
||||
|| dict_index_is_clust(index)
|
||||
@@ -1712,7 +1728,7 @@ btr_cur_pessimistic_insert(
|
||||
}
|
||||
}
|
||||
|
||||
if (UNIV_UNLIKELY(thr && thr_get_trx(thr)->fake_changes)) {
|
||||
if (UNIV_UNLIKELY(fake_changes)) {
|
||||
/* skip CHANGE, LOG */
|
||||
if (n_reserved > 0) {
|
||||
fil_space_release_free_extents(index->space,
|
||||
@@ -1803,7 +1819,7 @@ btr_cur_upd_lock_and_undo(
|
||||
|
||||
ut_ad((thr != NULL) || (flags & BTR_NO_LOCKING_FLAG));
|
||||
|
||||
if (UNIV_UNLIKELY(thr && thr_get_trx(thr)->fake_changes)) {
|
||||
if (!(flags & BTR_NO_LOCKING_FLAG) && thr_get_trx(thr)->fake_changes) {
|
||||
/* skip LOCK, UNDO */
|
||||
return(DB_SUCCESS);
|
||||
}
|
||||
@@ -1838,9 +1854,10 @@ btr_cur_upd_lock_and_undo(
|
||||
|
||||
/* Append the info about the update in the undo log */
|
||||
|
||||
return(trx_undo_report_row_operation(
|
||||
flags, TRX_UNDO_MODIFY_OP, thr,
|
||||
index, NULL, update,
|
||||
return((flags & BTR_NO_UNDO_LOG_FLAG)
|
||||
? DB_SUCCESS
|
||||
: trx_undo_report_row_operation(
|
||||
thr, index, NULL, update,
|
||||
cmpl_info, rec, offsets, roll_ptr));
|
||||
}
|
||||
|
||||
@@ -2582,12 +2599,12 @@ btr_cur_pessimistic_update(
|
||||
ulint** offsets,/*!< out: offsets on cursor->page_cur.rec */
|
||||
mem_heap_t** offsets_heap,
|
||||
/*!< in/out: pointer to memory heap
|
||||
that can be emptied, or NULL */
|
||||
that can be emptied */
|
||||
mem_heap_t* entry_heap,
|
||||
/*!< in/out: memory heap for allocating
|
||||
big_rec and the index tuple */
|
||||
big_rec_t** big_rec,/*!< out: big rec vector whose fields have to
|
||||
be stored externally by the caller, or NULL */
|
||||
be stored externally by the caller */
|
||||
const upd_t* update, /*!< in: update vector; this is allowed also
|
||||
contain trx id and roll ptr fields, but
|
||||
the values in update vector have no effect */
|
||||
@@ -3162,7 +3179,7 @@ btr_cur_del_mark_set_clust_rec(
|
||||
return(err);
|
||||
}
|
||||
|
||||
err = trx_undo_report_row_operation(0, TRX_UNDO_MODIFY_OP, thr,
|
||||
err = trx_undo_report_row_operation(thr,
|
||||
index, NULL, NULL, 0, rec, offsets,
|
||||
&roll_ptr);
|
||||
if (err != DB_SUCCESS) {
|
||||
|
@@ -2,6 +2,7 @@
|
||||
|
||||
Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2008, Google Inc.
|
||||
Copyright (c) 2017, MariaDB Corporation.
|
||||
|
||||
Portions of this file contain modifications contributed and copyrighted by
|
||||
Google, Inc. Those modifications are gratefully acknowledged and are described
|
||||
@@ -1432,8 +1433,6 @@ buf_pool_init_instance(
|
||||
buf_pool->chunks = chunk =
|
||||
(buf_chunk_t*) mem_zalloc(sizeof *chunk);
|
||||
|
||||
UT_LIST_INIT(buf_pool->free);
|
||||
|
||||
if (!buf_chunk_init(buf_pool, chunk, buf_pool_size)) {
|
||||
mem_free(chunk);
|
||||
mem_free(buf_pool);
|
||||
|
@@ -1599,8 +1599,6 @@ fil_init(
|
||||
fil_system->spaces = hash_create(hash_size);
|
||||
fil_system->name_hash = hash_create(hash_size);
|
||||
|
||||
UT_LIST_INIT(fil_system->LRU);
|
||||
|
||||
fil_system->max_n_open = max_n_open;
|
||||
}
|
||||
|
||||
@@ -2326,14 +2324,12 @@ fil_op_log_parse_or_replay(
|
||||
} else if (log_flags & MLOG_FILE_FLAG_TEMP) {
|
||||
/* Temporary table, do nothing */
|
||||
} else {
|
||||
const char* path = NULL;
|
||||
|
||||
/* Create the database directory for name, if it does
|
||||
not exist yet */
|
||||
fil_create_directory_for_tablename(name);
|
||||
|
||||
if (fil_create_new_single_table_tablespace(
|
||||
space_id, name, path, flags,
|
||||
space_id, name, NULL, flags,
|
||||
DICT_TF2_USE_TABLESPACE,
|
||||
FIL_IBD_FILE_INITIAL_SIZE) != DB_SUCCESS) {
|
||||
ut_error;
|
||||
|
@@ -769,43 +769,6 @@ innobase_purge_changed_page_bitmaps(
|
||||
ulonglong lsn) __attribute__((unused)); /*!< in: LSN to purge files up to */
|
||||
|
||||
|
||||
/*****************************************************************//**
|
||||
Check whether this is a fake change transaction.
|
||||
@return TRUE if a fake change transaction */
|
||||
static
|
||||
my_bool
|
||||
innobase_is_fake_change(
|
||||
/*====================*/
|
||||
handlerton *hton, /*!< in: InnoDB handlerton */
|
||||
THD* thd) __attribute__((unused)); /*!< in: MySQL thread handle of the user for
|
||||
whom the transaction is being committed */
|
||||
|
||||
/** Empty free list algorithm.
|
||||
Checks if buffer pool is big enough to enable backoff algorithm.
|
||||
InnoDB empty free list algorithm backoff requires free pages
|
||||
from LRU for the best performance.
|
||||
buf_LRU_buf_pool_running_out cancels query if 1/4 of
|
||||
buffer pool belongs to LRU or freelist.
|
||||
At the same time buf_flush_LRU_list_batch
|
||||
keeps up to BUF_LRU_MIN_LEN in LRU.
|
||||
In order to avoid deadlock baclkoff requires buffer pool
|
||||
to be at least 4*BUF_LRU_MIN_LEN,
|
||||
but flush peformance is bad because of trashing
|
||||
and additional BUF_LRU_MIN_LEN pages are requested.
|
||||
@param[in] algorithm desired algorithm from srv_empty_free_list_t
|
||||
@return true if it's possible to enable backoff. */
|
||||
static inline
|
||||
bool
|
||||
innodb_empty_free_list_algorithm_allowed(
|
||||
srv_empty_free_list_t algorithm)
|
||||
{
|
||||
long long buf_pool_pages = srv_buf_pool_size / srv_page_size
|
||||
/ srv_buf_pool_instances;
|
||||
|
||||
return(buf_pool_pages >= BUF_LRU_MIN_LEN * (4 + 1)
|
||||
|| algorithm != SRV_EMPTY_FREE_LIST_BACKOFF);
|
||||
}
|
||||
|
||||
/** Get the list of foreign keys referencing a specified table
|
||||
table.
|
||||
@param thd The thread handle
|
||||
@@ -2332,15 +2295,11 @@ innobase_get_stmt(
|
||||
THD* thd, /*!< in: MySQL thread handle */
|
||||
size_t* length) /*!< out: length of the SQL statement */
|
||||
{
|
||||
const char* query = NULL;
|
||||
LEX_STRING *stmt = NULL;
|
||||
ut_ad(thd != NULL);
|
||||
stmt = thd_query_string(thd);
|
||||
if (stmt) {
|
||||
if (const LEX_STRING *stmt = thd_query_string(thd)) {
|
||||
*length = stmt->length;
|
||||
query = stmt->str;
|
||||
return stmt->str;
|
||||
}
|
||||
return (query);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**********************************************************************//**
|
||||
@@ -4253,22 +4212,6 @@ innobase_purge_changed_page_bitmaps(
|
||||
return (my_bool)log_online_purge_changed_page_bitmaps(lsn);
|
||||
}
|
||||
|
||||
/*****************************************************************//**
|
||||
Check whether this is a fake change transaction.
|
||||
@return TRUE if a fake change transaction */
|
||||
static
|
||||
my_bool
|
||||
innobase_is_fake_change(
|
||||
/*====================*/
|
||||
handlerton *hton MY_ATTRIBUTE((unused)),
|
||||
/*!< in: InnoDB handlerton */
|
||||
THD* thd) /*!< in: MySQL thread handle of the user for
|
||||
whom the transaction is being committed */
|
||||
{
|
||||
trx_t* trx = check_trx_exists(thd);
|
||||
return UNIV_UNLIKELY(trx->fake_changes);
|
||||
}
|
||||
|
||||
/*****************************************************************//**
|
||||
Commits a transaction in an InnoDB database. */
|
||||
static
|
||||
@@ -7779,8 +7722,8 @@ ha_innobase::innobase_lock_autoinc(void)
|
||||
break;
|
||||
}
|
||||
}
|
||||
/* Fall through to old style locking. */
|
||||
|
||||
/* Use old style locking. */
|
||||
/* fall through */
|
||||
case AUTOINC_OLD_STYLE_LOCKING:
|
||||
DBUG_EXECUTE_IF("die_if_autoinc_old_lock_style_used",
|
||||
ut_ad(0););
|
||||
@@ -8263,8 +8206,8 @@ calc_row_difference(
|
||||
}
|
||||
}
|
||||
|
||||
if (o_len != n_len || (o_len != UNIV_SQL_NULL &&
|
||||
0 != memcmp(o_ptr, n_ptr, o_len))) {
|
||||
if (o_len != n_len || (o_len != 0 && o_len != UNIV_SQL_NULL
|
||||
&& 0 != memcmp(o_ptr, n_ptr, o_len))) {
|
||||
/* The field has changed */
|
||||
|
||||
ufield = uvect->fields + n_changed;
|
||||
@@ -10503,7 +10446,8 @@ create_options_are_invalid(
|
||||
case ROW_TYPE_DYNAMIC:
|
||||
CHECK_ERROR_ROW_TYPE_NEEDS_FILE_PER_TABLE(use_tablespace);
|
||||
CHECK_ERROR_ROW_TYPE_NEEDS_GT_ANTELOPE;
|
||||
/* fall through since dynamic also shuns KBS */
|
||||
/* ROW_FORMAT=DYNAMIC also shuns KEY_BLOCK_SIZE */
|
||||
/* fall through */
|
||||
case ROW_TYPE_COMPACT:
|
||||
case ROW_TYPE_REDUNDANT:
|
||||
if (kbs_specified) {
|
||||
@@ -10885,7 +10829,8 @@ index_bad:
|
||||
break;
|
||||
}
|
||||
zip_allowed = FALSE;
|
||||
/* fall through to set row_format = COMPACT */
|
||||
/* Set ROW_FORMAT = COMPACT */
|
||||
/* fall through */
|
||||
case ROW_TYPE_NOT_USED:
|
||||
case ROW_TYPE_FIXED:
|
||||
case ROW_TYPE_PAGE:
|
||||
@@ -10894,6 +10839,7 @@ index_bad:
|
||||
thd, Sql_condition::WARN_LEVEL_WARN,
|
||||
ER_ILLEGAL_HA_CREATE_OPTION,
|
||||
"InnoDB: assuming ROW_FORMAT=COMPACT.");
|
||||
/* fall through */
|
||||
case ROW_TYPE_DEFAULT:
|
||||
/* If we fell through, set row format to Compact. */
|
||||
row_format = ROW_TYPE_COMPACT;
|
||||
@@ -13370,7 +13316,8 @@ fill_foreign_key_list(THD* thd,
|
||||
{
|
||||
ut_ad(mutex_own(&dict_sys->mutex));
|
||||
|
||||
for (dict_foreign_set::iterator it = table->referenced_set.begin();
|
||||
for (dict_foreign_set::const_iterator it
|
||||
= table->referenced_set.begin();
|
||||
it != table->referenced_set.end(); ++it) {
|
||||
|
||||
dict_foreign_t* foreign = *it;
|
||||
|
@@ -484,7 +484,7 @@ innobase_index_name_is_reserved(
|
||||
const KEY* key_info, /*!< in: Indexes to be created */
|
||||
ulint num_of_keys) /*!< in: Number of indexes to
|
||||
be created. */
|
||||
MY_ATTRIBUTE((nonnull, warn_unused_result));
|
||||
MY_ATTRIBUTE((nonnull(1), warn_unused_result));
|
||||
|
||||
/*****************************************************************//**
|
||||
Determines InnoDB table flags.
|
||||
|
@@ -2280,10 +2280,10 @@ online_retry_drop_indexes_with_trx(
|
||||
@param drop_fk constraints being dropped
|
||||
@param n_drop_fk number of constraints that are being dropped
|
||||
@return whether the constraint is being dropped */
|
||||
inline MY_ATTRIBUTE((pure, nonnull, warn_unused_result))
|
||||
MY_ATTRIBUTE((pure, nonnull(1), warn_unused_result))
|
||||
inline
|
||||
bool
|
||||
innobase_dropping_foreign(
|
||||
/*======================*/
|
||||
const dict_foreign_t* foreign,
|
||||
dict_foreign_t** drop_fk,
|
||||
ulint n_drop_fk)
|
||||
@@ -2307,10 +2307,10 @@ column that is being dropped or modified to NOT NULL.
|
||||
@retval true Not allowed (will call my_error())
|
||||
@retval false Allowed
|
||||
*/
|
||||
static MY_ATTRIBUTE((pure, nonnull, warn_unused_result))
|
||||
MY_ATTRIBUTE((pure, nonnull(1,4), warn_unused_result))
|
||||
static
|
||||
bool
|
||||
innobase_check_foreigns_low(
|
||||
/*========================*/
|
||||
const dict_table_t* user_table,
|
||||
dict_foreign_t** drop_fk,
|
||||
ulint n_drop_fk,
|
||||
@@ -2407,10 +2407,10 @@ column that is being dropped or modified to NOT NULL.
|
||||
@retval true Not allowed (will call my_error())
|
||||
@retval false Allowed
|
||||
*/
|
||||
static MY_ATTRIBUTE((pure, nonnull, warn_unused_result))
|
||||
MY_ATTRIBUTE((pure, nonnull(1,2,3,4), warn_unused_result))
|
||||
static
|
||||
bool
|
||||
innobase_check_foreigns(
|
||||
/*====================*/
|
||||
Alter_inplace_info* ha_alter_info,
|
||||
const TABLE* altered_table,
|
||||
const TABLE* old_table,
|
||||
|
@@ -1,6 +1,7 @@
|
||||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2017, MariaDB Corporation.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
@@ -2934,8 +2935,7 @@ ibuf_get_volume_buffered_hash(
|
||||
fold = ut_fold_binary(data, len);
|
||||
|
||||
hash += (fold / (CHAR_BIT * sizeof *hash)) % size;
|
||||
bitmask = static_cast<ulint>(
|
||||
1 << (fold % (CHAR_BIT * sizeof(*hash))));
|
||||
bitmask = static_cast<ulint>(1) << (fold % (CHAR_BIT * sizeof(*hash)));
|
||||
|
||||
if (*hash & bitmask) {
|
||||
|
||||
@@ -3704,7 +3704,7 @@ fail_exit:
|
||||
|
||||
if (mode == BTR_MODIFY_PREV) {
|
||||
err = btr_cur_optimistic_insert(
|
||||
BTR_NO_LOCKING_FLAG,
|
||||
BTR_NO_LOCKING_FLAG | BTR_NO_UNDO_LOG_FLAG,
|
||||
cursor, &offsets, &offsets_heap,
|
||||
ibuf_entry, &ins_rec,
|
||||
&dummy_big_rec, 0, thr, &mtr);
|
||||
|
@@ -1,6 +1,7 @@
|
||||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2017, MariaDB Corporation.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
@@ -220,15 +221,17 @@ btr_cur_optimistic_insert(
|
||||
btr_cur_t* cursor, /*!< in: cursor on page after which to insert;
|
||||
cursor stays valid */
|
||||
ulint** offsets,/*!< out: offsets on *rec */
|
||||
mem_heap_t** heap, /*!< in/out: pointer to memory heap, or NULL */
|
||||
mem_heap_t** heap, /*!< in/out: pointer to memory heap */
|
||||
dtuple_t* entry, /*!< in/out: entry to insert */
|
||||
rec_t** rec, /*!< out: pointer to inserted record if
|
||||
succeed */
|
||||
big_rec_t** big_rec,/*!< out: big rec vector whose fields have to
|
||||
be stored externally by the caller, or
|
||||
NULL */
|
||||
be stored externally by the caller */
|
||||
ulint n_ext, /*!< in: number of externally stored columns */
|
||||
que_thr_t* thr, /*!< in: query thread or NULL */
|
||||
que_thr_t* thr, /*!< in/out: query thread; can be NULL if
|
||||
!(~flags
|
||||
& (BTR_NO_LOCKING_FLAG
|
||||
| BTR_NO_UNDO_LOG_FLAG)) */
|
||||
mtr_t* mtr) /*!< in/out: mini-transaction;
|
||||
if this function returns DB_SUCCESS on
|
||||
a leaf page of a secondary index in a
|
||||
@@ -256,15 +259,17 @@ btr_cur_pessimistic_insert(
|
||||
cursor stays valid */
|
||||
ulint** offsets,/*!< out: offsets on *rec */
|
||||
mem_heap_t** heap, /*!< in/out: pointer to memory heap
|
||||
that can be emptied, or NULL */
|
||||
that can be emptied */
|
||||
dtuple_t* entry, /*!< in/out: entry to insert */
|
||||
rec_t** rec, /*!< out: pointer to inserted record if
|
||||
succeed */
|
||||
big_rec_t** big_rec,/*!< out: big rec vector whose fields have to
|
||||
be stored externally by the caller, or
|
||||
NULL */
|
||||
be stored externally by the caller */
|
||||
ulint n_ext, /*!< in: number of externally stored columns */
|
||||
que_thr_t* thr, /*!< in: query thread or NULL */
|
||||
que_thr_t* thr, /*!< in/out: query thread; can be NULL if
|
||||
!(~flags
|
||||
& (BTR_NO_LOCKING_FLAG
|
||||
| BTR_NO_UNDO_LOG_FLAG)) */
|
||||
mtr_t* mtr) /*!< in/out: mini-transaction */
|
||||
MY_ATTRIBUTE((nonnull(2,3,4,5,6,7,10), warn_unused_result));
|
||||
/*************************************************************//**
|
||||
@@ -392,12 +397,12 @@ btr_cur_pessimistic_update(
|
||||
ulint** offsets,/*!< out: offsets on cursor->page_cur.rec */
|
||||
mem_heap_t** offsets_heap,
|
||||
/*!< in/out: pointer to memory heap
|
||||
that can be emptied, or NULL */
|
||||
that can be emptied */
|
||||
mem_heap_t* entry_heap,
|
||||
/*!< in/out: memory heap for allocating
|
||||
big_rec and the index tuple */
|
||||
big_rec_t** big_rec,/*!< out: big rec vector whose fields have to
|
||||
be stored externally by the caller, or NULL */
|
||||
be stored externally by the caller */
|
||||
const upd_t* update, /*!< in: update vector; this is allowed also
|
||||
contain trx id and roll ptr fields, but
|
||||
the values in update vector have no effect */
|
||||
|
@@ -576,7 +576,8 @@ dtype_get_fixed_size_low(
|
||||
#else /* !UNIV_HOTBACKUP */
|
||||
return(len);
|
||||
#endif /* !UNIV_HOTBACKUP */
|
||||
/* fall through for variable-length charsets */
|
||||
/* Treat as variable-length. */
|
||||
/* Fall through */
|
||||
case DATA_VARCHAR:
|
||||
case DATA_BINARY:
|
||||
case DATA_DECIMAL:
|
||||
|
@@ -778,7 +778,7 @@ fil_create_new_single_table_tablespace(
|
||||
ulint size) /*!< in: the initial size of the
|
||||
tablespace file in pages,
|
||||
must be >= FIL_IBD_FILE_INITIAL_SIZE */
|
||||
MY_ATTRIBUTE((nonnull, warn_unused_result));
|
||||
MY_ATTRIBUTE((nonnull(2), warn_unused_result));
|
||||
#ifndef UNIV_HOTBACKUP
|
||||
/********************************************************************//**
|
||||
Tries to open a single-table tablespace and optionally checks the space id is
|
||||
|
@@ -1,6 +1,7 @@
|
||||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 2006, 2016, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2017, MariaDB Corporation.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
@@ -143,7 +144,7 @@ enum durability_properties
|
||||
thd_requested_durability(
|
||||
/*=====================*/
|
||||
const THD* thd) /*!< in: thread handle */
|
||||
MY_ATTRIBUTE((nonnull, warn_unused_result));
|
||||
MY_ATTRIBUTE((warn_unused_result));
|
||||
|
||||
/******************************************************************//**
|
||||
Returns true if the transaction this thread is processing has edited
|
||||
|
@@ -1,6 +1,7 @@
|
||||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 1995, 2009, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2017, MariaDB Corporation.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
@@ -779,13 +780,13 @@ mach_swap_byte_order(
|
||||
dest += len;
|
||||
|
||||
switch (len & 0x7) {
|
||||
case 0: *--dest = *from++;
|
||||
case 7: *--dest = *from++;
|
||||
case 6: *--dest = *from++;
|
||||
case 5: *--dest = *from++;
|
||||
case 4: *--dest = *from++;
|
||||
case 3: *--dest = *from++;
|
||||
case 2: *--dest = *from++;
|
||||
case 0: *--dest = *from++; /* fall through */
|
||||
case 7: *--dest = *from++; /* fall through */
|
||||
case 6: *--dest = *from++; /* fall through */
|
||||
case 5: *--dest = *from++; /* fall through */
|
||||
case 4: *--dest = *from++; /* fall through */
|
||||
case 3: *--dest = *from++; /* fall through */
|
||||
case 2: *--dest = *from++; /* fall through */
|
||||
case 1: *--dest = *from;
|
||||
}
|
||||
}
|
||||
|
@@ -2,6 +2,7 @@
|
||||
|
||||
Copyright (c) 2005, 2013, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2012, Facebook Inc.
|
||||
Copyright (c) 2017, MariaDB Corporation.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
@@ -172,7 +173,8 @@ page_zip_rec_needs_ext(
|
||||
ignored if zip_size == 0 */
|
||||
ulint zip_size) /*!< in: compressed page size in bytes, or 0 */
|
||||
{
|
||||
ut_ad(rec_size > comp ? REC_N_NEW_EXTRA_BYTES : REC_N_OLD_EXTRA_BYTES);
|
||||
ut_ad(rec_size
|
||||
> (comp ? REC_N_NEW_EXTRA_BYTES : REC_N_OLD_EXTRA_BYTES));
|
||||
ut_ad(ut_is_2pow(zip_size));
|
||||
ut_ad(comp || !zip_size);
|
||||
|
||||
|
@@ -1,6 +1,7 @@
|
||||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2017, MariaDB Corporation.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
@@ -212,10 +213,6 @@ UNIV_INTERN
|
||||
dberr_t
|
||||
trx_undo_report_row_operation(
|
||||
/*==========================*/
|
||||
ulint flags, /*!< in: if BTR_NO_UNDO_LOG_FLAG bit is
|
||||
set, does nothing */
|
||||
ulint op_type, /*!< in: TRX_UNDO_INSERT_OP or
|
||||
TRX_UNDO_MODIFY_OP */
|
||||
que_thr_t* thr, /*!< in: query thread */
|
||||
dict_index_t* index, /*!< in: clustered index */
|
||||
const dtuple_t* clust_entry, /*!< in: in the case of an insert,
|
||||
@@ -233,7 +230,7 @@ trx_undo_report_row_operation(
|
||||
inserted undo log record,
|
||||
0 if BTR_NO_UNDO_LOG
|
||||
flag was specified */
|
||||
MY_ATTRIBUTE((nonnull(3,4,10), warn_unused_result));
|
||||
MY_ATTRIBUTE((nonnull(1,2,8), warn_unused_result));
|
||||
/******************************************************************//**
|
||||
Copies an undo record to heap. This function can be called if we know that
|
||||
the undo log record exists.
|
||||
@@ -313,10 +310,6 @@ record */
|
||||
storage fields: used by purge to
|
||||
free the external storage */
|
||||
|
||||
/* Operation type flags used in trx_undo_report_row_operation */
|
||||
#define TRX_UNDO_INSERT_OP 1
|
||||
#define TRX_UNDO_MODIFY_OP 2
|
||||
|
||||
#ifndef UNIV_NONINL
|
||||
#include "trx0rec.ic"
|
||||
#endif
|
||||
|
@@ -1,6 +1,7 @@
|
||||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 1994, 2009, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2017, MariaDB Corporation.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
@@ -237,16 +238,22 @@ ut_fold_binary(
|
||||
switch (len & 0x7) {
|
||||
case 7:
|
||||
fold = ut_fold_ulint_pair(fold, (ulint)(*str++));
|
||||
/* fall through */
|
||||
case 6:
|
||||
fold = ut_fold_ulint_pair(fold, (ulint)(*str++));
|
||||
/* fall through */
|
||||
case 5:
|
||||
fold = ut_fold_ulint_pair(fold, (ulint)(*str++));
|
||||
/* fall through */
|
||||
case 4:
|
||||
fold = ut_fold_ulint_pair(fold, (ulint)(*str++));
|
||||
/* fall through */
|
||||
case 3:
|
||||
fold = ut_fold_ulint_pair(fold, (ulint)(*str++));
|
||||
/* fall through */
|
||||
case 2:
|
||||
fold = ut_fold_ulint_pair(fold, (ulint)(*str++));
|
||||
/* fall through */
|
||||
case 1:
|
||||
fold = ut_fold_ulint_pair(fold, (ulint)(*str++));
|
||||
}
|
||||
|
@@ -4788,13 +4788,11 @@ lock_rec_unlock(
|
||||
trx_mutex_exit(trx);
|
||||
|
||||
stmt = innobase_get_stmt(trx->mysql_thd, &stmt_len);
|
||||
ut_print_timestamp(stderr);
|
||||
fprintf(stderr,
|
||||
" InnoDB: Error: unlock row could not"
|
||||
" find a %lu mode lock on the record\n",
|
||||
(ulong) lock_mode);
|
||||
ut_print_timestamp(stderr);
|
||||
fprintf(stderr, " InnoDB: current statement: %.*s\n",
|
||||
|
||||
ib_logf(IB_LOG_LEVEL_ERROR,
|
||||
"unlock row could not find a %u mode lock on the record;"
|
||||
" statement=%.*s",
|
||||
lock_mode,
|
||||
(int) stmt_len, stmt);
|
||||
|
||||
return;
|
||||
|
@@ -1290,8 +1290,10 @@ rec_convert_dtuple_to_rec_comp(
|
||||
}
|
||||
}
|
||||
|
||||
memcpy(end, dfield_get_data(field), len);
|
||||
end += len;
|
||||
if (len) {
|
||||
memcpy(end, dfield_get_data(field), len);
|
||||
end += len;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1,6 +1,7 @@
|
||||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 2010, 2016, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2017, MariaDB Corporation.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
@@ -228,9 +229,6 @@ row_fts_psort_info_init(
|
||||
each parallel sort thread. Each "sort bucket" holds records for
|
||||
a particular "FTS index partition" */
|
||||
for (j = 0; j < fts_sort_pll_degree; j++) {
|
||||
|
||||
UT_LIST_INIT(psort_info[j].fts_doc_list);
|
||||
|
||||
for (i = 0; i < FTS_NUM_AUX_INDEX; i++) {
|
||||
|
||||
psort_info[j].merge_file[i] =
|
||||
|
@@ -2018,6 +2018,7 @@ PageConverter::update_page(
|
||||
case FIL_PAGE_TYPE_XDES:
|
||||
err = set_current_xdes(
|
||||
buf_block_get_page_no(block), get_frame(block));
|
||||
/* fall through */
|
||||
case FIL_PAGE_INODE:
|
||||
case FIL_PAGE_TYPE_TRX_SYS:
|
||||
case FIL_PAGE_IBUF_FREE_LIST:
|
||||
|
@@ -1,6 +1,7 @@
|
||||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2017, MariaDB Corporation.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
@@ -2139,14 +2140,10 @@ for a clustered index!
|
||||
@retval DB_SUCCESS if no error
|
||||
@retval DB_DUPLICATE_KEY if error,
|
||||
@retval DB_LOCK_WAIT if we have to wait for a lock on a possible duplicate
|
||||
record
|
||||
@retval DB_SUCCESS_LOCKED_REC if an exact match of the record was found
|
||||
in online table rebuild (flags & (BTR_KEEP_SYS_FLAG | BTR_NO_LOCKING_FLAG)) */
|
||||
record */
|
||||
static MY_ATTRIBUTE((nonnull, warn_unused_result))
|
||||
dberr_t
|
||||
row_ins_duplicate_error_in_clust(
|
||||
/*=============================*/
|
||||
ulint flags, /*!< in: undo logging and locking flags */
|
||||
btr_cur_t* cursor, /*!< in: B-tree cursor */
|
||||
const dtuple_t* entry, /*!< in: entry to insert */
|
||||
que_thr_t* thr, /*!< in: query thread */
|
||||
@@ -2421,7 +2418,7 @@ row_ins_clust_index_entry_low(
|
||||
DB_LOCK_WAIT */
|
||||
|
||||
err = row_ins_duplicate_error_in_clust(
|
||||
flags, &cursor, entry, thr, &mtr);
|
||||
&cursor, entry, thr, &mtr);
|
||||
}
|
||||
|
||||
if (err != DB_SUCCESS) {
|
||||
|
@@ -1,6 +1,7 @@
|
||||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 2011, 2016, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2017, MariaDB Corporation.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
@@ -1872,6 +1873,7 @@ row_log_table_apply_update(
|
||||
|
||||
When applying the subsequent ROW_T_DELETE, no matching
|
||||
record will be found. */
|
||||
/* fall through */
|
||||
case DB_SUCCESS:
|
||||
ut_ad(row != NULL);
|
||||
break;
|
||||
|
@@ -5421,7 +5421,8 @@ loop:
|
||||
fputs(" InnoDB: Warning: CHECK TABLE on ", stderr);
|
||||
dict_index_name_print(stderr, prebuilt->trx, index);
|
||||
fprintf(stderr, " returned %lu\n", ret);
|
||||
/* fall through (this error is ignored by CHECK TABLE) */
|
||||
/* (this error is ignored by CHECK TABLE) */
|
||||
/* fall through */
|
||||
case DB_END_OF_INDEX:
|
||||
func_exit:
|
||||
mem_free(buf);
|
||||
|
@@ -1,6 +1,7 @@
|
||||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2017, MariaDB Corporation.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
@@ -488,8 +489,9 @@ row_purge_remove_sec_if_poss_leaf(
|
||||
success = false;
|
||||
}
|
||||
}
|
||||
/* fall through (the index entry is still needed,
|
||||
/* (The index entry is still needed,
|
||||
or the deletion succeeded) */
|
||||
/* fall through */
|
||||
case ROW_NOT_DELETED_REF:
|
||||
/* The index entry is still needed. */
|
||||
case ROW_BUFFERED:
|
||||
|
@@ -401,7 +401,7 @@ UNIV_INTERN my_bool srv_cleaner_thread_priority = FALSE;
|
||||
UNIV_INTERN my_bool srv_master_thread_priority = FALSE;
|
||||
|
||||
/* The number of purge threads to use.*/
|
||||
UNIV_INTERN ulong srv_n_purge_threads = 1;
|
||||
UNIV_INTERN ulong srv_n_purge_threads;
|
||||
|
||||
/* the number of pages to purge in one batch */
|
||||
UNIV_INTERN ulong srv_purge_batch_size = 20;
|
||||
@@ -626,16 +626,16 @@ current_time % 5 != 0. */
|
||||
|
||||
/** Acquire the system_mutex. */
|
||||
#define srv_sys_mutex_enter() do { \
|
||||
mutex_enter(&srv_sys->mutex); \
|
||||
mutex_enter(&srv_sys.mutex); \
|
||||
} while (0)
|
||||
|
||||
/** Test if the system mutex is owned. */
|
||||
#define srv_sys_mutex_own() (mutex_own(&srv_sys->mutex) \
|
||||
#define srv_sys_mutex_own() (mutex_own(&srv_sys.mutex) \
|
||||
&& !srv_read_only_mode)
|
||||
|
||||
/** Release the system mutex. */
|
||||
#define srv_sys_mutex_exit() do { \
|
||||
mutex_exit(&srv_sys->mutex); \
|
||||
mutex_exit(&srv_sys.mutex); \
|
||||
} while (0)
|
||||
|
||||
#define fetch_lock_wait_timeout(trx) \
|
||||
@@ -730,7 +730,7 @@ struct srv_sys_t{
|
||||
ulint n_sys_threads; /*!< size of the sys_threads
|
||||
array */
|
||||
|
||||
srv_slot_t* sys_threads; /*!< server thread table;
|
||||
srv_slot_t sys_threads[32 + 1]; /*!< server thread table;
|
||||
os_event_set() and
|
||||
os_event_reset() on
|
||||
sys_threads[]->event are
|
||||
@@ -754,7 +754,7 @@ struct srv_sys_t{
|
||||
UNIV_INTERN ib_mutex_t server_mutex;
|
||||
#endif /* !HAVE_ATOMIC_BUILTINS */
|
||||
|
||||
static srv_sys_t* srv_sys = NULL;
|
||||
static srv_sys_t srv_sys;
|
||||
|
||||
/** Event to signal srv_monitor_thread. Not protected by a mutex.
|
||||
Set after setting srv_print_innodb_monitor. */
|
||||
@@ -776,10 +776,10 @@ and/or load it during startup. */
|
||||
UNIV_INTERN char srv_buffer_pool_dump_at_shutdown = FALSE;
|
||||
UNIV_INTERN char srv_buffer_pool_load_at_startup = FALSE;
|
||||
|
||||
/** Slot index in the srv_sys->sys_threads array for the purge thread. */
|
||||
/** Slot index in the srv_sys.sys_threads array for the purge thread. */
|
||||
static const ulint SRV_PURGE_SLOT = 1;
|
||||
|
||||
/** Slot index in the srv_sys->sys_threads array for the master thread. */
|
||||
/** Slot index in the srv_sys.sys_threads array for the master thread. */
|
||||
static const ulint SRV_MASTER_SLOT = 0;
|
||||
|
||||
UNIV_INTERN os_event_t srv_checkpoint_completed_event;
|
||||
@@ -889,21 +889,21 @@ srv_reserve_slot(
|
||||
|
||||
switch (type) {
|
||||
case SRV_MASTER:
|
||||
slot = &srv_sys->sys_threads[SRV_MASTER_SLOT];
|
||||
slot = &srv_sys.sys_threads[SRV_MASTER_SLOT];
|
||||
break;
|
||||
|
||||
case SRV_PURGE:
|
||||
slot = &srv_sys->sys_threads[SRV_PURGE_SLOT];
|
||||
slot = &srv_sys.sys_threads[SRV_PURGE_SLOT];
|
||||
break;
|
||||
|
||||
case SRV_WORKER:
|
||||
/* Find an empty slot, skip the master and purge slots. */
|
||||
for (slot = &srv_sys->sys_threads[2];
|
||||
for (slot = &srv_sys.sys_threads[2];
|
||||
slot->in_use;
|
||||
++slot) {
|
||||
|
||||
ut_a(slot < &srv_sys->sys_threads[
|
||||
srv_sys->n_sys_threads]);
|
||||
ut_a(slot < &srv_sys.sys_threads[
|
||||
srv_sys.n_sys_threads]);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -919,7 +919,7 @@ srv_reserve_slot(
|
||||
|
||||
ut_ad(srv_slot_get_type(slot) == type);
|
||||
|
||||
++srv_sys->n_threads_active[type];
|
||||
++srv_sys.n_threads_active[type];
|
||||
|
||||
srv_sys_mutex_exit();
|
||||
|
||||
@@ -949,27 +949,27 @@ srv_suspend_thread_low(
|
||||
case SRV_MASTER:
|
||||
/* We have only one master thread and it
|
||||
should be the first entry always. */
|
||||
ut_a(srv_sys->n_threads_active[type] == 1);
|
||||
ut_a(srv_sys.n_threads_active[type] == 1);
|
||||
break;
|
||||
|
||||
case SRV_PURGE:
|
||||
/* We have only one purge coordinator thread
|
||||
and it should be the second entry always. */
|
||||
ut_a(srv_sys->n_threads_active[type] == 1);
|
||||
ut_a(srv_sys.n_threads_active[type] == 1);
|
||||
break;
|
||||
|
||||
case SRV_WORKER:
|
||||
ut_a(srv_n_purge_threads > 1);
|
||||
ut_a(srv_sys->n_threads_active[type] > 0);
|
||||
ut_a(srv_sys.n_threads_active[type] > 0);
|
||||
break;
|
||||
}
|
||||
|
||||
ut_a(!slot->suspended);
|
||||
slot->suspended = TRUE;
|
||||
|
||||
ut_a(srv_sys->n_threads_active[type] > 0);
|
||||
ut_a(srv_sys.n_threads_active[type] > 0);
|
||||
|
||||
srv_sys->n_threads_active[type]--;
|
||||
srv_sys.n_threads_active[type]--;
|
||||
|
||||
return(os_event_reset(slot->event));
|
||||
}
|
||||
@@ -1024,7 +1024,7 @@ srv_resume_thread(srv_slot_t* slot, ib_int64_t sig_count = 0, bool wait = true,
|
||||
ut_ad(slot->suspended);
|
||||
|
||||
slot->suspended = FALSE;
|
||||
++srv_sys->n_threads_active[slot->type];
|
||||
++srv_sys.n_threads_active[slot->type];
|
||||
srv_sys_mutex_exit();
|
||||
return(timeout);
|
||||
}
|
||||
@@ -1046,8 +1046,8 @@ srv_release_threads(enum srv_thread_type type, ulint n)
|
||||
|
||||
srv_sys_mutex_enter();
|
||||
|
||||
for (ulint i = 0; i < srv_sys->n_sys_threads; i++) {
|
||||
srv_slot_t* slot = &srv_sys->sys_threads[i];
|
||||
for (ulint i = 0; i < srv_sys.n_sys_threads; i++) {
|
||||
srv_slot_t* slot = &srv_sys.sys_threads[i];
|
||||
|
||||
if (!slot->in_use || srv_slot_get_type(slot) != type) {
|
||||
continue;
|
||||
@@ -1067,7 +1067,7 @@ srv_release_threads(enum srv_thread_type type, ulint n)
|
||||
should be the first entry always. */
|
||||
ut_a(n == 1);
|
||||
ut_a(i == SRV_MASTER_SLOT);
|
||||
ut_a(srv_sys->n_threads_active[type] == 0);
|
||||
ut_a(srv_sys.n_threads_active[type] == 0);
|
||||
break;
|
||||
|
||||
case SRV_PURGE:
|
||||
@@ -1076,12 +1076,12 @@ srv_release_threads(enum srv_thread_type type, ulint n)
|
||||
ut_a(n == 1);
|
||||
ut_a(i == SRV_PURGE_SLOT);
|
||||
ut_a(srv_n_purge_threads > 0);
|
||||
ut_a(srv_sys->n_threads_active[type] == 0);
|
||||
ut_a(srv_sys.n_threads_active[type] == 0);
|
||||
break;
|
||||
|
||||
case SRV_WORKER:
|
||||
ut_a(srv_n_purge_threads > 1);
|
||||
ut_a(srv_sys->n_threads_active[type]
|
||||
ut_a(srv_sys.n_threads_active[type]
|
||||
< srv_n_purge_threads - 1);
|
||||
break;
|
||||
}
|
||||
@@ -1119,9 +1119,6 @@ void
|
||||
srv_init(void)
|
||||
/*==========*/
|
||||
{
|
||||
ulint n_sys_threads = 0;
|
||||
ulint srv_sys_sz = sizeof(*srv_sys);
|
||||
|
||||
#ifndef HAVE_ATOMIC_BUILTINS
|
||||
mutex_create(server_mutex_key, &server_mutex, SYNC_ANY_LATCH);
|
||||
#endif /* !HAVE_ATOMIC_BUILTINS */
|
||||
@@ -1129,29 +1126,19 @@ srv_init(void)
|
||||
mutex_create(srv_innodb_monitor_mutex_key,
|
||||
&srv_innodb_monitor_mutex, SYNC_NO_ORDER_CHECK);
|
||||
|
||||
if (!srv_read_only_mode) {
|
||||
|
||||
/* Number of purge threads + master thread */
|
||||
n_sys_threads = srv_n_purge_threads + 1;
|
||||
|
||||
srv_sys_sz += n_sys_threads * sizeof(*srv_sys->sys_threads);
|
||||
}
|
||||
|
||||
srv_sys = static_cast<srv_sys_t*>(mem_zalloc(srv_sys_sz));
|
||||
|
||||
srv_sys->n_sys_threads = n_sys_threads;
|
||||
srv_sys.n_sys_threads = srv_read_only_mode
|
||||
? 0
|
||||
: srv_n_purge_threads + 1/* purge coordinator */;
|
||||
|
||||
if (!srv_read_only_mode) {
|
||||
|
||||
mutex_create(srv_sys_mutex_key, &srv_sys->mutex, SYNC_THREADS);
|
||||
mutex_create(srv_sys_mutex_key, &srv_sys.mutex, SYNC_THREADS);
|
||||
|
||||
mutex_create(srv_sys_tasks_mutex_key,
|
||||
&srv_sys->tasks_mutex, SYNC_ANY_LATCH);
|
||||
&srv_sys.tasks_mutex, SYNC_ANY_LATCH);
|
||||
|
||||
srv_sys->sys_threads = (srv_slot_t*) &srv_sys[1];
|
||||
|
||||
for (ulint i = 0; i < srv_sys->n_sys_threads; ++i) {
|
||||
srv_slot_t* slot = &srv_sys->sys_threads[i];
|
||||
for (ulint i = 0; i < srv_sys.n_sys_threads; ++i) {
|
||||
srv_slot_t* slot = &srv_sys.sys_threads[i];
|
||||
|
||||
slot->event = os_event_create();
|
||||
|
||||
@@ -1171,8 +1158,6 @@ srv_init(void)
|
||||
if (srv_track_changed_pages) {
|
||||
os_event_set(srv_redo_log_tracked_event);
|
||||
}
|
||||
|
||||
UT_LIST_INIT(srv_sys->tasks);
|
||||
}
|
||||
|
||||
/* page_zip_stat_per_index_mutex is acquired from:
|
||||
@@ -1212,8 +1197,8 @@ srv_free(void)
|
||||
|
||||
if (!srv_read_only_mode) {
|
||||
|
||||
for (ulint i = 0; i < srv_sys->n_sys_threads; i++)
|
||||
os_event_free(srv_sys->sys_threads[i].event);
|
||||
for (ulint i = 0; i < srv_sys.n_sys_threads; i++)
|
||||
os_event_free(srv_sys.sys_threads[i].event);
|
||||
|
||||
os_event_free(srv_error_event);
|
||||
srv_error_event = NULL;
|
||||
@@ -1225,8 +1210,8 @@ srv_free(void)
|
||||
srv_checkpoint_completed_event = NULL;
|
||||
os_event_free(srv_redo_log_tracked_event);
|
||||
srv_redo_log_tracked_event = NULL;
|
||||
mutex_free(&srv_sys->mutex);
|
||||
mutex_free(&srv_sys->tasks_mutex);
|
||||
mutex_free(&srv_sys.mutex);
|
||||
mutex_free(&srv_sys.tasks_mutex);
|
||||
}
|
||||
|
||||
#ifndef HAVE_ATOMIC_BUILTINS
|
||||
@@ -1235,9 +1220,6 @@ srv_free(void)
|
||||
mutex_free(&srv_innodb_monitor_mutex);
|
||||
mutex_free(&page_zip_stat_per_index_mutex);
|
||||
|
||||
mem_free(srv_sys);
|
||||
srv_sys = NULL;
|
||||
|
||||
trx_i_s_cache_free(trx_i_s_cache);
|
||||
}
|
||||
|
||||
@@ -2320,9 +2302,9 @@ srv_inc_activity_count(
|
||||
is caused by the background
|
||||
change buffer merge */
|
||||
{
|
||||
srv_sys->activity_count.inc();
|
||||
srv_sys.activity_count.inc();
|
||||
if (ibuf_merge_activity)
|
||||
srv_sys->ibuf_merge_activity_count.inc();
|
||||
srv_sys.ibuf_merge_activity_count.inc();
|
||||
}
|
||||
|
||||
/**********************************************************************//**
|
||||
@@ -2344,7 +2326,7 @@ srv_get_active_thread_type(void)
|
||||
srv_sys_mutex_enter();
|
||||
|
||||
for (ulint i = SRV_WORKER; i <= SRV_MASTER; ++i) {
|
||||
if (srv_sys->n_threads_active[i] != 0) {
|
||||
if (srv_sys.n_threads_active[i] != 0) {
|
||||
ret = static_cast<srv_thread_type>(i);
|
||||
break;
|
||||
}
|
||||
@@ -2597,12 +2579,12 @@ srv_active_wake_master_thread(void)
|
||||
|
||||
srv_inc_activity_count();
|
||||
|
||||
if (srv_sys->n_threads_active[SRV_MASTER] == 0) {
|
||||
if (srv_sys.n_threads_active[SRV_MASTER] == 0) {
|
||||
srv_slot_t* slot;
|
||||
|
||||
srv_sys_mutex_enter();
|
||||
|
||||
slot = &srv_sys->sys_threads[SRV_MASTER_SLOT];
|
||||
slot = &srv_sys.sys_threads[SRV_MASTER_SLOT];
|
||||
|
||||
/* Only if the master thread has been started. */
|
||||
|
||||
@@ -2629,7 +2611,7 @@ srv_wake_purge_thread_if_not_active(void)
|
||||
ut_ad(!srv_sys_mutex_own());
|
||||
|
||||
if (purge_sys->state == PURGE_STATE_RUN
|
||||
&& srv_sys->n_threads_active[SRV_PURGE] == 0) {
|
||||
&& srv_sys.n_threads_active[SRV_PURGE] == 0) {
|
||||
|
||||
srv_release_threads(SRV_PURGE, 1);
|
||||
}
|
||||
@@ -2658,7 +2640,7 @@ ulint
|
||||
srv_get_activity_count(void)
|
||||
/*========================*/
|
||||
{
|
||||
return(srv_sys->activity_count);
|
||||
return(srv_sys.activity_count);
|
||||
}
|
||||
|
||||
/** Get current server ibuf merge activity count.
|
||||
@@ -2667,7 +2649,7 @@ static
|
||||
ulint
|
||||
srv_get_ibuf_merge_activity_count(void)
|
||||
{
|
||||
return(srv_sys->ibuf_merge_activity_count);
|
||||
return(srv_sys.ibuf_merge_activity_count);
|
||||
}
|
||||
|
||||
/*******************************************************************//**
|
||||
@@ -2686,14 +2668,14 @@ srv_check_activity(
|
||||
ULINT_UNDEFINED */
|
||||
ulint old_ibuf_merge_activity_count)
|
||||
{
|
||||
ulint new_activity_count = srv_sys->activity_count;
|
||||
ulint new_activity_count = srv_sys.activity_count;
|
||||
if (old_ibuf_merge_activity_count == ULINT_UNDEFINED)
|
||||
return(new_activity_count != old_activity_count);
|
||||
|
||||
/* If we care about ibuf merge activity, then the server is considered
|
||||
idle if all activity, if any, was due to ibuf merge. */
|
||||
ulint new_ibuf_merge_activity_count
|
||||
= srv_sys->ibuf_merge_activity_count;
|
||||
= srv_sys.ibuf_merge_activity_count;
|
||||
|
||||
ut_ad(new_ibuf_merge_activity_count <= new_activity_count);
|
||||
ut_ad(new_ibuf_merge_activity_count >= old_ibuf_merge_activity_count);
|
||||
@@ -3086,7 +3068,7 @@ DECLARE_THREAD(srv_master_thread)(
|
||||
srv_main_thread_id = os_thread_pf(os_thread_get_curr_id());
|
||||
|
||||
slot = srv_reserve_slot(SRV_MASTER);
|
||||
ut_a(slot == srv_sys->sys_threads);
|
||||
ut_a(slot == srv_sys.sys_threads);
|
||||
|
||||
last_print_time = ut_time();
|
||||
loop:
|
||||
@@ -3183,18 +3165,18 @@ srv_task_execute(void)
|
||||
ut_ad(!srv_read_only_mode);
|
||||
ut_a(srv_force_recovery < SRV_FORCE_NO_BACKGROUND);
|
||||
|
||||
mutex_enter(&srv_sys->tasks_mutex);
|
||||
mutex_enter(&srv_sys.tasks_mutex);
|
||||
|
||||
if (UT_LIST_GET_LEN(srv_sys->tasks) > 0) {
|
||||
if (UT_LIST_GET_LEN(srv_sys.tasks) > 0) {
|
||||
|
||||
thr = UT_LIST_GET_FIRST(srv_sys->tasks);
|
||||
thr = UT_LIST_GET_FIRST(srv_sys.tasks);
|
||||
|
||||
ut_a(que_node_get_type(thr->child) == QUE_NODE_PURGE);
|
||||
|
||||
UT_LIST_REMOVE(queue, srv_sys->tasks, thr);
|
||||
UT_LIST_REMOVE(queue, srv_sys.tasks, thr);
|
||||
}
|
||||
|
||||
mutex_exit(&srv_sys->tasks_mutex);
|
||||
mutex_exit(&srv_sys.tasks_mutex);
|
||||
|
||||
if (thr != NULL) {
|
||||
|
||||
@@ -3246,7 +3228,7 @@ DECLARE_THREAD(srv_worker_thread)(
|
||||
|
||||
srv_sys_mutex_enter();
|
||||
|
||||
ut_a(srv_sys->n_threads_active[SRV_WORKER] < srv_n_purge_threads);
|
||||
ut_a(srv_sys.n_threads_active[SRV_WORKER] < srv_n_purge_threads);
|
||||
|
||||
srv_sys_mutex_exit();
|
||||
|
||||
@@ -3590,11 +3572,11 @@ srv_que_task_enqueue_low(
|
||||
que_thr_t* thr) /*!< in: query thread */
|
||||
{
|
||||
ut_ad(!srv_read_only_mode);
|
||||
mutex_enter(&srv_sys->tasks_mutex);
|
||||
mutex_enter(&srv_sys.tasks_mutex);
|
||||
|
||||
UT_LIST_ADD_LAST(queue, srv_sys->tasks, thr);
|
||||
UT_LIST_ADD_LAST(queue, srv_sys.tasks, thr);
|
||||
|
||||
mutex_exit(&srv_sys->tasks_mutex);
|
||||
mutex_exit(&srv_sys.tasks_mutex);
|
||||
|
||||
srv_release_threads(SRV_WORKER, 1);
|
||||
}
|
||||
@@ -3611,11 +3593,11 @@ srv_get_task_queue_length(void)
|
||||
|
||||
ut_ad(!srv_read_only_mode);
|
||||
|
||||
mutex_enter(&srv_sys->tasks_mutex);
|
||||
mutex_enter(&srv_sys.tasks_mutex);
|
||||
|
||||
n_tasks = UT_LIST_GET_LEN(srv_sys->tasks);
|
||||
n_tasks = UT_LIST_GET_LEN(srv_sys.tasks);
|
||||
|
||||
mutex_exit(&srv_sys->tasks_mutex);
|
||||
mutex_exit(&srv_sys.tasks_mutex);
|
||||
|
||||
return(n_tasks);
|
||||
}
|
||||
|
@@ -1220,6 +1220,7 @@ sync_thread_add_level(
|
||||
upgrading in innobase_start_or_create_for_mysql(). */
|
||||
break;
|
||||
}
|
||||
/* fall through */
|
||||
case SYNC_MEM_POOL:
|
||||
case SYNC_MEM_HASH:
|
||||
case SYNC_RECV:
|
||||
@@ -1282,9 +1283,9 @@ sync_thread_add_level(
|
||||
}
|
||||
}
|
||||
ut_ad(found_current);
|
||||
|
||||
/* fallthrough */
|
||||
}
|
||||
|
||||
/* fall through */
|
||||
case SYNC_BUF_FLUSH_LIST:
|
||||
case SYNC_BUF_LRU_LIST:
|
||||
case SYNC_BUF_FREE_LIST:
|
||||
|
@@ -507,7 +507,9 @@ fill_trx_row(
|
||||
|
||||
row->trx_mysql_thread_id = thd_get_thread_id(trx->mysql_thd);
|
||||
|
||||
stmt = innobase_get_stmt(trx->mysql_thd, &stmt_len);
|
||||
stmt = trx->mysql_thd
|
||||
? innobase_get_stmt(trx->mysql_thd, &stmt_len)
|
||||
: NULL;
|
||||
|
||||
if (stmt != NULL) {
|
||||
char query[TRX_I_S_TRX_QUERY_MAX_LEN + 1];
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user