diff options
-rw-r--r-- | storage/xtradb/buf/buf0buf.c | 2 | ||||
-rw-r--r-- | storage/xtradb/fil/fil0fil.c | 28 | ||||
-rw-r--r-- | storage/xtradb/handler/ha_innodb.cc | 20 | ||||
-rw-r--r-- | storage/xtradb/handler/ha_innodb.h | 1 | ||||
-rw-r--r-- | storage/xtradb/handler/handler0alter.cc | 2 | ||||
-rw-r--r-- | storage/xtradb/include/univ.i | 2 | ||||
-rw-r--r-- | storage/xtradb/row/row0ins.c | 6 | ||||
-rw-r--r-- | storage/xtradb/row/row0upd.c | 6 | ||||
-rw-r--r-- | storage/xtradb/srv/srv0start.c | 6 |
9 files changed, 49 insertions, 24 deletions
diff --git a/storage/xtradb/buf/buf0buf.c b/storage/xtradb/buf/buf0buf.c index ac5b4b0c4fd..9296a4e066a 100644 --- a/storage/xtradb/buf/buf0buf.c +++ b/storage/xtradb/buf/buf0buf.c @@ -1,6 +1,6 @@ /***************************************************************************** -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 diff --git a/storage/xtradb/fil/fil0fil.c b/storage/xtradb/fil/fil0fil.c index 40ceee3ba61..7682b49e755 100644 --- a/storage/xtradb/fil/fil0fil.c +++ b/storage/xtradb/fil/fil0fil.c @@ -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) { diff --git a/storage/xtradb/handler/ha_innodb.cc b/storage/xtradb/handler/ha_innodb.cc index bf91af6d673..d786d550d9b 100644 --- a/storage/xtradb/handler/ha_innodb.cc +++ b/storage/xtradb/handler/ha_innodb.cc @@ -1,6 +1,6 @@ /***************************************************************************** -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 @@ skip_relay: 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, diff --git a/storage/xtradb/handler/ha_innodb.h b/storage/xtradb/handler/ha_innodb.h index 7dbb0f6c70c..cef5622ba21 100644 --- a/storage/xtradb/handler/ha_innodb.h +++ b/storage/xtradb/handler/ha_innodb.h @@ -1,6 +1,7 @@ /***************************************************************************** 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 diff --git a/storage/xtradb/handler/handler0alter.cc b/storage/xtradb/handler/handler0alter.cc index 0079b9d2d97..2b2b2b536a8 100644 --- a/storage/xtradb/handler/handler0alter.cc +++ b/storage/xtradb/handler/handler0alter.cc @@ -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: diff --git a/storage/xtradb/include/univ.i b/storage/xtradb/include/univ.i index ffe09ae2436..e9ea4695c87 100644 --- a/storage/xtradb/include/univ.i +++ b/storage/xtradb/include/univ.i @@ -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) diff --git a/storage/xtradb/row/row0ins.c b/storage/xtradb/row/row0ins.c index 0d9db2f6d1f..af2692b2f2e 100644 --- a/storage/xtradb/row/row0ins.c +++ b/storage/xtradb/row/row0ins.c @@ -1,6 +1,6 @@ /***************************************************************************** -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); diff --git a/storage/xtradb/row/row0upd.c b/storage/xtradb/row/row0upd.c index faf80b75eed..c0515c423db 100644 --- a/storage/xtradb/row/row0upd.c +++ b/storage/xtradb/row/row0upd.c @@ -1,6 +1,6 @@ /***************************************************************************** -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 diff --git a/storage/xtradb/srv/srv0start.c b/storage/xtradb/srv/srv0start.c index 223a48e5471..7b336c81b10 100644 --- a/storage/xtradb/srv/srv0start.c +++ b/storage/xtradb/srv/srv0start.c @@ -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; |