summaryrefslogtreecommitdiff
path: root/storage/xtradb/fil/fil0fil.cc
diff options
context:
space:
mode:
authorVicențiu Ciorbaru <vicentiu@mariadb.org>2017-05-17 12:11:12 +0300
committerVicențiu Ciorbaru <vicentiu@mariadb.org>2017-05-17 12:11:12 +0300
commitd8b45b0c004edc0b91029b232d7cc9aad02cc822 (patch)
tree4461fa973957a077ee5daf782617cf65161b68bb /storage/xtradb/fil/fil0fil.cc
parentdfeff407067e2eaa27a51a04306863f912ec4cc6 (diff)
parent360a4a037271d65ab6471f7ab3f9b6a893d90a31 (diff)
downloadmariadb-git-d8b45b0c004edc0b91029b232d7cc9aad02cc822.tar.gz
Merge branch 'merge-xtradb-5.6' into 10.0
Diffstat (limited to 'storage/xtradb/fil/fil0fil.cc')
-rw-r--r--storage/xtradb/fil/fil0fil.cc29
1 files changed, 11 insertions, 18 deletions
diff --git a/storage/xtradb/fil/fil0fil.cc b/storage/xtradb/fil/fil0fil.cc
index 1a866a693ca..9855eaa87e5 100644
--- a/storage/xtradb/fil/fil0fil.cc
+++ b/storage/xtradb/fil/fil0fil.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1995, 2017, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2014, 2017, MariaDB Corporation. All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under
@@ -154,7 +154,8 @@ initialized. */
fil_system_t* fil_system = NULL;
/** Determine if (i) is a user tablespace id or not. */
-# define fil_is_user_tablespace_id(i) ((i) > srv_undo_tablespaces_open)
+# define fil_is_user_tablespace_id(i) (i != 0 \
+ && !srv_is_undo_tablespace(i))
/** Determine if user has explicitly disabled fsync(). */
#ifndef __WIN__
@@ -1943,7 +1944,7 @@ UNIV_INTERN
const char*
fil_read_first_page(
/*================*/
- os_file_t data_file, /*!< in: open data file */
+ pfs_os_file_t data_file, /*!< in: open data file */
ibool one_read_already, /*!< in: TRUE if min and max
parameters below already
contain sensible data */
@@ -3266,7 +3267,7 @@ fil_open_linked_file(
/*===============*/
const char* tablename, /*!< in: database/tablename */
char** remote_filepath,/*!< out: remote filepath */
- os_file_t* remote_file) /*!< out: remote file handle */
+ pfs_os_file_t* remote_file) /*!< out: remote file handle */
{
ibool success;
@@ -3326,7 +3327,8 @@ fil_create_new_single_table_tablespace(
tablespace file in pages,
must be >= FIL_IBD_FILE_INITIAL_SIZE */
{
- os_file_t file;
+ pfs_os_file_t file;
+
ibool ret;
dberr_t err;
byte* buf2;
@@ -5065,19 +5067,10 @@ retry:
int err;
do {
- err = posix_fallocate(node->handle, start_offset, len);
+ err = posix_fallocate(node->handle.m_file, start_offset, len);
} while (err == EINTR
&& srv_shutdown_state == SRV_SHUTDOWN_NONE);
- success = !err;
- if (!success) {
- ib_logf(IB_LOG_LEVEL_ERROR, "extending file %s"
- " from " INT64PF " to " INT64PF " bytes"
- " failed with error %d",
- node->name, start_offset, len + start_offset,
- err);
- }
-
DBUG_EXECUTE_IF("ib_os_aio_func_io_failure_28",
success = FALSE; os_has_said_disk_full = TRUE;);
@@ -5843,7 +5836,7 @@ fil_flush(
{
fil_space_t* space;
fil_node_t* node;
- os_file_t file;
+ pfs_os_file_t file;
mutex_enter(&fil_system->mutex);
@@ -6202,7 +6195,7 @@ fil_buf_block_init(
}
struct fil_iterator_t {
- os_file_t file; /*!< File handle */
+ pfs_os_file_t file; /*!< File handle */
const char* filepath; /*!< File path name */
os_offset_t start; /*!< From where to start */
os_offset_t end; /*!< Where to stop */
@@ -6337,7 +6330,7 @@ fil_tablespace_iterate(
PageCallback& callback)
{
dberr_t err;
- os_file_t file;
+ pfs_os_file_t file;
char* filepath;
ut_a(n_io_buffers > 0);