Commit 2d687cad authored by Sergei Golubchik's avatar Sergei Golubchik

merge with XtraDB 5.5.37-35.0

parents e5daa094 d60b4df1
/*****************************************************************************
Copyright (c) 1995, 2013, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 1995, 2014, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2008, Google Inc.
Portions of this file contain modifications contributed and copyrighted by
......
......@@ -4968,22 +4968,24 @@ fil_extend_space_to_desired_size(
#ifdef HAVE_POSIX_FALLOCATE
if (srv_use_posix_fallocate) {
ib_int64_t start_offset = start_page_no * page_size;
ib_int64_t end_offset = (size_after_extend - start_page_no) * page_size;
ib_int64_t desired_size = size_after_extend*page_size;
mutex_exit(&fil_system->mutex);
ib_int64_t start_offset
= file_start_page_no * page_size;
ib_int64_t end_offset
= (size_after_extend - file_start_page_no) * page_size;
if (posix_fallocate(node->handle, start_offset, end_offset) == -1) {
fprintf(stderr, "InnoDB: Error: preallocating file "
"space for file \'%s\' failed. Current size "
" %lld, len %lld, desired size %lld\n",
node->name, start_offset, end_offset, desired_size);
success = FALSE;
} else {
success = TRUE;
mutex_exit(&fil_system->mutex);
success = (posix_fallocate(node->handle, start_offset,
end_offset) == 0);
if (!success)
{
fprintf(stderr,
"InnoDB: Error: preallocating file space for "
"file \'%s\' failed. Current size %lld, "
"len %lld, desired size %lld\n", node->name,
start_offset, end_offset,
start_offset + end_offset);
}
mutex_enter(&fil_system->mutex);
if (success) {
......
/*****************************************************************************
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2008, 2009 Google Inc.
Copyright (c) 2009, Percona Inc.
......@@ -2920,7 +2920,8 @@ innobase_init(
internal_innobase_data_file_path);
if (ret == FALSE) {
sql_print_error(
"InnoDB: syntax error in innodb_data_file_path");
"InnoDB: syntax error in innodb_data_file_path"
" or size specified is less than 1 megabyte");
mem_free_and_error:
srv_free_paths_and_sizes();
my_free(internal_innobase_data_file_path);
......@@ -11544,6 +11545,21 @@ ha_innobase::get_auto_increment(
current = *first_value;
/* If the increment step of the auto increment column
decreases then it is not affecting the immediate
next value in the series. */
if (prebuilt->autoinc_increment > increment) {
current = autoinc - prebuilt->autoinc_increment;
current = innobase_next_autoinc(
current, 1, increment, 1, col_max_value);
dict_table_autoinc_initialize(prebuilt->table, current);
*first_value = current;
}
/* Compute the last value in the interval */
next_value = innobase_next_autoinc(
current, *nb_reserved_values, increment, offset,
......
/*****************************************************************************
Copyright (c) 2000, 2010, MySQL AB & Innobase Oy. All Rights Reserved.
Use is subject to license terms
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
......
......@@ -120,7 +120,7 @@ innobase_col_to_mysql(
case DATA_FIXBINARY:
case DATA_CHAR:
/* We may have flen > len when there is a shorter
prefix on a CHAR column. */
prefix on the CHAR and BINARY column. */
ut_ad(flen >= len);
#else /* UNIV_DEBUG */
default:
......
......@@ -64,7 +64,7 @@ component, i.e. we show M.N.P as M.N */
(INNODB_VERSION_MAJOR << 8 | INNODB_VERSION_MINOR)
#ifndef PERCONA_INNODB_VERSION
#define PERCONA_INNODB_VERSION 34.0
#define PERCONA_INNODB_VERSION 35.0
#endif
#define INNODB_VERSION_STR "5.5.37-MariaDB-" IB_TO_STR(PERCONA_INNODB_VERSION)
......
/*****************************************************************************
Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 1996, 2014, Oracle and/or its affiliates. All Rights Reserved.
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
......@@ -2290,6 +2290,10 @@ row_ins_index_entry(
{
ulint err;
DBUG_EXECUTE_IF("row_ins_index_entry_timeout", {
DBUG_SET("-d,row_ins_index_entry_timeout");
return(DB_LOCK_WAIT);});
if (foreign && UT_LIST_GET_FIRST(index->table->foreign_list)) {
err = row_ins_check_foreign_constraints(index->table, index,
entry, thr);
......
/*****************************************************************************
Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 1996, 2014, Oracle and/or its affiliates. All Rights Reserved.
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
......@@ -1789,9 +1789,7 @@ row_upd_clust_rec_by_insert_inherit_func(
data += len - BTR_EXTERN_FIELD_REF_SIZE;
/* The pointer must not be zero. */
ut_a(memcmp(data, field_ref_zero, BTR_EXTERN_FIELD_REF_SIZE));
/* The BLOB must be owned. */
ut_a(!(data[BTR_EXTERN_LEN] & BTR_EXTERN_OWNER_FLAG));
data[BTR_EXTERN_LEN] &= ~BTR_EXTERN_OWNER_FLAG;
data[BTR_EXTERN_LEN] |= BTR_EXTERN_INHERITED_FLAG;
/* The BTR_EXTERN_INHERITED_FLAG only matters in
rollback. Purge will always free the extern fields of
......
......@@ -151,7 +151,7 @@ UNIV_INTERN mysql_pfs_key_t srv_log_tracking_thread_key;
#endif /* UNIV_PFS_THREAD */
/*********************************************************************//**
Convert a numeric string that optionally ends in G or M, to a number
Convert a numeric string that optionally ends in G or M or K, to a number
containing megabytes.
@return next character in string */
static
......@@ -175,6 +175,10 @@ srv_parse_megabytes(
case 'M': case 'm':
str++;
break;
case 'K': case 'k':
size /= 1024;
str++;
break;
default:
size /= 1024 * 1024;
break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment