mirror of
https://github.com/MariaDB/server.git
synced 2025-01-30 18:41:56 +01:00
XtraDB 5.5.41-37.0
This commit is contained in:
commit
2a1be9cdf8
11 changed files with 128 additions and 18 deletions
|
@ -330,6 +330,14 @@ SET(INNOBASE_SOURCES btr/btr0btr.c btr/btr0cur.c btr/btr0pcur.c btr/btr0sea.c
|
||||||
ut/ut0byte.c ut/ut0dbg.c ut/ut0list.c ut/ut0mem.c ut/ut0rbt.c ut/ut0rnd.c
|
ut/ut0byte.c ut/ut0dbg.c ut/ut0list.c ut/ut0mem.c ut/ut0rbt.c ut/ut0rnd.c
|
||||||
ut/ut0ut.c ut/ut0vec.c ut/ut0wqueue.c ut/ut0bh.c)
|
ut/ut0ut.c ut/ut0vec.c ut/ut0wqueue.c ut/ut0bh.c)
|
||||||
|
|
||||||
|
# These files have unused result errors, so we skip Werror
|
||||||
|
CHECK_C_COMPILER_FLAG("-Werror" HAVE_WERROR)
|
||||||
|
IF(HAVE_WERROR)
|
||||||
|
INCLUDE(${MYSQL_CMAKE_SCRIPT_DIR}/compile_flags.cmake)
|
||||||
|
ADD_COMPILE_FLAGS(page/page0zip.c COMPILE_FLAGS "-Wno-error")
|
||||||
|
ADD_COMPILE_FLAGS(ut/ut0ut.c COMPILE_FLAGS "-Wno-error")
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
IF(WITH_INNODB)
|
IF(WITH_INNODB)
|
||||||
# Legacy option
|
# Legacy option
|
||||||
SET(WITH_INNOBASE_STORAGE_ENGINE TRUE)
|
SET(WITH_INNOBASE_STORAGE_ENGINE TRUE)
|
||||||
|
|
|
@ -42,6 +42,12 @@ UNIV_INTERN dict_index_t* dict_ind_compact;
|
||||||
UNIV_INTERN uint ibuf_debug;
|
UNIV_INTERN uint ibuf_debug;
|
||||||
#endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */
|
#endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */
|
||||||
|
|
||||||
|
/**********************************************************************
|
||||||
|
Issue a warning that the row is too big. */
|
||||||
|
void
|
||||||
|
ib_warn_row_too_big(const dict_table_t* table);
|
||||||
|
|
||||||
|
|
||||||
#ifndef UNIV_HOTBACKUP
|
#ifndef UNIV_HOTBACKUP
|
||||||
#include "buf0buf.h"
|
#include "buf0buf.h"
|
||||||
#include "data0type.h"
|
#include "data0type.h"
|
||||||
|
@ -1892,11 +1898,18 @@ dict_index_add_to_cache(
|
||||||
|
|
||||||
new_index->n_fields = new_index->n_def;
|
new_index->n_fields = new_index->n_def;
|
||||||
|
|
||||||
if (strict && dict_index_too_big_for_tree(table, new_index)) {
|
if (dict_index_too_big_for_tree(table, new_index)) {
|
||||||
|
|
||||||
|
if (strict) {
|
||||||
too_big:
|
too_big:
|
||||||
dict_mem_index_free(new_index);
|
dict_mem_index_free(new_index);
|
||||||
dict_mem_index_free(index);
|
dict_mem_index_free(index);
|
||||||
return(DB_TOO_BIG_RECORD);
|
return(DB_TOO_BIG_RECORD);
|
||||||
|
} else {
|
||||||
|
|
||||||
|
ib_warn_row_too_big(table);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (UNIV_UNLIKELY(index->type & DICT_UNIVERSAL)) {
|
if (UNIV_UNLIKELY(index->type & DICT_UNIVERSAL)) {
|
||||||
|
@ -6043,11 +6056,11 @@ dict_set_corrupted(
|
||||||
|
|
||||||
dict_index_copy_types(tuple, sys_index, 2);
|
dict_index_copy_types(tuple, sys_index, 2);
|
||||||
|
|
||||||
btr_cur_search_to_nth_level(sys_index, 0, tuple, PAGE_CUR_GE,
|
btr_cur_search_to_nth_level(sys_index, 0, tuple, PAGE_CUR_LE,
|
||||||
BTR_MODIFY_LEAF,
|
BTR_MODIFY_LEAF,
|
||||||
&cursor, 0, __FILE__, __LINE__, &mtr);
|
&cursor, 0, __FILE__, __LINE__, &mtr);
|
||||||
|
|
||||||
if (cursor.up_match == dtuple_get_n_fields(tuple)) {
|
if (cursor.low_match == dtuple_get_n_fields(tuple)) {
|
||||||
/* UPDATE SYS_INDEXES SET TYPE=index->type
|
/* UPDATE SYS_INDEXES SET TYPE=index->type
|
||||||
WHERE TABLE_ID=index->table->id AND INDEX_ID=index->id */
|
WHERE TABLE_ID=index->table->id AND INDEX_ID=index->id */
|
||||||
ulint len;
|
ulint len;
|
||||||
|
|
|
@ -10457,6 +10457,7 @@ ha_innobase::start_stmt(
|
||||||
thr_lock_type lock_type)
|
thr_lock_type lock_type)
|
||||||
{
|
{
|
||||||
trx_t* trx;
|
trx_t* trx;
|
||||||
|
DBUG_ENTER("ha_innobase::start_stmt");
|
||||||
|
|
||||||
update_thd(thd);
|
update_thd(thd);
|
||||||
|
|
||||||
|
@ -10479,6 +10480,28 @@ ha_innobase::start_stmt(
|
||||||
prebuilt->hint_need_to_fetch_extra_cols = 0;
|
prebuilt->hint_need_to_fetch_extra_cols = 0;
|
||||||
reset_template();
|
reset_template();
|
||||||
|
|
||||||
|
if (dict_table_is_temporary(prebuilt->table)
|
||||||
|
&& prebuilt->mysql_has_locked
|
||||||
|
&& prebuilt->select_lock_type == LOCK_NONE) {
|
||||||
|
ulint error;
|
||||||
|
|
||||||
|
switch (thd_sql_command(thd)) {
|
||||||
|
case SQLCOM_INSERT:
|
||||||
|
case SQLCOM_UPDATE:
|
||||||
|
case SQLCOM_DELETE:
|
||||||
|
init_table_handle_for_HANDLER();
|
||||||
|
prebuilt->select_lock_type = LOCK_X;
|
||||||
|
error = row_lock_table_for_mysql(prebuilt, NULL, 1);
|
||||||
|
|
||||||
|
if (error != DB_SUCCESS) {
|
||||||
|
error = convert_error_code_to_mysql(
|
||||||
|
(int) error, 0, thd);
|
||||||
|
DBUG_RETURN((int) error);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!prebuilt->mysql_has_locked) {
|
if (!prebuilt->mysql_has_locked) {
|
||||||
/* This handle is for a temporary table created inside
|
/* This handle is for a temporary table created inside
|
||||||
this same LOCK TABLES; since MySQL does NOT call external_lock
|
this same LOCK TABLES; since MySQL does NOT call external_lock
|
||||||
|
@ -10511,7 +10534,7 @@ ha_innobase::start_stmt(
|
||||||
|
|
||||||
innobase_register_trx(ht, thd, trx);
|
innobase_register_trx(ht, thd, trx);
|
||||||
|
|
||||||
return(0);
|
DBUG_RETURN(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************//**
|
/******************************************************************//**
|
||||||
|
@ -13958,6 +13981,45 @@ innobase_convert_to_filename_charset(
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**********************************************************************
|
||||||
|
Issue a warning that the row is too big. */
|
||||||
|
extern "C"
|
||||||
|
void
|
||||||
|
ib_warn_row_too_big(const dict_table_t* table)
|
||||||
|
{
|
||||||
|
/* If prefix is true then a 768-byte prefix is stored
|
||||||
|
locally for BLOB fields. Refer to dict_table_get_format() */
|
||||||
|
const bool prefix = ((table->flags & DICT_TF_FORMAT_MASK)
|
||||||
|
>> DICT_TF_FORMAT_SHIFT) < UNIV_FORMAT_B;
|
||||||
|
|
||||||
|
const ulint free_space = page_get_free_space_of_empty(
|
||||||
|
table->flags & DICT_TF_COMPACT) / 2;
|
||||||
|
|
||||||
|
THD* thd = current_thd;
|
||||||
|
|
||||||
|
if (thd) {
|
||||||
|
push_warning_printf(
|
||||||
|
thd, MYSQL_ERROR::WARN_LEVEL_WARN, HA_ERR_TO_BIG_ROW,
|
||||||
|
"Row size too large (> %lu). Changing some columns to TEXT"
|
||||||
|
" or BLOB %smay help. In current row format, BLOB prefix of"
|
||||||
|
" %d bytes is stored inline.", free_space
|
||||||
|
, prefix ? "or using ROW_FORMAT=DYNAMIC or"
|
||||||
|
" ROW_FORMAT=COMPRESSED ": ""
|
||||||
|
, prefix ? DICT_MAX_FIXED_COL_LEN : 0);
|
||||||
|
} else {
|
||||||
|
/* Note that we can't use push_warning_printf here because
|
||||||
|
e.g. purge thread has no thd */
|
||||||
|
sql_print_warning(
|
||||||
|
"Row size too large (> %lu). Changing some columns to TEXT"
|
||||||
|
" or BLOB %smay help. In current row format, BLOB prefix of"
|
||||||
|
" %d bytes is stored inline.", free_space
|
||||||
|
, prefix ? "or using ROW_FORMAT=DYNAMIC or"
|
||||||
|
" ROW_FORMAT=COMPRESSED ": ""
|
||||||
|
, prefix ? DICT_MAX_FIXED_COL_LEN : 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* DS-MRR implementation
|
* DS-MRR implementation
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
|
||||||
Copyright (c) 1994, 2012, Oracle and/or its affiliates. All Rights Reserved.
|
Copyright (c) 1994, 2014, 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
|
||||||
|
@ -28,7 +28,7 @@ Created 10/16/1994 Heikki Tuuri
|
||||||
|
|
||||||
#ifdef UNIV_DEBUG
|
#ifdef UNIV_DEBUG
|
||||||
# define LIMIT_OPTIMISTIC_INSERT_DEBUG(NREC, CODE)\
|
# define LIMIT_OPTIMISTIC_INSERT_DEBUG(NREC, CODE)\
|
||||||
if (btr_cur_limit_optimistic_insert_debug\
|
if (btr_cur_limit_optimistic_insert_debug > 1\
|
||||||
&& (NREC) >= (ulint)btr_cur_limit_optimistic_insert_debug) {\
|
&& (NREC) >= (ulint)btr_cur_limit_optimistic_insert_debug) {\
|
||||||
CODE;\
|
CODE;\
|
||||||
}
|
}
|
||||||
|
|
|
@ -1399,6 +1399,14 @@ dict_table_init_referenced_rbt(
|
||||||
/*===========================*/
|
/*===========================*/
|
||||||
dict_table_t* table); /*!< in: the table object whose
|
dict_table_t* table); /*!< in: the table object whose
|
||||||
table->referenced_rbt will be initialized */
|
table->referenced_rbt will be initialized */
|
||||||
|
/********************************************************************//**
|
||||||
|
Check if it is a temporary table.
|
||||||
|
@return true if temporary table flag is set. */
|
||||||
|
UNIV_INLINE
|
||||||
|
ibool
|
||||||
|
dict_table_is_temporary(
|
||||||
|
/*====================*/
|
||||||
|
const dict_table_t* table); /*!< in: table to check */
|
||||||
|
|
||||||
#ifndef UNIV_NONINL
|
#ifndef UNIV_NONINL
|
||||||
#include "dict0dict.ic"
|
#include "dict0dict.ic"
|
||||||
|
|
|
@ -1017,3 +1017,15 @@ dict_table_init_referenced_rbt(
|
||||||
ut_a(table->referenced_rbt != NULL);
|
ut_a(table->referenced_rbt != NULL);
|
||||||
return(table->referenced_rbt);
|
return(table->referenced_rbt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/********************************************************************//**
|
||||||
|
Check if it is a temporary table.
|
||||||
|
@return true if temporary table flag is set. */
|
||||||
|
UNIV_INLINE
|
||||||
|
ibool
|
||||||
|
dict_table_is_temporary(
|
||||||
|
/*====================*/
|
||||||
|
const dict_table_t* table) /*!< in: table to check */
|
||||||
|
{
|
||||||
|
return(table->flags & (DICT_TF2_TEMPORARY << DICT_TF2_SHIFT));
|
||||||
|
}
|
||||||
|
|
|
@ -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 36.1
|
#define PERCONA_INNODB_VERSION 37.0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define INNODB_VERSION_STR "5.5.40-MariaDB-" IB_TO_STR(PERCONA_INNODB_VERSION)
|
#define INNODB_VERSION_STR "5.5.41-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) "." \
|
||||||
|
@ -122,6 +122,10 @@ if we are compiling on Windows. */
|
||||||
# include <sched.h>
|
# include <sched.h>
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
|
# ifdef HAVE_MALLOC_H
|
||||||
|
# include <malloc.h>
|
||||||
|
# endif
|
||||||
|
|
||||||
/* We only try to do explicit inlining of functions with gcc and
|
/* We only try to do explicit inlining of functions with gcc and
|
||||||
Sun Studio */
|
Sun Studio */
|
||||||
|
|
||||||
|
|
|
@ -260,7 +260,7 @@ log_buffer_extend(
|
||||||
{
|
{
|
||||||
ulint move_start;
|
ulint move_start;
|
||||||
ulint move_end;
|
ulint move_end;
|
||||||
byte *tmp_buf=alloca(OS_FILE_LOG_BLOCK_SIZE);
|
byte* tmp_buf = alloca(OS_FILE_LOG_BLOCK_SIZE);
|
||||||
|
|
||||||
mutex_enter(&(log_sys->mutex));
|
mutex_enter(&(log_sys->mutex));
|
||||||
|
|
||||||
|
|
|
@ -1817,7 +1817,7 @@ log_online_purge_changed_page_bitmaps(
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (srv_track_changed_pages && lsn >= log_bmp_sys->end_lsn) {
|
if (srv_track_changed_pages && lsn > log_bmp_sys->end_lsn) {
|
||||||
/* If we have to delete the current output file, close it
|
/* If we have to delete the current output file, close it
|
||||||
first. */
|
first. */
|
||||||
os_file_close(log_bmp_sys->out.file);
|
os_file_close(log_bmp_sys->out.file);
|
||||||
|
|
|
@ -2996,10 +2996,10 @@ recv_recovery_from_checkpoint_start_func(
|
||||||
#endif /* UNIV_LOG_ARCHIVE */
|
#endif /* UNIV_LOG_ARCHIVE */
|
||||||
byte* buf;
|
byte* buf;
|
||||||
byte* log_hdr_buf;
|
byte* log_hdr_buf;
|
||||||
byte *log_hdr_buf_base;
|
byte* log_hdr_buf_base = alloca(LOG_FILE_HDR_SIZE
|
||||||
|
+ OS_FILE_LOG_BLOCK_SIZE);
|
||||||
ulint err;
|
ulint err;
|
||||||
|
|
||||||
log_hdr_buf_base= alloca(LOG_FILE_HDR_SIZE + OS_FILE_LOG_BLOCK_SIZE);
|
|
||||||
log_hdr_buf = ut_align(log_hdr_buf_base, OS_FILE_LOG_BLOCK_SIZE);
|
log_hdr_buf = ut_align(log_hdr_buf_base, OS_FILE_LOG_BLOCK_SIZE);
|
||||||
|
|
||||||
#ifdef UNIV_LOG_ARCHIVE
|
#ifdef UNIV_LOG_ARCHIVE
|
||||||
|
|
|
@ -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.
|
||||||
|
|
||||||
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
|
||||||
|
@ -3227,6 +3227,9 @@ row_drop_table_for_mysql(
|
||||||
ulint namelen;
|
ulint namelen;
|
||||||
ibool locked_dictionary = FALSE;
|
ibool locked_dictionary = FALSE;
|
||||||
pars_info_t* info = NULL;
|
pars_info_t* info = NULL;
|
||||||
|
DBUG_ENTER("row_drop_table_for_mysql");
|
||||||
|
|
||||||
|
DBUG_PRINT("row_drop_table_for_mysql", ("table: %s", name));
|
||||||
|
|
||||||
ut_a(name != NULL);
|
ut_a(name != NULL);
|
||||||
|
|
||||||
|
@ -3237,7 +3240,7 @@ row_drop_table_for_mysql(
|
||||||
"InnoDB: Shut down mysqld and edit my.cnf so that newraw"
|
"InnoDB: Shut down mysqld and edit my.cnf so that newraw"
|
||||||
" is replaced with raw.\n", stderr);
|
" is replaced with raw.\n", stderr);
|
||||||
|
|
||||||
return(DB_ERROR);
|
DBUG_RETURN(DB_ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
trx->op_info = "dropping table";
|
trx->op_info = "dropping table";
|
||||||
|
@ -3644,7 +3647,7 @@ funct_exit:
|
||||||
|
|
||||||
srv_wake_master_thread();
|
srv_wake_master_thread();
|
||||||
|
|
||||||
return((int) err);
|
DBUG_RETURN((int) err);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*********************************************************************//**
|
/*********************************************************************//**
|
||||||
|
|
Loading…
Add table
Reference in a new issue