diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-01-23 15:09:06 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-01-23 15:09:06 +0200 |
commit | 9a7281a70396e6bdd2ce10bf328d36909e044ba6 (patch) | |
tree | 065b23cc91f21ba8d1711d08c5f23fe29ae4dd3b | |
parent | d06ebd932d1a0ba4c51b183d5b52a9fa99d8f6ae (diff) | |
parent | 3b6d2efcb1d5be93574b3b345e3dbfc8fc9387e1 (diff) | |
download | mariadb-git-9a7281a70396e6bdd2ce10bf328d36909e044ba6.tar.gz |
Merge 10.1 into 10.2
-rw-r--r-- | mysql-test/r/huge_frm-6224.result | 2 | ||||
-rw-r--r-- | mysql-test/r/range_innodb.result | 24 | ||||
-rw-r--r-- | mysql-test/suite/innodb/r/innodb_28867993.result | 9 | ||||
-rw-r--r-- | mysql-test/suite/innodb/t/innodb_28867993.test | 12 | ||||
-rw-r--r-- | mysql-test/t/huge_frm-6224.test | 11 | ||||
-rw-r--r-- | mysql-test/t/range_innodb.test | 25 | ||||
-rw-r--r-- | scripts/wsrep_sst_mariabackup.sh | 78 | ||||
-rw-r--r-- | sql/opt_range.cc | 3 | ||||
-rw-r--r-- | sql/unireg.h | 2 | ||||
-rw-r--r-- | storage/innobase/dict/dict0dict.cc | 38 | ||||
-rw-r--r-- | storage/innobase/fil/fil0fil.cc | 16 | ||||
-rw-r--r-- | storage/innobase/srv/srv0srv.cc | 2 | ||||
-rw-r--r-- | storage/innobase/srv/srv0start.cc | 4 | ||||
-rw-r--r-- | storage/xtradb/dict/dict0dict.cc | 38 | ||||
-rw-r--r-- | storage/xtradb/fil/fil0fil.cc | 16 | ||||
-rw-r--r-- | storage/xtradb/srv/srv0srv.cc | 6 | ||||
-rw-r--r-- | storage/xtradb/srv/srv0start.cc | 3 |
17 files changed, 203 insertions, 86 deletions
diff --git a/mysql-test/r/huge_frm-6224.result b/mysql-test/r/huge_frm-6224.result index 3772317c04d..0d6dd968295 100644 --- a/mysql-test/r/huge_frm-6224.result +++ b/mysql-test/r/huge_frm-6224.result @@ -1 +1,3 @@ +set global max_allowed_packet=1024*1024*10; ERROR HY000: The definition for table `t1` is too big +set global max_allowed_packet=default; diff --git a/mysql-test/r/range_innodb.result b/mysql-test/r/range_innodb.result index 8bb1c833a56..6572b248911 100644 --- a/mysql-test/r/range_innodb.result +++ b/mysql-test/r/range_innodb.result @@ -55,3 +55,27 @@ pk f1 f2 f3 pk f1 f2 f3 f4 f5 2 6 v NULL 14 1 q NULL 4 q 3 7 c NULL 14 1 q NULL 4 q drop table t1,t2; +# +# MDEV-14440: Server crash in in handler::ha_external_lock or Assertion `inited==RND' +# failed in handler::ha_rnd_end upon SELECT from partitioned table +# +set @optimizer_switch_save= @@optimizer_switch; +set optimizer_switch='index_merge_sort_intersection=off'; +create table t0 (a int)engine=innodb; +insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +create table t1 ( +a int, b int, c int, +key(a),key(b),key(c) +)engine=innodb; +insert into t1 +select A.a+10*B.a, A.a+10*B.a, A.a+10*B.a+100*C.a +from t0 A, t0 B, t0 C, t0 D where D.a<5; +set @@global.debug_dbug="+d,ha_index_init_fail"; +explain select * from t1 where a=10 and b=10; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index_merge a,b a,b 5,5 NULL 1 Using intersect(a,b); Using where +select * from t1 where a=10 and b=10; +ERROR HY000: Table definition has changed, please retry transaction +DROP TABLE t0,t1; +set @@global.debug_dbug="-d"; +set @@optimizer_switch= @optimizer_switch_save; diff --git a/mysql-test/suite/innodb/r/innodb_28867993.result b/mysql-test/suite/innodb/r/innodb_28867993.result new file mode 100644 index 00000000000..acc6734eaee --- /dev/null +++ b/mysql-test/suite/innodb/r/innodb_28867993.result @@ -0,0 +1,9 @@ +create table t1 (a int) engine=innodb; +insert t1 values (1),(2); +create database ib_logfile2; +select * from t1; +a +1 +2 +drop table t1; +drop database ib_logfile2; diff --git a/mysql-test/suite/innodb/t/innodb_28867993.test b/mysql-test/suite/innodb/t/innodb_28867993.test new file mode 100644 index 00000000000..61e9578df7b --- /dev/null +++ b/mysql-test/suite/innodb/t/innodb_28867993.test @@ -0,0 +1,12 @@ +# +# Bug#28867993: POSSIBLE ISSUE WITH MYSQL SERVER RESTART +# + +source include/have_innodb.inc; +create table t1 (a int) engine=innodb; +insert t1 values (1),(2); +create database ib_logfile2; +source include/restart_mysqld.inc; +select * from t1; +drop table t1; +drop database ib_logfile2; diff --git a/mysql-test/t/huge_frm-6224.test b/mysql-test/t/huge_frm-6224.test index 418722a7b51..322abd01738 100644 --- a/mysql-test/t/huge_frm-6224.test +++ b/mysql-test/t/huge_frm-6224.test @@ -4,17 +4,24 @@ # verify that huge frms are rejected during creation, not on opening # --source include/have_partition.inc +set global max_allowed_packet=1024*1024*10; +connect con1,localhost,root; -let $n=5646; +let $n=8164; let $a=create table t1 (a int) engine=myisam partition by hash(a) partitions $n (; dec $n; while ($n) { - let $a=$a partition p01234567890123456789012345678901234567890123456789012345678$n,; + let $a=$a partition p01234567890123456789012345678901234567890123456789012345678$n COMMENT 'partition p01234567890123456789012345678901234567890123456789012345678$n',; dec $n; } --disable_query_log --error ER_TABLE_DEFINITION_TOO_BIG eval $a partition foo); +--enable_query_log + +connection default; +disconnect con1; +set global max_allowed_packet=default; diff --git a/mysql-test/t/range_innodb.test b/mysql-test/t/range_innodb.test index 605006587cc..a17ef3f1146 100644 --- a/mysql-test/t/range_innodb.test +++ b/mysql-test/t/range_innodb.test @@ -3,6 +3,7 @@ --echo # --source include/have_innodb.inc +--source include/have_debug.inc --disable_warnings drop table if exists t0, t1, t2; @@ -62,3 +63,27 @@ INSERT INTO t2 VALUES (4,'q'),(NULL,'j'); SELECT * FROM t1 AS t1_1, t1 AS t1_2, t2 WHERE f5 = t1_2.f2 AND ( t1_1.f1 = 103 AND t1_1.f2 = 'o' OR t1_1.pk < f4 ); drop table t1,t2; + +--echo # +--echo # MDEV-14440: Server crash in in handler::ha_external_lock or Assertion `inited==RND' +--echo # failed in handler::ha_rnd_end upon SELECT from partitioned table +--echo # + +set @optimizer_switch_save= @@optimizer_switch; +set optimizer_switch='index_merge_sort_intersection=off'; +create table t0 (a int)engine=innodb; +insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +create table t1 ( + a int, b int, c int, + key(a),key(b),key(c) +)engine=innodb; +insert into t1 +select A.a+10*B.a, A.a+10*B.a, A.a+10*B.a+100*C.a +from t0 A, t0 B, t0 C, t0 D where D.a<5; +set @@global.debug_dbug="+d,ha_index_init_fail"; +explain select * from t1 where a=10 and b=10; +--error ER_TABLE_DEF_CHANGED +select * from t1 where a=10 and b=10; +DROP TABLE t0,t1; +set @@global.debug_dbug="-d"; +set @@optimizer_switch= @optimizer_switch_save; diff --git a/scripts/wsrep_sst_mariabackup.sh b/scripts/wsrep_sst_mariabackup.sh index 27fc129c549..39049cdc5ba 100644 --- a/scripts/wsrep_sst_mariabackup.sh +++ b/scripts/wsrep_sst_mariabackup.sh @@ -91,6 +91,9 @@ DATA="${WSREP_SST_OPT_DATA}" INFO_FILE="xtrabackup_galera_info" IST_FILE="xtrabackup_ist" MAGIC_FILE="${DATA}/${INFO_FILE}" +INNOAPPLYLOG="${DATA}/mariabackup.prepare.log" +INNOMOVELOG="${DATA}/mariabackup.move.log" +INNOBACKUPLOG="${DATA}/mariabackup.backup.log" # Setting the path for ss and ip export PATH="/usr/sbin:/sbin:$PATH" @@ -358,6 +361,8 @@ read_cnf() ssyslog=$(parse_cnf sst sst-syslog 0) ssystag=$(parse_cnf mysqld_safe syslog-tag "${SST_SYSLOG_TAG:-}") ssystag+="-" + sstlogarchive=$(parse_cnf sst sst-log-archive 1) + sstlogarchivedir=$(parse_cnf sst sst-log-archive-dir "/tmp/sst_log_archive") if [[ $speciald -eq 0 ]];then wsrep_log_error "sst-special-dirs equal to 0 is not supported, falling back to 1" @@ -717,10 +722,68 @@ if [[ $ssyslog -eq 1 ]];then INNOBACKUP="${INNOBACKUPEX_BIN} --innobackupex ${WSREP_SST_OPT_CONF} $disver $iopts \$tmpopts \$INNOEXTRA --galera-info --stream=\$sfmt \$itmpdir 2> >(logger -p daemon.err -t ${ssystag}innobackupex-backup)" fi -else - INNOAPPLY="${INNOBACKUPEX_BIN} --innobackupex $disver $iapts --apply-log \$rebuildcmd \${DATA} &>\${DATA}/innobackup.prepare.log" - INNOMOVE="${INNOBACKUPEX_BIN} --innobackupex ${WSREP_SST_OPT_CONF} $disver $impts --move-back --force-non-empty-directories \${DATA} &>\${DATA}/innobackup.move.log" - INNOBACKUP="${INNOBACKUPEX_BIN} --innobackupex ${WSREP_SST_OPT_CONF} $disver $iopts \$tmpopts \$INNOEXTRA --galera-info --stream=\$sfmt \$itmpdir 2>\${DATA}/innobackup.backup.log" +else + +if [[ "$sstlogarchive" -eq 1 ]] +then + ARCHIVETIMESTAMP=$(date "+%Y.%m.%d-%H.%M.%S") + newfile="" + + if [[ ! -z "$sstlogarchivedir" ]] + then + if [[ ! -d "$sstlogarchivedir" ]] + then + mkdir -p "$sstlogarchivedir" + fi + fi + + if [ -e "${INNOAPPLYLOG}" ] + then + if [[ ! -z "$sstlogarchivedir" ]] + then + newfile=$sstlogarchivedir/$(basename "${INNOAPPLYLOG}").${ARCHIVETIMESTAMP} + else + newfile=${INNOAPPLYLOG}.${ARCHIVETIMESTAMP} + fi + + wsrep_log_info "Moving ${INNOAPPLYLOG} to ${newfile}" + mv "${INNOAPPLYLOG}" "${newfile}" + gzip "${newfile}" + fi + + if [ -e "${INNOMOVELOG}" ] + then + if [[ ! -z "$sstlogarchivedir" ]] + then + newfile=$sstlogarchivedir/$(basename "${INNOMOVELOG}").${ARCHIVETIMESTAMP} + else + newfile=${INNOMOVELOG}.${ARCHIVETIMESTAMP} + fi + + wsrep_log_info "Moving ${INNOMOVELOG} to ${newfile}" + mv "${INNOMOVELOG}" "${newfile}" + gzip "${newfile}" + fi + + if [ -e "${INNOBACKUPLOG}" ] + then + if [[ ! -z "$sstlogarchivedir" ]] + then + newfile=$sstlogarchivedir/$(basename "${INNOBACKUPLOG}").${ARCHIVETIMESTAMP} + else + newfile=${INNOBACKUPLOG}.${ARCHIVETIMESTAMP} + fi + + wsrep_log_info "Moving ${INNOBACKUPLOG} to ${newfile}" + mv "${INNOBACKUPLOG}" "${newfile}" + gzip "${newfile}" + fi + +fi + + INNOAPPLY="${INNOBACKUPEX_BIN} --innobackupex $disver $iapts --apply-log \$rebuildcmd \${DATA} &> ${INNOAPPLYLOG}" + INNOMOVE="${INNOBACKUPEX_BIN} --innobackupex ${WSREP_SST_OPT_CONF} $disver $impts --move-back --force-non-empty-directories \${DATA} &> ${INNOMOVELOG}" + INNOBACKUP="${INNOBACKUPEX_BIN} --innobackupex ${WSREP_SST_OPT_CONF} $disver $iopts \$tmpopts \$INNOEXTRA --galera-info --stream=\$sfmt \$itmpdir 2> ${INNOBACKUPLOG}" fi get_stream @@ -817,7 +880,7 @@ then if [ ${RC[0]} -ne 0 ]; then wsrep_log_error "${INNOBACKUPEX_BIN} finished with error: ${RC[0]}. " \ - "Check ${DATA}/innobackup.backup.log" + "Check syslog or ${INNOBACKUPLOG} for details" exit 22 elif [[ ${RC[$(( ${#RC[@]}-1 ))]} -eq 1 ]];then wsrep_log_error "$tcmd finished with error: ${RC[1]}" @@ -1042,13 +1105,12 @@ then if [ $? -ne 0 ]; then - wsrep_log_error "${INNOBACKUPEX_BIN} apply finished with errors. Check ${DATA}/innobackup.prepare.log" + wsrep_log_error "${INNOBACKUPEX_BIN} apply finished with errors. Check syslog or ${INNOAPPLYLOG} for details" exit 22 fi MAGIC_FILE="${TDATA}/${INFO_FILE}" set +e - rm $TDATA/innobackup.prepare.log $TDATA/innobackup.move.log set -e wsrep_log_info "Moving the backup to ${TDATA}" timeit "Xtrabackup move stage" "$INNOMOVE" @@ -1058,7 +1120,7 @@ then DATA=${TDATA} else wsrep_log_error "Move failed, keeping ${DATA} for further diagnosis" - wsrep_log_error "Check ${DATA}/innobackup.move.log for details" + wsrep_log_error "Check syslog or ${INNOMOVELOG} for details" exit 22 fi diff --git a/sql/opt_range.cc b/sql/opt_range.cc index 1b31fe50651..72ba95e30d1 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -1558,6 +1558,7 @@ failure: head->column_bitmaps_set(save_read_set, save_write_set, save_vcol_set); delete file; file= save_file; + free_file= false; DBUG_RETURN(1); } @@ -6546,6 +6547,8 @@ TRP_ROR_INTERSECT *get_best_ror_intersect(const PARAM *param, SEL_TREE *tree, if (ror_intersect_add(intersect, cpk_scan, TRUE) && (intersect->total_cost < min_cost)) intersect_best= intersect; //just set pointer here + else + cpk_scan= 0; // Don't use cpk_scan } else cpk_scan= 0; // Don't use cpk_scan diff --git a/sql/unireg.h b/sql/unireg.h index b0cfb3841ef..eb555008b35 100644 --- a/sql/unireg.h +++ b/sql/unireg.h @@ -189,7 +189,7 @@ LEX_CUSTRING build_frm_image(THD *thd, const char *table, #define FRM_HEADER_SIZE 64 #define FRM_FORMINFO_SIZE 288 -#define FRM_MAX_SIZE (512*1024) +#define FRM_MAX_SIZE (1024*1024) static inline bool is_binary_frm_header(uchar *head) { diff --git a/storage/innobase/dict/dict0dict.cc b/storage/innobase/dict/dict0dict.cc index 914c9946977..e014f7fc336 100644 --- a/storage/innobase/dict/dict0dict.cc +++ b/storage/innobase/dict/dict0dict.cc @@ -2,7 +2,7 @@ Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. -Copyright (c) 2013, 2018, MariaDB Corporation. +Copyright (c) 2013, 2019, 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 @@ -7131,32 +7131,16 @@ UNIV_INTERN ulint dict_sys_get_size() { - ulint size = 0; - - ut_ad(dict_sys); - - mutex_enter(&dict_sys->mutex); - - for(ulint i = 0; i < hash_get_n_cells(dict_sys->table_hash); i++) { - dict_table_t* table; - - for (table = static_cast<dict_table_t*>(HASH_GET_FIRST(dict_sys->table_hash,i)); - table != NULL; - table = static_cast<dict_table_t*>(HASH_GET_NEXT(name_hash, table))) { - dict_index_t* index; - size += mem_heap_get_size(table->heap) + strlen(table->name.m_name) +1; - - for(index = dict_table_get_first_index(table); - index != NULL; - index = dict_table_get_next_index(index)) { - size += mem_heap_get_size(index->heap); - } - } - } - - mutex_exit(&dict_sys->mutex); - - return (size); + /* No mutex; this is a very crude approximation anyway */ + ulint size = UT_LIST_GET_LEN(dict_sys->table_LRU) + + UT_LIST_GET_LEN(dict_sys->table_non_LRU); + size *= sizeof(dict_table_t) + + sizeof(dict_index_t) * 2 + + (sizeof(dict_col_t) + sizeof(dict_field_t)) * 10 + + sizeof(dict_field_t) * 5 /* total number of key fields */ + + 200; /* arbitrary, covering names and overhead */ + + return size; } /** Look for any dictionary objects that are found in the given tablespace. diff --git a/storage/innobase/fil/fil0fil.cc b/storage/innobase/fil/fil0fil.cc index 21a2dddfb9f..ec8144ad892 100644 --- a/storage/innobase/fil/fil0fil.cc +++ b/storage/innobase/fil/fil0fil.cc @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1995, 2017, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2014, 2018, MariaDB Corporation. +Copyright (c) 2014, 2019, 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 @@ -817,10 +817,9 @@ fil_try_to_close_file_in_LRU( } /** Flush any writes cached by the file system. -@param[in,out] space tablespace */ -static -void -fil_flush_low(fil_space_t* space) +@param[in,out] space tablespace +@param[in] metadata whether to update file system metadata */ +static void fil_flush_low(fil_space_t* space, bool metadata = false) { ut_ad(mutex_own(&fil_system->mutex)); ut_ad(space); @@ -844,7 +843,7 @@ fil_flush_low(fil_space_t* space) } #endif /* UNIV_DEBUG */ - return; + if (!metadata) return; } /* Prevent dropping of the space while we are flushing */ @@ -1021,6 +1020,7 @@ fil_space_extend_must_retry( os_has_said_disk_full = *success; if (*success) { + os_file_flush(node->handle); last_page_no = size; } else { /* Let us measure the size of the file @@ -1052,14 +1052,14 @@ fil_space_extend_must_retry( switch (space->id) { case TRX_SYS_SPACE: srv_sys_space.set_last_file_size(pages_in_MiB); - fil_flush_low(space); + fil_flush_low(space, true); return(false); default: ut_ad(space->purpose == FIL_TYPE_TABLESPACE || space->purpose == FIL_TYPE_IMPORT); if (space->purpose == FIL_TYPE_TABLESPACE && !space->is_being_truncated) { - fil_flush_low(space); + fil_flush_low(space, true); } return(false); case SRV_TMP_SPACE_ID: diff --git a/storage/innobase/srv/srv0srv.cc b/storage/innobase/srv/srv0srv.cc index 5572521662b..1adf1f137d6 100644 --- a/storage/innobase/srv/srv0srv.cc +++ b/storage/innobase/srv/srv0srv.cc @@ -3,7 +3,7 @@ Copyright (c) 1995, 2017, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2008, 2009 Google Inc. Copyright (c) 2009, Percona Inc. -Copyright (c) 2013, 2018, MariaDB Corporation. +Copyright (c) 2013, 2019, MariaDB Corporation. Portions of this file contain modifications contributed and copyrighted by Google, Inc. Those modifications are gratefully acknowledged and are described diff --git a/storage/innobase/srv/srv0start.cc b/storage/innobase/srv/srv0start.cc index ae890750841..e2b3d24c044 100644 --- a/storage/innobase/srv/srv0start.cc +++ b/storage/innobase/srv/srv0start.cc @@ -1945,6 +1945,10 @@ innobase_start_or_create_for_mysql() break; } + if (stat_info.type != OS_FILE_TYPE_FILE) { + break; + } + if (!srv_file_check_mode(logfilename)) { return(srv_init_abort(DB_ERROR)); } diff --git a/storage/xtradb/dict/dict0dict.cc b/storage/xtradb/dict/dict0dict.cc index 23082e53ec7..1eb0a53e0b0 100644 --- a/storage/xtradb/dict/dict0dict.cc +++ b/storage/xtradb/dict/dict0dict.cc @@ -2,7 +2,7 @@ Copyright (c) 1996, 2017, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. -Copyright (c) 2013, 2018, MariaDB Corporation. +Copyright (c) 2013, 2019, 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 @@ -7252,30 +7252,14 @@ UNIV_INTERN ulint dict_sys_get_size() { - ulint size = 0; - - ut_ad(dict_sys); - - mutex_enter(&dict_sys->mutex); - - for(ulint i = 0; i < hash_get_n_cells(dict_sys->table_hash); i++) { - dict_table_t* table; - - for (table = static_cast<dict_table_t*>(HASH_GET_FIRST(dict_sys->table_hash,i)); - table != NULL; - table = static_cast<dict_table_t*>(HASH_GET_NEXT(name_hash, table))) { - dict_index_t* index; - size += mem_heap_get_size(table->heap) + strlen(table->name) +1; - - for(index = dict_table_get_first_index(table); - index != NULL; - index = dict_table_get_next_index(index)) { - size += mem_heap_get_size(index->heap); - } - } - } - - mutex_exit(&dict_sys->mutex); - - return (size); + /* No mutex; this is a very crude approximation anyway */ + ulint size = UT_LIST_GET_LEN(dict_sys->table_LRU) + + UT_LIST_GET_LEN(dict_sys->table_non_LRU); + size *= sizeof(dict_table_t) + + sizeof(dict_index_t) * 2 + + (sizeof(dict_col_t) + sizeof(dict_field_t)) * 10 + + sizeof(dict_field_t) * 5 /* total number of key fields */ + + 200; /* arbitrary, covering names and overhead */ + + return size; } diff --git a/storage/xtradb/fil/fil0fil.cc b/storage/xtradb/fil/fil0fil.cc index 4ad572697cd..dab6f354b32 100644 --- a/storage/xtradb/fil/fil0fil.cc +++ b/storage/xtradb/fil/fil0fil.cc @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1995, 2017, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2014, 2018, MariaDB Corporation. +Copyright (c) 2014, 2019, 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 @@ -846,10 +846,9 @@ fil_try_to_close_file_in_LRU( } /** Flush any writes cached by the file system. -@param[in,out] space tablespace */ -static -void -fil_flush_low(fil_space_t* space) +@param[in,out] space tablespace +@param[in] metadata whether to update file system metadata */ +static void fil_flush_low(fil_space_t* space, bool metadata = false) { ut_ad(mutex_own(&fil_system->mutex)); ut_ad(space); @@ -873,7 +872,7 @@ fil_flush_low(fil_space_t* space) } #endif /* UNIV_DEBUG */ - return; + if (!metadata) return; } /* Prevent dropping of the space while we are flushing */ @@ -1037,15 +1036,16 @@ fil_space_extend_must_retry( *success = os_file_set_size(node->name, node->handle, new_size, FSP_FLAGS_HAS_PAGE_COMPRESSION(space->flags)); - DBUG_EXECUTE_IF("ib_os_aio_func_io_failure_28", *success = FALSE; os_has_said_disk_full = TRUE;); if (*success) { + os_file_flush(node->handle); os_has_said_disk_full = FALSE; start_page_no = size; } + mutex_enter(&fil_system->mutex); ut_a(node->being_extended); @@ -1069,7 +1069,7 @@ fil_space_extend_must_retry( = (node->size / pages_per_mb) * pages_per_mb; } - fil_flush_low(space); + fil_flush_low(space, true); return(false); } diff --git a/storage/xtradb/srv/srv0srv.cc b/storage/xtradb/srv/srv0srv.cc index 392ece25679..31f33d6c1c5 100644 --- a/storage/xtradb/srv/srv0srv.cc +++ b/storage/xtradb/srv/srv0srv.cc @@ -3,7 +3,7 @@ Copyright (c) 1995, 2017, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2008, 2009 Google Inc. Copyright (c) 2009, Percona Inc. -Copyright (c) 2013, 2017, MariaDB Corporation. +Copyright (c) 2013, 2019, MariaDB Corporation. Portions of this file contain modifications contributed and copyrighted by Google, Inc. Those modifications are gratefully acknowledged and are described @@ -1637,9 +1637,7 @@ srv_printf_innodb_monitor( ? (recv_sys->addr_hash->n_cells * sizeof(hash_cell_t)) : 0), recv_sys_subtotal); - - fprintf(file, "Dictionary memory allocated " ULINTPF "\n", - dict_sys ? dict_sys_get_size() : 0); + fprintf(file, "Dictionary memory allocated " ULINTPF "\n", dict_size); buf_print_io(file); diff --git a/storage/xtradb/srv/srv0start.cc b/storage/xtradb/srv/srv0start.cc index 6b3ffbe38eb..7baa3cf14a5 100644 --- a/storage/xtradb/srv/srv0start.cc +++ b/storage/xtradb/srv/srv0start.cc @@ -2377,6 +2377,9 @@ innobase_start_or_create_for_mysql() break; } + if (stat_info.type != OS_FILE_TYPE_FILE) { + break; + } if (!srv_file_check_mode(logfilename)) { return(DB_ERROR); } |