Merge branch 'merge-xtradb-5.5' into 5.5
This commit is contained in:
commit
f41a41fd91
@ -2668,8 +2668,9 @@ dict_foreign_remove_from_cache(
|
|||||||
const ib_rbt_node_t* node
|
const ib_rbt_node_t* node
|
||||||
= rbt_lookup(rbt, foreign->id);
|
= rbt_lookup(rbt, foreign->id);
|
||||||
|
|
||||||
if (node) {
|
if (node != NULL) {
|
||||||
dict_foreign_t* val = *(dict_foreign_t**) node->value;
|
dict_foreign_t* val
|
||||||
|
= *(dict_foreign_t**) node->value;
|
||||||
|
|
||||||
if (val == foreign) {
|
if (val == foreign) {
|
||||||
rbt_delete(rbt, foreign->id);
|
rbt_delete(rbt, foreign->id);
|
||||||
@ -2690,8 +2691,9 @@ dict_foreign_remove_from_cache(
|
|||||||
const ib_rbt_node_t* node
|
const ib_rbt_node_t* node
|
||||||
= rbt_lookup(rbt, foreign->id);
|
= rbt_lookup(rbt, foreign->id);
|
||||||
|
|
||||||
if (node) {
|
if (node != NULL) {
|
||||||
dict_foreign_t* val = *(dict_foreign_t**) node->value;
|
dict_foreign_t* val
|
||||||
|
= *(dict_foreign_t**) node->value;
|
||||||
|
|
||||||
if (val == foreign) {
|
if (val == foreign) {
|
||||||
rbt_delete(rbt, foreign->id);
|
rbt_delete(rbt, foreign->id);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
|
||||||
Copyright (c) 1997, 2009, Innobase Oy. All Rights Reserved.
|
Copyright (c) 1997, 2015, Oracle and/or its affiliates. All Rights Reserved.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it under
|
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
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
@ -111,6 +111,17 @@ struct purge_node_struct{
|
|||||||
purge of a row */
|
purge of a row */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef UNIV_DEBUG
|
||||||
|
/***********************************************************//**
|
||||||
|
Validate the persisent cursor in the purge node. The purge node has two
|
||||||
|
references to the clustered index record - one via the ref member, and the
|
||||||
|
other via the persistent cursor. These two references must match each
|
||||||
|
other if the found_clust flag is set.
|
||||||
|
@return true if the persistent cursor is consistent with the ref member.*/
|
||||||
|
ibool
|
||||||
|
row_purge_validate_pcur(purge_node_t* node);
|
||||||
|
#endif /* UNIV_DEBUG */
|
||||||
|
|
||||||
#ifndef UNIV_NONINL
|
#ifndef UNIV_NONINL
|
||||||
#include "row0purge.ic"
|
#include "row0purge.ic"
|
||||||
#endif
|
#endif
|
||||||
|
@ -270,7 +270,6 @@ extern ulong srv_ibuf_active_contract;
|
|||||||
extern ulong srv_ibuf_accel_rate;
|
extern ulong srv_ibuf_accel_rate;
|
||||||
extern ulint srv_checkpoint_age_target;
|
extern ulint srv_checkpoint_age_target;
|
||||||
extern ulong srv_flush_neighbor_pages;
|
extern ulong srv_flush_neighbor_pages;
|
||||||
extern ulint srv_deprecated_enable_unsafe_group_commit;
|
|
||||||
extern ulong srv_read_ahead;
|
extern ulong srv_read_ahead;
|
||||||
extern ulong srv_adaptive_flushing_method;
|
extern ulong srv_adaptive_flushing_method;
|
||||||
|
|
||||||
|
@ -64,10 +64,10 @@ component, i.e. we show M.N.P as M.N */
|
|||||||
(INNODB_VERSION_MAJOR << 8 | INNODB_VERSION_MINOR)
|
(INNODB_VERSION_MAJOR << 8 | INNODB_VERSION_MINOR)
|
||||||
|
|
||||||
#ifndef PERCONA_INNODB_VERSION
|
#ifndef PERCONA_INNODB_VERSION
|
||||||
#define PERCONA_INNODB_VERSION 37.3
|
#define PERCONA_INNODB_VERSION 37.4
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define INNODB_VERSION_STR "5.5.44-MariaDB-" IB_TO_STR(PERCONA_INNODB_VERSION)
|
#define INNODB_VERSION_STR "5.5.45-MariaDB-" IB_TO_STR(PERCONA_INNODB_VERSION)
|
||||||
|
|
||||||
#define REFMAN "http://dev.mysql.com/doc/refman/" \
|
#define REFMAN "http://dev.mysql.com/doc/refman/" \
|
||||||
IB_TO_STR(MYSQL_MAJOR_VERSION) "." \
|
IB_TO_STR(MYSQL_MAJOR_VERSION) "." \
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
|
||||||
Copyright (c) 1995, 2010, Innobase Oy. All Rights Reserved.
|
Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved.
|
||||||
Copyright (c) 2009, Percona Inc.
|
Copyright (c) 2009, Percona Inc.
|
||||||
|
|
||||||
Portions of this file contain modifications contributed and copyrighted
|
Portions of this file contain modifications contributed and copyrighted
|
||||||
@ -1376,16 +1376,19 @@ os_file_create_simple_no_error_handling_func(
|
|||||||
#else /* __WIN__ */
|
#else /* __WIN__ */
|
||||||
os_file_t file;
|
os_file_t file;
|
||||||
int create_flag;
|
int create_flag;
|
||||||
|
const char* mode_str = NULL;
|
||||||
|
|
||||||
ut_a(name);
|
ut_a(name);
|
||||||
|
|
||||||
if (create_mode == OS_FILE_OPEN) {
|
if (create_mode == OS_FILE_OPEN) {
|
||||||
|
mode_str = "OPEN";
|
||||||
if (access_type == OS_FILE_READ_ONLY) {
|
if (access_type == OS_FILE_READ_ONLY) {
|
||||||
create_flag = O_RDONLY;
|
create_flag = O_RDONLY;
|
||||||
} else {
|
} else {
|
||||||
create_flag = O_RDWR;
|
create_flag = O_RDWR;
|
||||||
}
|
}
|
||||||
} else if (create_mode == OS_FILE_CREATE) {
|
} else if (create_mode == OS_FILE_CREATE) {
|
||||||
|
mode_str = "CREATE";
|
||||||
create_flag = O_RDWR | O_CREAT | O_EXCL;
|
create_flag = O_RDWR | O_CREAT | O_EXCL;
|
||||||
} else {
|
} else {
|
||||||
create_flag = 0;
|
create_flag = 0;
|
||||||
@ -1410,6 +1413,14 @@ os_file_create_simple_no_error_handling_func(
|
|||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
*success = TRUE;
|
*success = TRUE;
|
||||||
|
|
||||||
|
/* This function is always called for data files, we should
|
||||||
|
disable OS caching (O_DIRECT) here as we do in
|
||||||
|
os_file_create_func(), so we open the same file in the same
|
||||||
|
mode, see man page of open(2). */
|
||||||
|
if (srv_unix_file_flush_method == SRV_UNIX_O_DIRECT) {
|
||||||
|
os_file_set_nocache(file, name, mode_str);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return(file);
|
return(file);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
|
||||||
Copyright (c) 1997, 2011, Oracle and/or its affiliates. All Rights Reserved.
|
Copyright (c) 1997, 2015, Oracle and/or its affiliates. All Rights Reserved.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it under
|
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
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
@ -43,6 +43,7 @@ Created 3/14/1997 Heikki Tuuri
|
|||||||
#include "row0vers.h"
|
#include "row0vers.h"
|
||||||
#include "row0mysql.h"
|
#include "row0mysql.h"
|
||||||
#include "log0log.h"
|
#include "log0log.h"
|
||||||
|
#include "rem0cmp.h"
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
IMPORTANT NOTE: Any operation that generates redo MUST check that there
|
IMPORTANT NOTE: Any operation that generates redo MUST check that there
|
||||||
@ -80,7 +81,7 @@ row_purge_node_create(
|
|||||||
|
|
||||||
/***********************************************************//**
|
/***********************************************************//**
|
||||||
Repositions the pcur in the purge node on the clustered index record,
|
Repositions the pcur in the purge node on the clustered index record,
|
||||||
if found.
|
if found. If the record is not found, close pcur.
|
||||||
@return TRUE if the record was found */
|
@return TRUE if the record was found */
|
||||||
static
|
static
|
||||||
ibool
|
ibool
|
||||||
@ -90,23 +91,28 @@ row_purge_reposition_pcur(
|
|||||||
purge_node_t* node, /*!< in: row purge node */
|
purge_node_t* node, /*!< in: row purge node */
|
||||||
mtr_t* mtr) /*!< in: mtr */
|
mtr_t* mtr) /*!< in: mtr */
|
||||||
{
|
{
|
||||||
ibool found;
|
if (node->found_clust) {
|
||||||
|
ut_ad(row_purge_validate_pcur(node));
|
||||||
|
|
||||||
|
node->found_clust = btr_pcur_restore_position(
|
||||||
|
mode, &(node->pcur), mtr);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
node->found_clust = row_search_on_row_ref(
|
||||||
|
&(node->pcur), mode, node->table, node->ref, mtr);
|
||||||
|
|
||||||
if (node->found_clust) {
|
if (node->found_clust) {
|
||||||
found = btr_pcur_restore_position(mode, &(node->pcur), mtr);
|
|
||||||
|
|
||||||
return(found);
|
|
||||||
}
|
|
||||||
|
|
||||||
found = row_search_on_row_ref(&(node->pcur), mode, node->table,
|
|
||||||
node->ref, mtr);
|
|
||||||
node->found_clust = found;
|
|
||||||
|
|
||||||
if (found) {
|
|
||||||
btr_pcur_store_position(&(node->pcur), mtr);
|
btr_pcur_store_position(&(node->pcur), mtr);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return(found);
|
/* Close the current cursor if we fail to position it correctly. */
|
||||||
|
if (!node->found_clust) {
|
||||||
|
btr_pcur_close(&node->pcur);
|
||||||
|
}
|
||||||
|
|
||||||
|
return(node->found_clust);
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************//**
|
/***********************************************************//**
|
||||||
@ -143,8 +149,8 @@ row_purge_remove_clust_if_poss_low(
|
|||||||
|
|
||||||
if (!success) {
|
if (!success) {
|
||||||
/* The record is already removed */
|
/* The record is already removed */
|
||||||
|
/* Persistent cursor is closed if reposition fails. */
|
||||||
btr_pcur_commit_specify_mtr(pcur, &mtr);
|
mtr_commit(&mtr);
|
||||||
|
|
||||||
return(TRUE);
|
return(TRUE);
|
||||||
}
|
}
|
||||||
@ -258,7 +264,12 @@ row_purge_poss_sec(
|
|||||||
btr_pcur_get_rec(&node->pcur),
|
btr_pcur_get_rec(&node->pcur),
|
||||||
&mtr, index, entry);
|
&mtr, index, entry);
|
||||||
|
|
||||||
|
/* Persistent cursor is closed if reposition fails. */
|
||||||
|
if (node->found_clust) {
|
||||||
btr_pcur_commit_specify_mtr(&node->pcur, &mtr);
|
btr_pcur_commit_specify_mtr(&node->pcur, &mtr);
|
||||||
|
} else {
|
||||||
|
mtr_commit(&mtr);
|
||||||
|
}
|
||||||
|
|
||||||
return(can_delete);
|
return(can_delete);
|
||||||
}
|
}
|
||||||
@ -806,3 +817,53 @@ row_purge_step(
|
|||||||
|
|
||||||
return(thr);
|
return(thr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef UNIV_DEBUG
|
||||||
|
/***********************************************************//**
|
||||||
|
Validate the persisent cursor in the purge node. The purge node has two
|
||||||
|
references to the clustered index record - one via the ref member, and the
|
||||||
|
other via the persistent cursor. These two references must match each
|
||||||
|
other if the found_clust flag is set.
|
||||||
|
@return true if the stored copy of persistent cursor is consistent
|
||||||
|
with the ref member.*/
|
||||||
|
ibool
|
||||||
|
row_purge_validate_pcur(
|
||||||
|
purge_node_t* node)
|
||||||
|
{
|
||||||
|
dict_index_t* clust_index;
|
||||||
|
ulint* offsets;
|
||||||
|
int st;
|
||||||
|
|
||||||
|
if (!node->found_clust) {
|
||||||
|
return(TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (node->index == NULL) {
|
||||||
|
return(TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (node->pcur.old_stored != BTR_PCUR_OLD_STORED) {
|
||||||
|
return(TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
|
clust_index = node->pcur.btr_cur.index;
|
||||||
|
|
||||||
|
offsets = rec_get_offsets(node->pcur.old_rec, clust_index, NULL,
|
||||||
|
node->pcur.old_n_fields, &node->heap);
|
||||||
|
|
||||||
|
/* Here we are comparing the purge ref record and the stored initial
|
||||||
|
part in persistent cursor. Both cases we store n_uniq fields of the
|
||||||
|
cluster index and so it is fine to do the comparison. We note this
|
||||||
|
dependency here as pcur and ref belong to different modules. */
|
||||||
|
st = cmp_dtuple_rec(node->ref, node->pcur.old_rec, offsets);
|
||||||
|
|
||||||
|
if (st != 0) {
|
||||||
|
fprintf(stderr, "Purge node pcur validation failed\n");
|
||||||
|
dtuple_print(stderr, node->ref);
|
||||||
|
rec_print(stderr, node->pcur.old_rec, clust_index);
|
||||||
|
return(FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
return(TRUE);
|
||||||
|
}
|
||||||
|
#endif /* UNIV_DEBUG */
|
||||||
|
@ -438,7 +438,6 @@ UNIV_INTERN ulong srv_ibuf_accel_rate = 100;
|
|||||||
UNIV_INTERN ulint srv_checkpoint_age_target = 0;
|
UNIV_INTERN ulint srv_checkpoint_age_target = 0;
|
||||||
UNIV_INTERN ulong srv_flush_neighbor_pages = 1; /* 0:disable 1:area 2:contiguous */
|
UNIV_INTERN ulong srv_flush_neighbor_pages = 1; /* 0:disable 1:area 2:contiguous */
|
||||||
|
|
||||||
UNIV_INTERN ulint srv_deprecated_enable_unsafe_group_commit = 0;
|
|
||||||
UNIV_INTERN ulong srv_read_ahead = 3; /* 1: random 2: linear 3: Both */
|
UNIV_INTERN ulong srv_read_ahead = 3; /* 1: random 2: linear 3: Both */
|
||||||
UNIV_INTERN ulong srv_adaptive_flushing_method = 0; /* 0: native 1: estimate 2: keep_average */
|
UNIV_INTERN ulong srv_adaptive_flushing_method = 0; /* 0: native 1: estimate 2: keep_average */
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user