MySQL-5.5.35 merge
This commit is contained in:
commit
37d240ecf9
@ -175,6 +175,81 @@ MARK_AS_ADVANCED(CYBOZU BACKUP_TEST WITHOUT_SERVER DISABLE_SHARED)
|
||||
|
||||
OPTION(NOT_FOR_DISTRIBUTION "Allow linking with GPLv2-incompatible system libraries. Only set it you never plan to distribute the resulting binaries" OFF)
|
||||
|
||||
include(CheckCSourceCompiles)
|
||||
include(CheckCXXSourceCompiles)
|
||||
# We need some extra FAIL_REGEX patterns
|
||||
# Note that CHECK_C_SOURCE_COMPILES is a misnomer, it will also link.
|
||||
MACRO (MY_CHECK_C_COMPILER_FLAG FLAG RESULT)
|
||||
SET(SAVE_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
|
||||
SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${FLAG}")
|
||||
CHECK_C_SOURCE_COMPILES("int main(void) { return 0; }" ${RESULT}
|
||||
FAIL_REGEX "argument unused during compilation"
|
||||
FAIL_REGEX "unsupported .*option"
|
||||
FAIL_REGEX "unknown .*option"
|
||||
FAIL_REGEX "unrecognized .*option"
|
||||
FAIL_REGEX "ignoring unknown option"
|
||||
FAIL_REGEX "[Ww]arning: [Oo]ption"
|
||||
)
|
||||
SET(CMAKE_REQUIRED_FLAGS "${SAVE_CMAKE_REQUIRED_FLAGS}")
|
||||
ENDMACRO()
|
||||
|
||||
MACRO (MY_CHECK_CXX_COMPILER_FLAG FLAG RESULT)
|
||||
SET(SAVE_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
|
||||
SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${FLAG}")
|
||||
CHECK_CXX_SOURCE_COMPILES("int main(void) { return 0; }" ${RESULT}
|
||||
FAIL_REGEX "argument unused during compilation"
|
||||
FAIL_REGEX "unsupported .*option"
|
||||
FAIL_REGEX "unknown .*option"
|
||||
FAIL_REGEX "unrecognized .*option"
|
||||
FAIL_REGEX "ignoring unknown option"
|
||||
FAIL_REGEX "[Ww]arning: [Oo]ption"
|
||||
)
|
||||
SET(CMAKE_REQUIRED_FLAGS "${SAVE_CMAKE_REQUIRED_FLAGS}")
|
||||
ENDMACRO()
|
||||
|
||||
OPTION(WITH_ASAN "Enable address sanitizer" OFF)
|
||||
IF (WITH_ASAN)
|
||||
# gcc 4.8.1 and new versions of clang
|
||||
MY_CHECK_C_COMPILER_FLAG("-fsanitize=address" HAVE_C_FSANITIZE)
|
||||
MY_CHECK_CXX_COMPILER_FLAG("-fsanitize=address" HAVE_CXX_FSANITIZE)
|
||||
|
||||
IF(HAVE_C_FSANITIZE AND HAVE_CXX_FSANITIZE)
|
||||
# We switch on basic optimization also for debug builds.
|
||||
# With optimization we may get some warnings, so we switch off -Werror
|
||||
SET(CMAKE_C_FLAGS_DEBUG
|
||||
"${CMAKE_C_FLAGS_DEBUG} -fsanitize=address -O1 -Wno-error -fPIC")
|
||||
SET(CMAKE_C_FLAGS_RELWITHDEBINFO
|
||||
"${CMAKE_C_FLAGS_RELWITHDEBINFO} -fsanitize=address -fPIC")
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG
|
||||
"${CMAKE_CXX_FLAGS_DEBUG} -fsanitize=address -O1 -Wno-error -fPIC")
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO
|
||||
"${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -fsanitize=address -fPIC")
|
||||
SET(WITH_ASAN_OK 1)
|
||||
ELSE()
|
||||
# older versions of clang
|
||||
MY_CHECK_C_COMPILER_FLAG("-faddress-sanitizer" HAVE_C_FADDRESS)
|
||||
MY_CHECK_CXX_COMPILER_FLAG("-faddress-sanitizer" HAVE_CXX_FFADDRESS)
|
||||
|
||||
IF(HAVE_C_FADDRESS AND HAVE_CXX_FFADDRESS)
|
||||
# We switch on basic optimization also for debug builds.
|
||||
SET(CMAKE_C_FLAGS_DEBUG
|
||||
"${CMAKE_C_FLAGS_DEBUG} -faddress-sanitizer -O1 -fPIC")
|
||||
SET(CMAKE_C_FLAGS_RELWITHDEBINFO
|
||||
"${CMAKE_C_FLAGS_RELWITHDEBINFO} -faddress-sanitizer -fPIC")
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG
|
||||
"${CMAKE_CXX_FLAGS_DEBUG} -faddress-sanitizer -O1 -fPIC")
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO
|
||||
"${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -faddress-sanitizer -fPIC")
|
||||
SET(WITH_ASAN_OK 1)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
IF(NOT WITH_ASAN_OK)
|
||||
MESSAGE(FATAL_ERROR "Do not know how to enable address sanitizer")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
|
||||
OPTION(ENABLE_DEBUG_SYNC "Enable debug sync (debug builds only)" ON)
|
||||
IF(ENABLE_DEBUG_SYNC)
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DENABLED_DEBUG_SYNC")
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2010, 2013, 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
|
||||
@ -34,7 +34,10 @@ ENDFOREACH()
|
||||
|
||||
# Ensure we have clean build for shared libraries
|
||||
# without unresolved symbols
|
||||
SET(LINK_FLAG_NO_UNDEFINED "-Wl,--no-undefined")
|
||||
# Not supported with AddressSanitizer
|
||||
IF(NOT WITH_ASAN)
|
||||
SET(LINK_FLAG_NO_UNDEFINED "-Wl,--no-undefined")
|
||||
ENDIF()
|
||||
|
||||
# 64 bit file offset support flag
|
||||
SET(_FILE_OFFSET_BITS 64)
|
||||
|
@ -147,6 +147,10 @@ IF(UNIX)
|
||||
|
||||
SET(CMAKE_REQUIRED_LIBRARIES
|
||||
${LIBM} ${LIBNSL} ${LIBBIND} ${LIBCRYPT} ${LIBSOCKET} ${LIBDL} ${CMAKE_THREAD_LIBS_INIT} ${LIBRT} ${LIBEXECINFO})
|
||||
# Need explicit pthread for gcc -fsanitize=address
|
||||
IF(CMAKE_USE_PTHREADS_INIT AND CMAKE_C_FLAGS MATCHES "-fsanitize=")
|
||||
SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} pthread)
|
||||
ENDIF()
|
||||
|
||||
IF(CMAKE_REQUIRED_LIBRARIES)
|
||||
LIST(REMOVE_DUPLICATES CMAKE_REQUIRED_LIBRARIES)
|
||||
|
@ -37,4 +37,9 @@ ENDIF()
|
||||
ADD_CONVENIENCE_LIBRARY(yassl ${YASSL_SOURCES})
|
||||
RESTRICT_SYMBOL_EXPORTS(yassl)
|
||||
|
||||
INSTALL_DEBUG_SYMBOLS(yassl)
|
||||
IF(MSVC)
|
||||
INSTALL_DEBUG_TARGET(yassl DESTINATION ${INSTALL_LIBDIR}/debug)
|
||||
ENDIF()
|
||||
|
||||
|
||||
|
@ -36,3 +36,8 @@ ENDIF()
|
||||
ADD_CONVENIENCE_LIBRARY(taocrypt ${TAOCRYPT_SOURCES})
|
||||
RESTRICT_SYMBOL_EXPORTS(taocrypt)
|
||||
|
||||
INSTALL_DEBUG_SYMBOLS(taocrypt)
|
||||
IF(MSVC)
|
||||
INSTALL_DEBUG_TARGET(taocrypt DESTINATION ${INSTALL_LIBDIR}/debug)
|
||||
ENDIF()
|
||||
|
||||
|
73
include/my_check_opt.h
Normal file
73
include/my_check_opt.h
Normal file
@ -0,0 +1,73 @@
|
||||
/* Copyright (c) 2000, 2013, 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 Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
|
||||
|
||||
#ifndef _my_check_opt_h
|
||||
#define _my_check_opt_h
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
All given definitions needed for MyISAM storage engine:
|
||||
myisamchk.c or/and ha_myisam.cc or/and micheck.c
|
||||
Some definitions are needed by the MySQL parser.
|
||||
*/
|
||||
|
||||
#define T_AUTO_INC (1UL << 0)
|
||||
#define T_AUTO_REPAIR (1UL << 1)
|
||||
#define T_BACKUP_DATA (1UL << 2)
|
||||
#define T_CALC_CHECKSUM (1UL << 3)
|
||||
#define T_CHECK (1UL << 4)
|
||||
#define T_CHECK_ONLY_CHANGED (1UL << 5)
|
||||
#define T_CREATE_MISSING_KEYS (1UL << 6)
|
||||
#define T_DESCRIPT (1UL << 7)
|
||||
#define T_DONT_CHECK_CHECKSUM (1UL << 8)
|
||||
#define T_EXTEND (1UL << 9)
|
||||
#define T_FAST (1UL << 10)
|
||||
#define T_FORCE_CREATE (1UL << 11)
|
||||
#define T_FORCE_UNIQUENESS (1UL << 12)
|
||||
#define T_INFO (1UL << 13)
|
||||
/** CHECK TABLE...MEDIUM (the default) */
|
||||
#define T_MEDIUM (1UL << 14)
|
||||
/** CHECK TABLE...QUICK */
|
||||
#define T_QUICK (1UL << 15)
|
||||
#define T_READONLY (1UL << 16)
|
||||
#define T_REP (1UL << 17)
|
||||
#define T_REP_BY_SORT (1UL << 18)
|
||||
#define T_REP_PARALLEL (1UL << 19)
|
||||
#define T_RETRY_WITHOUT_QUICK (1UL << 20)
|
||||
#define T_SAFE_REPAIR (1UL << 21)
|
||||
#define T_SILENT (1UL << 22)
|
||||
#define T_SORT_INDEX (1UL << 23)
|
||||
#define T_SORT_RECORDS (1UL << 24)
|
||||
#define T_STATISTICS (1UL << 25)
|
||||
#define T_UNPACK (1UL << 26)
|
||||
#define T_UPDATE_STATE (1UL << 27)
|
||||
#define T_VERBOSE (1UL << 28)
|
||||
#define T_VERY_SILENT (1UL << 29)
|
||||
#define T_WAIT_FOREVER (1UL << 30)
|
||||
#define T_WRITE_LOOP (1UL << 31)
|
||||
#define T_ZEROFILL (1ULL << 32)
|
||||
#define T_ZEROFILL_KEEP_LSN (1ULL << 33)
|
||||
/** If repair should not bump create_rename_lsn */
|
||||
#define T_NO_CREATE_RENAME_LSN (1ULL << 33)
|
||||
|
||||
#define T_REP_ANY (T_REP | T_REP_BY_SORT | T_REP_PARALLEL)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
@ -28,7 +28,7 @@ extern "C" {
|
||||
#include "my_compare.h"
|
||||
#include <myisamchk.h>
|
||||
#include <mysql/plugin.h>
|
||||
|
||||
#include <my_check_opt.h>
|
||||
/*
|
||||
Limit max keys according to HA_MAX_POSSIBLE_KEY; See myisamchk.h for details
|
||||
*/
|
||||
@ -311,7 +311,6 @@ typedef struct st_mi_bit_buff
|
||||
uint error;
|
||||
} MI_BIT_BUFF;
|
||||
|
||||
|
||||
typedef struct st_sort_info
|
||||
{
|
||||
/* sync things */
|
||||
|
@ -27,45 +27,6 @@
|
||||
#ifndef _myisamchk_h
|
||||
#define _myisamchk_h
|
||||
|
||||
#define T_AUTO_INC 1
|
||||
#define T_AUTO_REPAIR 2 /* QQ to be removed */
|
||||
#define T_BACKUP_DATA 4
|
||||
#define T_CALC_CHECKSUM 8
|
||||
#define T_CHECK 16
|
||||
#define T_CHECK_ONLY_CHANGED 32
|
||||
#define T_CREATE_MISSING_KEYS 64
|
||||
#define T_DESCRIPT 128
|
||||
#define T_DONT_CHECK_CHECKSUM 256
|
||||
#define T_EXTEND 512
|
||||
#define T_FAST (1L << 10)
|
||||
#define T_FORCE_CREATE (1L << 11)
|
||||
#define T_FORCE_UNIQUENESS (1L << 12)
|
||||
#define T_INFO (1L << 13)
|
||||
#define T_MEDIUM (1L << 14)
|
||||
#define T_QUICK (1L << 15)
|
||||
#define T_READONLY (1L << 16)
|
||||
#define T_REP (1L << 17)
|
||||
#define T_REP_BY_SORT (1L << 18)
|
||||
#define T_REP_PARALLEL (1L << 19)
|
||||
#define T_RETRY_WITHOUT_QUICK (1L << 20)
|
||||
#define T_SAFE_REPAIR (1L << 21)
|
||||
#define T_SILENT (1L << 22)
|
||||
#define T_SORT_INDEX (1L << 23)
|
||||
#define T_SORT_RECORDS (1L << 24)
|
||||
#define T_STATISTICS (1L << 25)
|
||||
#define T_UNPACK (1L << 26)
|
||||
#define T_UPDATE_STATE (1L << 27)
|
||||
#define T_VERBOSE (1L << 28)
|
||||
#define T_VERY_SILENT (1L << 29)
|
||||
#define T_WAIT_FOREVER (1L << 30)
|
||||
#define T_WRITE_LOOP ((ulong) 1L << 31)
|
||||
#define T_ZEROFILL ((ulonglong) 1L << 32)
|
||||
#define T_ZEROFILL_KEEP_LSN ((ulonglong) 1L << 33)
|
||||
/** If repair should not bump create_rename_lsn */
|
||||
#define T_NO_CREATE_RENAME_LSN ((ulonglong) 1L << 33)
|
||||
|
||||
#define T_REP_ANY (T_REP | T_REP_BY_SORT | T_REP_PARALLEL)
|
||||
|
||||
/*
|
||||
Flags used by xxxxchk.c or/and ha_xxxx.cc that are NOT passed
|
||||
to xxxcheck.c follows:
|
||||
|
@ -332,8 +332,10 @@ SET(LIBS clientlib dbug strings vio mysys ${ZLIB_LIBRARY} ${SSL_LIBRARIES} ${LIB
|
||||
MERGE_LIBRARIES(mysqlclient STATIC ${LIBS} COMPONENT Development)
|
||||
|
||||
# Visual Studio users need debug static library for debug projects
|
||||
INSTALL_DEBUG_SYMBOLS(clientlib)
|
||||
IF(MSVC)
|
||||
INSTALL_DEBUG_TARGET(mysqlclient DESTINATION ${INSTALL_LIBDIR}/debug)
|
||||
INSTALL_DEBUG_TARGET(clientlib DESTINATION ${INSTALL_LIBDIR}/debug)
|
||||
ENDIF()
|
||||
|
||||
IF(UNIX)
|
||||
|
@ -15,6 +15,7 @@ main.wait_timeout @solaris # Bug#11758972 2010-04-26 alik wait_tim
|
||||
|
||||
rpl.rpl_innodb_bug28430 # Bug#11754425
|
||||
rpl.rpl_row_sp011 @solaris # Bug#11753919 2011-07-25 sven Several test cases fail on Solaris with error Thread stack overrun
|
||||
rpl.rpl_spec_variables @solaris # Bug #17337114 2013-08-20 Luis Soares failing on pb2 with timeout for 'CHECK WARNINGS'
|
||||
|
||||
sys_vars.max_sp_recursion_depth_func @solaris # Bug#11753919 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
|
||||
sys_vars.wait_timeout_func # Bug#11750645 2010-04-26 alik wait_timeout_func fails
|
||||
|
@ -150,10 +150,9 @@ if (`SELECT HEX(@commands) = HEX('configure')`)
|
||||
}
|
||||
|
||||
#
|
||||
# Drops tables and synchronizes master and slave. Note that temporary
|
||||
# tables are not explitcily dropped as they will be dropped while
|
||||
# closing the connection.
|
||||
# Drops tables and synchronizes master and slave.
|
||||
#
|
||||
|
||||
if (`SELECT HEX(@commands) = HEX('clean')`)
|
||||
{
|
||||
connection master;
|
||||
@ -162,10 +161,15 @@ if (`SELECT HEX(@commands) = HEX('clean')`)
|
||||
|
||||
DROP TABLE IF EXISTS nt_xx_1;
|
||||
|
||||
DROP TEMPORARY TABLE IF EXISTS tt_tmp_xx_1;
|
||||
DROP TEMPORARY TABLE IF EXISTS nt_tmp_xx_1;
|
||||
|
||||
--let $n= $tot_table
|
||||
while ($n)
|
||||
{
|
||||
--eval DROP TABLE IF EXISTS nt_$n
|
||||
--eval DROP TEMPORARY TABLE IF EXISTS tt_tmp_$n
|
||||
--eval DROP TEMPORARY TABLE IF EXISTS nt_tmp_$n
|
||||
--dec $n
|
||||
}
|
||||
|
||||
|
@ -113,7 +113,7 @@ FLUSH LOGS;
|
||||
--echo -------- switch to master --------
|
||||
connection master;
|
||||
FLUSH LOGS;
|
||||
|
||||
DROP TEMPORARY TABLE IF EXISTS mysqltest1.tmp2;
|
||||
DROP DATABASE mysqltest1;
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
@ -41,6 +41,9 @@ reset slave;
|
||||
source include/start_slave.inc;
|
||||
sync_with_master;
|
||||
show status like 'slave_open_temp_tables';
|
||||
connection master;
|
||||
drop temporary table if exists t1;
|
||||
sync_slave_with_master;
|
||||
|
||||
#
|
||||
#Bug#34654 RESET SLAVE does not clear LAST_IO_Err*
|
||||
|
@ -78,5 +78,7 @@ BEGIN
|
||||
-- verify that no plugin changed its disabled/enabled state
|
||||
SELECT * FROM INFORMATION_SCHEMA.PLUGINS;
|
||||
|
||||
show status like 'slave_open_temp_tables';
|
||||
|
||||
END||
|
||||
|
||||
|
66
mysql-test/include/search_pattern_in_file.inc
Normal file
66
mysql-test/include/search_pattern_in_file.inc
Normal file
@ -0,0 +1,66 @@
|
||||
# Purpose:
|
||||
# Simple search with Perl for a pattern in some file.
|
||||
#
|
||||
# The advantages compared to thinkable auxiliary constructs using the
|
||||
# mysqltest language and SQL are:
|
||||
# 1. We do not need a running MySQL server.
|
||||
# 2. SQL causes "noise" during debugging and increases the size of logs.
|
||||
# Perl code does not disturb at all.
|
||||
#
|
||||
# The environment variables SEARCH_FILE and SEARCH_PATTERN must be set
|
||||
# before sourcing this routine.
|
||||
#
|
||||
# In case of
|
||||
# - SEARCH_FILE and/or SEARCH_PATTERN is not set
|
||||
# - SEARCH_FILE cannot be opened
|
||||
# - SEARCH_FILE does not contain SEARCH_PATTERN
|
||||
# the test will abort immediate.
|
||||
# MTR will report something like
|
||||
# ....
|
||||
# worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 13000..13009
|
||||
# main.1st [ pass ] 3
|
||||
# innodb.innodb_page_size [ fail ]
|
||||
# Test ended at 2011-11-11 18:15:58
|
||||
#
|
||||
# CURRENT_TEST: innodb.innodb_page_size
|
||||
# # ERROR: The file '<name>' does not contain the expected pattern <pattern>
|
||||
# mysqltest: In included file "./include/search_pattern_in_file.inc":
|
||||
# included from ./include/search_pattern_in_file.inc at line 36:
|
||||
# At line 25: command "perl" failed with error 255. my_errno=175
|
||||
#
|
||||
# The result from queries just before the failure was:
|
||||
# ...
|
||||
# - saving '<some path>' to '<some path>'
|
||||
# main.1st [ pass ] 2
|
||||
#
|
||||
# Typical use case (check invalid server startup options):
|
||||
# let $error_log= $MYSQLTEST_VARDIR/log/my_restart.err;
|
||||
# --error 0,1
|
||||
# --remove_file $error_log
|
||||
# let SEARCH_FILE= $error_log;
|
||||
# # Stop the server
|
||||
# let $restart_file= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect;
|
||||
# --exec echo "wait" > $restart_file
|
||||
# --shutdown_server 10
|
||||
# --source include/wait_until_disconnected.inc
|
||||
#
|
||||
# --error 1
|
||||
# --exec $MYSQLD_CMD <whatever wrong setting> > $error_log 2>&1
|
||||
# # The server restart aborts
|
||||
# let SEARCH_PATTERN= \[ERROR\] Aborting;
|
||||
# --source include/search_pattern_in_file.inc
|
||||
#
|
||||
# Created: 2011-11-11 mleich
|
||||
#
|
||||
|
||||
perl;
|
||||
use strict;
|
||||
my $search_file= $ENV{'SEARCH_FILE'} or die "SEARCH_FILE not set";
|
||||
my $search_pattern= $ENV{'SEARCH_PATTERN'} or die "SEARCH_PATTERN not set";
|
||||
open(FILE, "$search_file") or die("Unable to open '$search_file': $!\n");
|
||||
read(FILE, my $file_content, 50000, 0);
|
||||
close(FILE);
|
||||
if ( not $file_content =~ m{$search_pattern} ) {
|
||||
die("# ERROR: The file '$search_file' does not contain the expected pattern $search_pattern\n->$file_content<-\n");
|
||||
}
|
||||
EOF
|
@ -1,6 +1,6 @@
|
||||
Illegal error code: 10000
|
||||
MySQL error code 1062 (ER_DUP_ENTRY): Duplicate entry '%-.192s' for key %d
|
||||
MySQL error code 1076 (ER_READY): %s: ready for connections.
|
||||
Version: '%s' socket: '%s' port: %d
|
||||
MySQL error code 1408 (ER_STARTUP): %s: ready for connections.
|
||||
Version: '%s' socket: '%s' port: %d %s
|
||||
MySQL error code 1459 (ER_TABLE_NEEDS_UPGRADE): Table upgrade required. Please do "REPAIR TABLE `%-.32s`" or dump/reload to fix it!
|
||||
MySQL error code 1461 (ER_MAX_PREPARED_STMT_COUNT_REACHED): Can't create more than max_prepared_stmt_count statements (current value: %lu)
|
||||
|
@ -256,7 +256,7 @@ handler t1 read a=(1);
|
||||
a b
|
||||
handler t1 read a next;
|
||||
a b
|
||||
16 ccc
|
||||
14 aaa
|
||||
handler t1 close;
|
||||
handler t1 open;
|
||||
prepare stmt from 'handler t1 read a=(?) limit ?,?';
|
||||
@ -563,7 +563,7 @@ HANDLER t1 READ `primary` = (1, 1000);
|
||||
no1 no2
|
||||
HANDLER t1 READ `primary` NEXT;
|
||||
no1 no2
|
||||
2 8
|
||||
2 6
|
||||
DROP TABLE t1;
|
||||
create table t1 (c1 int);
|
||||
insert into t1 values (14397);
|
||||
|
@ -6,5 +6,5 @@ HANDLER bug13510739 READ `primary` = (2);
|
||||
c
|
||||
HANDLER bug13510739 READ `primary` NEXT;
|
||||
c
|
||||
4
|
||||
3
|
||||
DROP TABLE bug13510739;
|
||||
|
@ -1,9 +1,3 @@
|
||||
--source include/not_windows_embedded.inc
|
||||
# remove this when
|
||||
# Bug#53947 InnoDB: Assertion failure in thread 4224 in file
|
||||
# .\sync\sync0sync.c line 324
|
||||
# is fixed
|
||||
|
||||
#######################################################################
|
||||
# #
|
||||
# Please, DO NOT TOUCH this file as well as the innodb.result file. #
|
||||
|
@ -15,4 +15,7 @@ master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE IF NOT EXISTS t
|
||||
master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE IF NOT EXISTS tmp1 LIKE tmp
|
||||
master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE IF NOT EXISTS tmp1 LIKE tmp
|
||||
master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE IF NOT EXISTS tmp2 SELECT * FROM tmp
|
||||
DROP TEMPORARY TABLE tmp;
|
||||
DROP TEMPORARY TABLE tmp1;
|
||||
DROP TEMPORARY TABLE tmp2;
|
||||
include/rpl_end.inc
|
||||
|
14
mysql-test/suite/rpl/r/rpl_lost_events_on_rotate.result
Normal file
14
mysql-test/suite/rpl/r/rpl_lost_events_on_rotate.result
Normal file
@ -0,0 +1,14 @@
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
SET @debug_saved= @@GLOBAL.DEBUG_DBUG;
|
||||
CREATE TABLE t (i INT);
|
||||
SET GLOBAL DEBUG_DBUG= "d,wait_after_binlog_EOF";
|
||||
INSERT INTO t VALUES (1);
|
||||
INSERT INTO t VALUES (2);
|
||||
FLUSH LOGS;
|
||||
SET DEBUG_SYNC= 'now SIGNAL signal.rotate_finished';
|
||||
include/diff_tables.inc [master:t,slave:t]
|
||||
SET @@GLOBAL.DEBUG_DBUG= @debug_saved;
|
||||
SET DEBUG_SYNC= 'RESET';
|
||||
DROP TABLE t;
|
||||
include/rpl_end.inc
|
@ -43,4 +43,5 @@ t5 CREATE TABLE `t5` (
|
||||
`created` datetime DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
drop table t2,t3,t5;
|
||||
drop temporary table t4;
|
||||
include/rpl_end.inc
|
||||
|
@ -1554,8 +1554,14 @@ master-bin.000001 # Query # # COMMIT
|
||||
SET @commands= 'clean';
|
||||
DROP TABLE IF EXISTS tt_xx_1;
|
||||
DROP TABLE IF EXISTS nt_xx_1;
|
||||
DROP TEMPORARY TABLE IF EXISTS tt_tmp_xx_1;
|
||||
DROP TEMPORARY TABLE IF EXISTS nt_tmp_xx_1;
|
||||
DROP TABLE IF EXISTS nt_2;
|
||||
DROP TEMPORARY TABLE IF EXISTS tt_tmp_2;
|
||||
DROP TEMPORARY TABLE IF EXISTS nt_tmp_2;
|
||||
DROP TABLE IF EXISTS nt_1;
|
||||
DROP TEMPORARY TABLE IF EXISTS tt_tmp_1;
|
||||
DROP TEMPORARY TABLE IF EXISTS nt_tmp_1;
|
||||
DROP TABLE IF EXISTS tt_2;
|
||||
DROP TABLE IF EXISTS tt_1;
|
||||
SET @commands= '';
|
||||
|
@ -98,6 +98,7 @@ count(*)
|
||||
91
|
||||
unlock tables;
|
||||
drop table if exists t1,t2,t3,t4;
|
||||
drop temporary table temp_table;
|
||||
End of 4.1 tests
|
||||
show binlog events in 'non existing_binlog_file';
|
||||
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log
|
||||
|
@ -1619,8 +1619,14 @@ master-bin.000001 # Query # # COMMIT
|
||||
SET @commands= 'clean';
|
||||
DROP TABLE IF EXISTS tt_xx_1;
|
||||
DROP TABLE IF EXISTS nt_xx_1;
|
||||
DROP TEMPORARY TABLE IF EXISTS tt_tmp_xx_1;
|
||||
DROP TEMPORARY TABLE IF EXISTS nt_tmp_xx_1;
|
||||
DROP TABLE IF EXISTS nt_2;
|
||||
DROP TEMPORARY TABLE IF EXISTS tt_tmp_2;
|
||||
DROP TEMPORARY TABLE IF EXISTS nt_tmp_2;
|
||||
DROP TABLE IF EXISTS nt_1;
|
||||
DROP TEMPORARY TABLE IF EXISTS tt_tmp_1;
|
||||
DROP TEMPORARY TABLE IF EXISTS nt_tmp_1;
|
||||
DROP TABLE IF EXISTS tt_2;
|
||||
DROP TABLE IF EXISTS tt_1;
|
||||
SET @commands= '';
|
||||
|
@ -23,6 +23,7 @@ include/start_slave.inc
|
||||
show status like 'slave_open_temp_tables';
|
||||
Variable_name Value
|
||||
Slave_open_temp_tables 0
|
||||
drop temporary table if exists t1;
|
||||
include/stop_slave.inc
|
||||
reset slave;
|
||||
include/check_slave_no_error.inc
|
||||
|
@ -48,6 +48,7 @@ select (@id := id) - id from t2;
|
||||
0
|
||||
kill @id;
|
||||
drop table t2;
|
||||
drop temporary table t3;
|
||||
Got one of the listed errors
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1927]
|
||||
select count(*) from t1;
|
||||
|
@ -1604,8 +1604,14 @@ master-bin.000001 # Query # # ROLLBACK
|
||||
SET @commands= 'clean';
|
||||
DROP TABLE IF EXISTS tt_xx_1;
|
||||
DROP TABLE IF EXISTS nt_xx_1;
|
||||
DROP TEMPORARY TABLE IF EXISTS tt_tmp_xx_1;
|
||||
DROP TEMPORARY TABLE IF EXISTS nt_tmp_xx_1;
|
||||
DROP TABLE IF EXISTS nt_2;
|
||||
DROP TEMPORARY TABLE IF EXISTS tt_tmp_2;
|
||||
DROP TEMPORARY TABLE IF EXISTS nt_tmp_2;
|
||||
DROP TABLE IF EXISTS nt_1;
|
||||
DROP TEMPORARY TABLE IF EXISTS tt_tmp_1;
|
||||
DROP TEMPORARY TABLE IF EXISTS nt_tmp_1;
|
||||
DROP TABLE IF EXISTS tt_2;
|
||||
DROP TABLE IF EXISTS tt_1;
|
||||
SET @commands= '';
|
||||
|
@ -79,6 +79,7 @@ COUNT(*)
|
||||
FLUSH LOGS;
|
||||
-------- switch to master --------
|
||||
FLUSH LOGS;
|
||||
DROP TEMPORARY TABLE IF EXISTS mysqltest1.tmp2;
|
||||
DROP DATABASE mysqltest1;
|
||||
End of 5.1 tests
|
||||
#
|
||||
|
@ -23,6 +23,7 @@ include/start_slave.inc
|
||||
show status like 'slave_open_temp_tables';
|
||||
Variable_name Value
|
||||
Slave_open_temp_tables 1
|
||||
drop temporary table if exists t1;
|
||||
include/stop_slave.inc
|
||||
reset slave;
|
||||
include/check_slave_no_error.inc
|
||||
|
@ -38,4 +38,8 @@ CREATE TEMPORARY TABLE IF NOT EXISTS tmp2 SELECT * FROM tmp;
|
||||
CREATE TEMPORARY TABLE IF NOT EXISTS tmp2 SELECT * FROM tmp;
|
||||
source include/show_binlog_events.inc;
|
||||
|
||||
DROP TEMPORARY TABLE tmp;
|
||||
DROP TEMPORARY TABLE tmp1;
|
||||
DROP TEMPORARY TABLE tmp2;
|
||||
|
||||
--source include/rpl_end.inc
|
||||
|
51
mysql-test/suite/rpl/t/rpl_lost_events_on_rotate.test
Normal file
51
mysql-test/suite/rpl/t/rpl_lost_events_on_rotate.test
Normal file
@ -0,0 +1,51 @@
|
||||
#
|
||||
# Whenever the mysql_binlog_send method (dump thread) reaches the
|
||||
# end of file when reading events from the binlog, before checking
|
||||
# if it should wait for more events, there was a test to check if
|
||||
# the file being read was still active, i.e, it was the last known
|
||||
# binlog. However, it was possible that something was written to
|
||||
# the binary log and then a rotation would happen, after EOF was
|
||||
# detected and before the check for active was performed. In this
|
||||
# case, the end of the binary log would not be read by the dump
|
||||
# thread, and this would cause the slave to lose updates.
|
||||
#
|
||||
# This test verifies that the problem has been fixed. It waits
|
||||
# during this window while forcing a rotation in the binlog.
|
||||
#
|
||||
--source include/have_debug.inc
|
||||
--source include/master-slave.inc
|
||||
|
||||
--connection master
|
||||
|
||||
SET @debug_saved= @@GLOBAL.DEBUG_DBUG;
|
||||
|
||||
CREATE TABLE t (i INT);
|
||||
|
||||
# When reaching the EOF the dump thread will wait before deciding if
|
||||
# it should move to a new binlong file.
|
||||
SET GLOBAL DEBUG_DBUG= "d,wait_after_binlog_EOF";
|
||||
|
||||
INSERT INTO t VALUES (1);
|
||||
|
||||
--sleep 1
|
||||
|
||||
# A insert and a rotate happens before the decision
|
||||
INSERT INTO t VALUES (2);
|
||||
FLUSH LOGS;
|
||||
|
||||
SET DEBUG_SYNC= 'now SIGNAL signal.rotate_finished';
|
||||
|
||||
--sync_slave_with_master
|
||||
|
||||
# All the rows should be sent to the slave.
|
||||
--let $diff_tables=master:t,slave:t
|
||||
--source include/diff_tables.inc
|
||||
|
||||
##Clean up
|
||||
--connection master
|
||||
|
||||
SET @@GLOBAL.DEBUG_DBUG= @debug_saved;
|
||||
SET DEBUG_SYNC= 'RESET';
|
||||
|
||||
DROP TABLE t;
|
||||
--source include/rpl_end.inc
|
@ -44,6 +44,7 @@ show create table t3;
|
||||
show create table t5;
|
||||
connection master;
|
||||
drop table t2,t3,t5;
|
||||
drop temporary table t4;
|
||||
sync_slave_with_master;
|
||||
|
||||
# End of 4.1 tests
|
||||
|
@ -176,6 +176,7 @@ unlock tables;
|
||||
#clean up
|
||||
connection master;
|
||||
drop table if exists t1,t2,t3,t4;
|
||||
drop temporary table temp_table;
|
||||
sync_slave_with_master;
|
||||
|
||||
--echo End of 4.1 tests
|
||||
|
@ -91,8 +91,8 @@ connection master1;
|
||||
sleep 3;
|
||||
select (@id := id) - id from t2;
|
||||
kill @id;
|
||||
# We don't drop t3 as this is a temporary table
|
||||
drop table t2;
|
||||
drop temporary table t3;
|
||||
connection master;
|
||||
# The get_lock function causes warning for unsafe statement.
|
||||
--disable_warnings
|
||||
|
@ -1,9 +1,3 @@
|
||||
--source include/not_windows_embedded.inc
|
||||
# remove this when
|
||||
# Bug#53947 InnoDB: Assertion failure in thread 4224 in file
|
||||
# .\sync\sync0sync.c line 324
|
||||
# is fixed
|
||||
|
||||
#################### mysql-test\t\identity_func.test ##########################
|
||||
# #
|
||||
# Variable Name: identity #
|
||||
|
@ -1,9 +1,3 @@
|
||||
--source include/not_windows_embedded.inc
|
||||
# remove this when
|
||||
# Bug#53947 InnoDB: Assertion failure in thread 4224 in file
|
||||
# .\sync\sync0sync.c line 324
|
||||
# is fixed
|
||||
|
||||
################# mysql-test\t\innodb_autoinc_lock_mode_func.test ############
|
||||
# #
|
||||
# Variable Name: innodb_autoinc_lock_mode #
|
||||
|
@ -1,9 +1,3 @@
|
||||
--source include/not_windows_embedded.inc
|
||||
# remove this when
|
||||
# Bug#53947 InnoDB: Assertion failure in thread 4224 in file
|
||||
# .\sync\sync0sync.c line 324
|
||||
# is fixed
|
||||
|
||||
################# mysql-test\t\last_insert_id_func.test #######################
|
||||
# #
|
||||
# Variable Name: last_insert_id #
|
||||
|
@ -1,9 +1,3 @@
|
||||
--source include/not_windows_embedded.inc
|
||||
# remove this when
|
||||
# Bug#53947 InnoDB: Assertion failure in thread 4224 in file
|
||||
# .\sync\sync0sync.c line 324
|
||||
# is fixed
|
||||
|
||||
############## mysql-test\t\storage_engine_basic.test ##################
|
||||
# #
|
||||
# #
|
||||
|
@ -1,9 +1,3 @@
|
||||
--source include/not_windows_embedded.inc
|
||||
# remove this when
|
||||
# Bug#53947 InnoDB: Assertion failure in thread 4224 in file
|
||||
# .\sync\sync0sync.c line 324
|
||||
# is fixed
|
||||
|
||||
############# mysql-test\t\tx_isolation_func.test #######################################
|
||||
# #
|
||||
# Variable Name: tx_isolation #
|
||||
|
@ -27,7 +27,7 @@ enable_query_log;
|
||||
--exec $MY_PERROR 1062 2>&1
|
||||
|
||||
# test errors that contain characters to escape in the text.
|
||||
--exec $MY_PERROR 1076 2>&1
|
||||
--exec $MY_PERROR 1408 2>&1
|
||||
--exec $MY_PERROR 1459 2>&1
|
||||
--exec $MY_PERROR 1461 2>&1
|
||||
|
||||
|
@ -87,3 +87,7 @@ ADD_EXECUTABLE(thr_lock thr_lock.c)
|
||||
TARGET_LINK_LIBRARIES(thr_lock mysys)
|
||||
SET_TARGET_PROPERTIES(thr_lock PROPERTIES COMPILE_FLAGS "-DMAIN")
|
||||
|
||||
INSTALL_DEBUG_SYMBOLS(mysys)
|
||||
IF(MSVC)
|
||||
INSTALL_DEBUG_TARGET(mysys DESTINATION ${INSTALL_LIBDIR}/debug)
|
||||
ENDIF()
|
||||
|
@ -467,7 +467,7 @@ process_flags:
|
||||
{
|
||||
register int iarg;
|
||||
size_t length2;
|
||||
char buff[17];
|
||||
char buff[32];
|
||||
|
||||
iarg = va_arg(args, int);
|
||||
if (*fmt == 'd')
|
||||
@ -502,7 +502,7 @@ process_flags:
|
||||
{
|
||||
register long iarg;
|
||||
size_t length2;
|
||||
char buff[17];
|
||||
char buff[32];
|
||||
|
||||
iarg = va_arg(args, long);
|
||||
if (*++fmt == 'd')
|
||||
|
@ -70,10 +70,10 @@
|
||||
Installed
|
||||
</Custom>
|
||||
</InstallExecuteSequence>
|
||||
<InstallUISequence>
|
||||
<InstallUISequence>
|
||||
<!-- App search is what does FindInstallLocation, and it is dependent on FindRelatedProducts -->
|
||||
<AppSearch After="FindRelatedProducts"/>
|
||||
</InstallUISequence>
|
||||
</InstallUISequence>
|
||||
|
||||
<!-- Find previous installation -->
|
||||
<Property Id="INSTALLDIR">
|
||||
@ -83,31 +83,43 @@
|
||||
Name="InstallLocation"
|
||||
Type="raw" />
|
||||
</Property>
|
||||
<Property Id="OLDERVERSION">
|
||||
<RegistrySearch Id="FindOlderVersion"
|
||||
Root="HKLM"
|
||||
Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\[OLDERVERSIONBEINGUPGRADED]"
|
||||
Name="DisplayVersion"
|
||||
Type="raw" />
|
||||
</Property>
|
||||
<Property Id="DATADIR">
|
||||
<?if @Platform@ != "x64" ?>
|
||||
<Property Id="OLDERVERSION">
|
||||
<RegistrySearch Id="FindOlderVersion"
|
||||
Root="HKLM"
|
||||
Win64 = "no"
|
||||
Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\[OLDERVERSIONBEINGUPGRADED]"
|
||||
Name="DisplayVersion"
|
||||
Type="raw" />
|
||||
</Property>
|
||||
<?else ?>
|
||||
<Property Id="OLDERVERSION">
|
||||
<RegistrySearch Id="FindOlderVersion"
|
||||
Root="HKLM"
|
||||
Win64 = "yes"
|
||||
Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\[OLDERVERSIONBEINGUPGRADED]"
|
||||
Name="DisplayVersion"
|
||||
Type="raw" />
|
||||
</Property>
|
||||
<?endif ?>
|
||||
<Property Id="DATADIR">
|
||||
<RegistrySearch Id="FindDataDir"
|
||||
Root="HKLM"
|
||||
Key="SOFTWARE\MySQL AB\[ProductName]"
|
||||
Name="DataLocation"
|
||||
Type="raw" />
|
||||
</Property>
|
||||
<Property Id="INSTALLDIR2">
|
||||
<Property Id="INSTALLDIR2">
|
||||
<RegistrySearch Id="FindInstallLocation2"
|
||||
Root="HKLM"
|
||||
Key="SOFTWARE\MySQL AB\[ProductName]"
|
||||
Name="Location"
|
||||
Type="raw" />
|
||||
</Property>
|
||||
<CustomAction Id="SetInstallDir2" Property="INSTALLDIR" Value="[INSTALLDIR2]" />
|
||||
<InstallUISequence>
|
||||
<Custom Action="SetInstallDir2" After="AppSearch">INSTALLDIR2</Custom>
|
||||
</InstallUISequence>
|
||||
<CustomAction Id="SetInstallDir2" Property="INSTALLDIR" Value="[INSTALLDIR2]" />
|
||||
<InstallUISequence>
|
||||
<Custom Action="SetInstallDir2" After="AppSearch">INSTALLDIR2</Custom>
|
||||
</InstallUISequence>
|
||||
|
||||
|
||||
<!-- UI -->
|
||||
|
@ -858,7 +858,9 @@ fi
|
||||
%files -n mysql-server%{product_suffix} -f release/support-files/plugins.files
|
||||
%defattr(-,root,root)
|
||||
%doc release/support-files/*.cnf
|
||||
%doc %{_datadir}/info/mysql.info*
|
||||
%if 0%{?commercial}
|
||||
%doc %{_datadir}/info/mysql.info*
|
||||
%endif
|
||||
%doc %{src_dir}/Docs/ChangeLog
|
||||
%doc %{src_dir}/Docs/INFO_SRC*
|
||||
%doc release/Docs/INFO_BIN*
|
||||
@ -981,6 +983,9 @@ fi
|
||||
%{_mandir}/man1/mysql_client_test.1*
|
||||
|
||||
%changelog
|
||||
* Tue Nov 05 2013 Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
|
||||
- Removed non gpl file mysql.info from community packages
|
||||
|
||||
* Wed Jul 10 2013 Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
|
||||
- Removed directory /usr/share/mysql/solaris/postinstall-solaris to resolve build
|
||||
error
|
||||
|
@ -478,13 +478,17 @@ void ReplSemiSyncMaster::remove_slave()
|
||||
lock();
|
||||
rpl_semi_sync_master_clients--;
|
||||
|
||||
/* If user has chosen not to wait if no semi-sync slave available
|
||||
and the last semi-sync slave exits, turn off semi-sync on master
|
||||
immediately.
|
||||
*/
|
||||
if (!rpl_semi_sync_master_wait_no_slave &&
|
||||
rpl_semi_sync_master_clients == 0)
|
||||
switch_off();
|
||||
/* Only switch off if semi-sync is enabled and is on */
|
||||
if (getMasterEnabled() && is_on())
|
||||
{
|
||||
/* If user has chosen not to wait if no semi-sync slave available
|
||||
and the last semi-sync slave exits, turn off semi-sync on master
|
||||
immediately.
|
||||
*/
|
||||
if (!rpl_semi_sync_master_wait_no_slave &&
|
||||
rpl_semi_sync_master_clients == 0)
|
||||
switch_off();
|
||||
}
|
||||
unlock();
|
||||
}
|
||||
|
||||
@ -883,10 +887,7 @@ int ReplSemiSyncMaster::updateSyncHeader(unsigned char *packet,
|
||||
* target, do not request replies from the slave.
|
||||
*/
|
||||
if (!getMasterEnabled() || !is_semi_sync_slave())
|
||||
{
|
||||
sync = false;
|
||||
return 0;
|
||||
}
|
||||
|
||||
function_enter(kWho);
|
||||
|
||||
@ -894,15 +895,12 @@ int ReplSemiSyncMaster::updateSyncHeader(unsigned char *packet,
|
||||
|
||||
/* This is the real check inside the mutex. */
|
||||
if (!getMasterEnabled())
|
||||
{
|
||||
sync = false;
|
||||
goto l_end;
|
||||
}
|
||||
goto l_end; // sync= false at this point in time
|
||||
|
||||
if (is_on())
|
||||
{
|
||||
/* semi-sync is ON */
|
||||
sync = false; /* No sync unless a transaction is involved. */
|
||||
/* sync= false; No sync unless a transaction is involved. */
|
||||
|
||||
if (reply_file_name_inited_)
|
||||
{
|
||||
|
@ -31,4 +31,8 @@ IF(WIN32)
|
||||
LINK_LIBRARIES Secur32
|
||||
MODULE_ONLY COMPONENT SharedLibraries)
|
||||
|
||||
#INSTALL_DEBUG_SYMBOLS(auth_win_client)
|
||||
#IF(MSVC)
|
||||
# INSTALL_DEBUG_TARGET(auth_win_client DESTINATION ${INSTALL_LIBDIR}/debug)
|
||||
#ENDIF()
|
||||
ENDIF(WIN32)
|
||||
|
@ -220,7 +220,6 @@ INSTALL_SCRIPT(
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
|
||||
SET(prefix "${CMAKE_INSTALL_PREFIX}")
|
||||
SET(sysconfdir ${prefix})
|
||||
SET(bindir ${prefix}/${INSTALL_BINDIR})
|
||||
|
@ -24,8 +24,7 @@
|
||||
-- Get the hostname, if the hostname has any wildcard character like "_" or "%"
|
||||
-- add escape character in front of wildcard character to convert "_" or "%" to
|
||||
-- a plain character
|
||||
SET @get_hostname= @@hostname;
|
||||
SELECT REPLACE((SELECT REPLACE(@get_hostname,'_','\_')),'%','\%') INTO @current_hostname;
|
||||
SELECT LOWER( REPLACE((SELECT REPLACE(@@hostname,'_','\_')),'%','\%') )INTO @current_hostname;
|
||||
|
||||
|
||||
-- Fill "db" table with default grants for anyone to
|
||||
@ -41,11 +40,11 @@ DROP TABLE tmp_db;
|
||||
-- from local machine if "user" table didn't exist before
|
||||
CREATE TEMPORARY TABLE tmp_user LIKE user;
|
||||
INSERT INTO tmp_user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'','');
|
||||
REPLACE INTO tmp_user SELECT @current_hostname,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'','' FROM dual WHERE LOWER( @current_hostname) != 'localhost';
|
||||
REPLACE INTO tmp_user SELECT @current_hostname,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'','' FROM dual WHERE @current_hostname != 'localhost';
|
||||
REPLACE INTO tmp_user VALUES ('127.0.0.1','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'','');
|
||||
REPLACE INTO tmp_user VALUES ('::1','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'','');
|
||||
INSERT INTO tmp_user (host,user) VALUES ('localhost','');
|
||||
INSERT INTO tmp_user (host,user) SELECT @current_hostname,'' FROM dual WHERE LOWER(@current_hostname ) != 'localhost';
|
||||
INSERT INTO tmp_user (host,user) SELECT @current_hostname,'' FROM dual WHERE @current_hostname != 'localhost';
|
||||
INSERT INTO user SELECT * FROM tmp_user WHERE @had_user_table=0;
|
||||
DROP TABLE tmp_user;
|
||||
|
||||
|
@ -633,6 +633,8 @@ INSERT INTO tmp_proxies_priv VALUES ('localhost', 'root', '', '', TRUE, '', now(
|
||||
INSERT INTO proxies_priv SELECT * FROM tmp_proxies_priv WHERE @had_proxies_priv_table=0;
|
||||
DROP TABLE tmp_proxies_priv;
|
||||
|
||||
# Convering the host name to lower case for existing users
|
||||
UPDATE user SET host=LOWER( host ) WHERE LOWER( host ) <> host;
|
||||
|
||||
# Activate the new, possible modified privilege tables
|
||||
# This should not be needed, but gives us some extra testing that the above
|
||||
|
@ -4201,6 +4201,7 @@ mysql_options(MYSQL *mysql,enum mysql_option option, const void *arg)
|
||||
mysql->options.methods_to_use= option;
|
||||
break;
|
||||
case MYSQL_SET_CLIENT_IP:
|
||||
my_free(mysql->options.client_ip);
|
||||
mysql->options.client_ip= my_strdup(arg, MYF(MY_WME));
|
||||
break;
|
||||
case MYSQL_SECURE_AUTH:
|
||||
|
@ -1345,7 +1345,8 @@ bool ha_partition::is_crashed() const
|
||||
int ha_partition::prepare_new_partition(TABLE *tbl,
|
||||
HA_CREATE_INFO *create_info,
|
||||
handler *file, const char *part_name,
|
||||
partition_element *p_elem)
|
||||
partition_element *p_elem,
|
||||
uint disable_non_uniq_indexes)
|
||||
{
|
||||
int error;
|
||||
DBUG_ENTER("prepare_new_partition");
|
||||
@ -1371,6 +1372,7 @@ int ha_partition::prepare_new_partition(TABLE *tbl,
|
||||
if ((error= file->ha_open(tbl, part_name, m_mode, m_open_test_lock)))
|
||||
goto error_open;
|
||||
DBUG_PRINT("info", ("partition %s opened", part_name));
|
||||
|
||||
/*
|
||||
Note: if you plan to add another call that may return failure,
|
||||
better to do it before external_lock() as cleanup_new_partition()
|
||||
@ -1381,6 +1383,9 @@ int ha_partition::prepare_new_partition(TABLE *tbl,
|
||||
goto error_external_lock;
|
||||
DBUG_PRINT("info", ("partition %s external locked", part_name));
|
||||
|
||||
if (disable_non_uniq_indexes)
|
||||
file->ha_disable_indexes(HA_KEY_SWITCH_NONUNIQ_SAVE);
|
||||
|
||||
DBUG_RETURN(0);
|
||||
error_external_lock:
|
||||
(void) file->ha_close();
|
||||
@ -1658,6 +1663,14 @@ int ha_partition::change_partitions(HA_CREATE_INFO *create_info,
|
||||
on them to prepare them for copy phase and also for later close
|
||||
calls
|
||||
*/
|
||||
|
||||
/*
|
||||
Before creating new partitions check whether indexes are disabled
|
||||
in the partitions.
|
||||
*/
|
||||
|
||||
uint disable_non_uniq_indexes = indexes_are_disabled();
|
||||
|
||||
i= 0;
|
||||
part_count= 0;
|
||||
part_it.rewind();
|
||||
@ -1692,11 +1705,13 @@ int ha_partition::change_partitions(HA_CREATE_INFO *create_info,
|
||||
if ((error= prepare_new_partition(table, create_info,
|
||||
new_file_array[part],
|
||||
(const char *)part_name_buff,
|
||||
sub_elem)))
|
||||
sub_elem,
|
||||
disable_non_uniq_indexes)))
|
||||
{
|
||||
cleanup_new_partition(part_count);
|
||||
DBUG_RETURN(error);
|
||||
}
|
||||
|
||||
m_added_file[part_count++]= new_file_array[part];
|
||||
} while (++j < num_subparts);
|
||||
}
|
||||
@ -1709,11 +1724,13 @@ int ha_partition::change_partitions(HA_CREATE_INFO *create_info,
|
||||
if ((error= prepare_new_partition(table, create_info,
|
||||
new_file_array[i],
|
||||
(const char *)part_name_buff,
|
||||
part_elem)))
|
||||
part_elem,
|
||||
disable_non_uniq_indexes)))
|
||||
{
|
||||
cleanup_new_partition(part_count);
|
||||
DBUG_RETURN(error);
|
||||
}
|
||||
|
||||
m_added_file[part_count++]= new_file_array[i];
|
||||
}
|
||||
}
|
||||
|
@ -269,7 +269,8 @@ private:
|
||||
void cleanup_new_partition(uint part_count);
|
||||
int prepare_new_partition(TABLE *table, HA_CREATE_INFO *create_info,
|
||||
handler *file, const char *part_name,
|
||||
partition_element *p_elem);
|
||||
partition_element *p_elem,
|
||||
uint disable_non_uniq_indexes);
|
||||
/*
|
||||
delete_table, rename_table and create uses very similar logic which
|
||||
is packed into this routine.
|
||||
|
@ -4906,8 +4906,10 @@ bool ha_show_status(THD *thd, handlerton *db_type, enum ha_stat_type stat)
|
||||
"", 0, "DISABLED", 8) ? 1 : 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
result= db_type->show_status &&
|
||||
db_type->show_status(db_type, thd, stat_print, stat) ? 1 : 0;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright (c) 2000, 2011, Oracle and/or its affiliates.
|
||||
Copyright (c) 2000, 2013, Oracle and/or its affiliates.
|
||||
Copyright (c) 2009, 2013, Monty Program Ab.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@ -2888,7 +2888,9 @@ String *Item_func_conv::val_str(String *str)
|
||||
int to_base= (int) args[2]->val_int();
|
||||
int err;
|
||||
|
||||
// Note that abs(INT_MIN) is undefined.
|
||||
if (args[0]->null_value || args[1]->null_value || args[2]->null_value ||
|
||||
from_base == INT_MIN || to_base == INT_MIN ||
|
||||
abs(to_base) > 36 || abs(to_base) < 2 ||
|
||||
abs(from_base) > 36 || abs(from_base) < 2 || !(res->length()))
|
||||
{
|
||||
|
@ -1579,8 +1579,12 @@ void Item_sum_count::clear()
|
||||
|
||||
bool Item_sum_count::add()
|
||||
{
|
||||
if (!args[0]->maybe_null || !args[0]->is_null())
|
||||
count++;
|
||||
for (uint i=0; i<arg_count; i++)
|
||||
{
|
||||
if (args[i]->maybe_null && args[i]->is_null())
|
||||
return 0;
|
||||
}
|
||||
count++;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -5955,9 +5955,7 @@ int Intvar_log_event::do_apply_event(Relay_log_info const *rli)
|
||||
|
||||
switch (type) {
|
||||
case LAST_INSERT_ID_EVENT:
|
||||
thd->stmt_depends_on_first_successful_insert_id_in_prev_stmt= 1;
|
||||
thd->first_successful_insert_id_in_prev_stmt_for_binlog=
|
||||
thd->first_successful_insert_id_in_prev_stmt= val;
|
||||
thd->first_successful_insert_id_in_prev_stmt= val;
|
||||
DBUG_PRINT("info",("last_insert_id_event: %ld", (long) val));
|
||||
break;
|
||||
case INSERT_ID_EVENT:
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2000, 2011, Oracle and/or its affiliates.
|
||||
/* Copyright (c) 2000, 2013, Oracle and/or its affiliates.
|
||||
Copyright (c) 2012, Monty Program Ab
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
|
@ -10340,15 +10340,16 @@ get_quick_keys(PARAM *param,QUICK_RANGE_SELECT *quick,KEY_PART *key,
|
||||
{
|
||||
KEY *table_key=quick->head->key_info+quick->index;
|
||||
flag=EQ_RANGE;
|
||||
if ((table_key->flags & HA_NOSAME) && key->part == table_key->key_parts-1)
|
||||
if ((table_key->flags & HA_NOSAME) &&
|
||||
key_tree->part == table_key->key_parts-1)
|
||||
{
|
||||
if (!(table_key->flags & HA_NULL_PART_KEY) ||
|
||||
!null_part_in_key(key,
|
||||
param->min_key,
|
||||
(uint) (tmp_min_key - param->min_key)))
|
||||
flag|= UNIQUE_RANGE;
|
||||
else
|
||||
flag|= NULL_RANGE;
|
||||
if ((table_key->flags & HA_NULL_PART_KEY) &&
|
||||
null_part_in_key(key,
|
||||
param->min_key,
|
||||
(uint) (tmp_min_key - param->min_key)))
|
||||
flag|= NULL_RANGE;
|
||||
else
|
||||
flag|= UNIQUE_RANGE;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -10378,7 +10379,7 @@ get_quick_keys(PARAM *param,QUICK_RANGE_SELECT *quick,KEY_PART *key,
|
||||
}
|
||||
|
||||
/*
|
||||
Return 1 if there is only one range and this uses the whole primary key
|
||||
Return 1 if there is only one range and this uses the whole unique key
|
||||
*/
|
||||
|
||||
bool QUICK_RANGE_SELECT::unique_key_range()
|
||||
|
@ -216,7 +216,6 @@ uchar *sys_var::global_value_ptr(THD *thd, LEX_STRING *base)
|
||||
|
||||
bool sys_var::check(THD *thd, set_var *var)
|
||||
{
|
||||
do_deprecated_warning(thd);
|
||||
if ((var->value && do_check(thd, var))
|
||||
|| (on_check && on_check(this, thd, var)))
|
||||
{
|
||||
@ -592,6 +591,7 @@ err:
|
||||
|
||||
int set_var::check(THD *thd)
|
||||
{
|
||||
var->do_deprecated_warning(thd);
|
||||
if (var->is_readonly())
|
||||
{
|
||||
my_error(ER_INCORRECT_GLOBAL_LOCAL_VAR, MYF(0), var->name.str, "read only");
|
||||
|
@ -140,6 +140,7 @@ public:
|
||||
return (option.id != -1) && ((flags & PARSE_EARLY) == parse_flags) &&
|
||||
insert_dynamic(array, (uchar*)&option);
|
||||
}
|
||||
void do_deprecated_warning(THD *thd);
|
||||
|
||||
private:
|
||||
virtual bool do_check(THD *thd, set_var *var) = 0;
|
||||
@ -153,7 +154,7 @@ private:
|
||||
virtual void global_save_default(THD *thd, set_var *var) = 0;
|
||||
virtual bool session_update(THD *thd, set_var *var) = 0;
|
||||
virtual bool global_update(THD *thd, set_var *var) = 0;
|
||||
void do_deprecated_warning(THD *thd);
|
||||
|
||||
protected:
|
||||
/**
|
||||
A pointer to a value of the variable for SHOW.
|
||||
|
@ -492,6 +492,7 @@ void lex_start(THD *thd)
|
||||
lex->select_lex.ftfunc_list= &lex->select_lex.ftfunc_list_alloc;
|
||||
lex->select_lex.group_list.empty();
|
||||
lex->select_lex.order_list.empty();
|
||||
lex->select_lex.gorder_list.empty();
|
||||
lex->duplicates= DUP_ERROR;
|
||||
lex->ignore= 0;
|
||||
lex->spname= NULL;
|
||||
|
@ -5106,6 +5106,8 @@ that are reorganised.
|
||||
}
|
||||
else if (alter_info->flags & ALTER_REBUILD_PARTITION)
|
||||
{
|
||||
set_engine_all_partitions(tab_part_info,
|
||||
tab_part_info->default_engine_type);
|
||||
if (set_part_state(alter_info, tab_part_info, PART_CHANGED))
|
||||
{
|
||||
my_error(ER_DROP_PARTITION_NON_EXISTENT, MYF(0), "REBUILD");
|
||||
|
@ -880,7 +880,7 @@ static bool insert_params_with_log(Prepared_statement *stmt, uchar *null_array,
|
||||
if (param->state == Item_param::NO_VALUE)
|
||||
DBUG_RETURN(1);
|
||||
|
||||
if (param->limit_clause_param)
|
||||
if (param->limit_clause_param && param->state != Item_param::INT_VALUE)
|
||||
{
|
||||
param->set_int(param->val_int(), MY_INT64_NUM_DECIMAL_DIGITS);
|
||||
param->item_type= Item::INT_ITEM;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Copyright (c) 2002, 2012, Oracle and/or its affiliates.
|
||||
Copyright (c) 2012, Monty Program Ab
|
||||
/* Copyright (c) 2002, 2013, Oracle and/or its affiliates.
|
||||
Copyright (c) 2012, 2014, SkySQL Ab.
|
||||
|
||||
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
|
||||
@ -1769,9 +1769,13 @@ static Sys_var_charptr Sys_socket(
|
||||
static Sys_var_ulong Sys_thread_concurrency(
|
||||
"thread_concurrency",
|
||||
"Permits the application to give the threads system a hint for "
|
||||
"the desired number of threads that should be run at the same time",
|
||||
"the desired number of threads that should be run at the same time."
|
||||
"This variable has no effect, and is deprecated. "
|
||||
"It will be removed in a future release.",
|
||||
READ_ONLY GLOBAL_VAR(concurrency), CMD_LINE(REQUIRED_ARG),
|
||||
VALID_RANGE(1, 512), DEFAULT(DEFAULT_CONCURRENCY), BLOCK_SIZE(1));
|
||||
VALID_RANGE(1, 512), DEFAULT(DEFAULT_CONCURRENCY), BLOCK_SIZE(1),
|
||||
NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0), ON_UPDATE(0),
|
||||
DEPRECATED(""));
|
||||
|
||||
static Sys_var_ulonglong Sys_thread_stack(
|
||||
"thread_stack", "The stack size for each thread",
|
||||
|
@ -61,6 +61,7 @@ Created 10/16/1994 Heikki Tuuri
|
||||
#include "row0upd.h"
|
||||
#include "trx0rec.h"
|
||||
#include "trx0roll.h" /* trx_is_recv() */
|
||||
#include "trx0undo.h"
|
||||
#include "que0que.h"
|
||||
#include "row0row.h"
|
||||
#include "srv0srv.h"
|
||||
@ -1631,7 +1632,7 @@ btr_cur_upd_lock_and_undo(
|
||||
|
||||
/***********************************************************//**
|
||||
Writes a redo log record of updating a record in-place. */
|
||||
UNIV_INLINE
|
||||
UNIV_INTERN
|
||||
void
|
||||
btr_cur_update_in_place_log(
|
||||
/*========================*/
|
||||
@ -1659,18 +1660,30 @@ btr_cur_update_in_place_log(
|
||||
return;
|
||||
}
|
||||
|
||||
/* The code below assumes index is a clustered index: change index to
|
||||
the clustered index if we are updating a secondary index record (or we
|
||||
could as well skip writing the sys col values to the log in this case
|
||||
because they are not needed for a secondary index record update) */
|
||||
|
||||
index = dict_table_get_first_index(index->table);
|
||||
/* For secondary indexes, we could skip writing the dummy system fields
|
||||
to the redo log but we have to change redo log parsing of
|
||||
MLOG_REC_UPDATE_IN_PLACE/MLOG_COMP_REC_UPDATE_IN_PLACE or we have to add
|
||||
new redo log record. For now, just write dummy sys fields to the redo
|
||||
log if we are updating a secondary index record.
|
||||
*/
|
||||
|
||||
mach_write_to_1(log_ptr, flags);
|
||||
log_ptr++;
|
||||
|
||||
log_ptr = row_upd_write_sys_vals_to_log(index, trx, roll_ptr, log_ptr,
|
||||
mtr);
|
||||
if (dict_index_is_clust(index)) {
|
||||
log_ptr = row_upd_write_sys_vals_to_log(
|
||||
index, trx, roll_ptr, log_ptr, mtr);
|
||||
} else {
|
||||
/* Dummy system fields for a secondary index */
|
||||
/* TRX_ID Position */
|
||||
log_ptr += mach_write_compressed(log_ptr, 0);
|
||||
/* ROLL_PTR */
|
||||
trx_write_roll_ptr(log_ptr, 0);
|
||||
log_ptr += DATA_ROLL_PTR_LEN;
|
||||
/* TRX_ID */
|
||||
log_ptr += mach_ull_write_compressed(log_ptr, 0);
|
||||
}
|
||||
|
||||
mach_write_to_2(log_ptr, page_offset(rec));
|
||||
log_ptr += 2;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 1996, 2013, 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
|
||||
@ -110,7 +110,7 @@ btr_pcur_store_position(
|
||||
page_t* page;
|
||||
ulint offs;
|
||||
|
||||
ut_a(cursor->pos_state == BTR_PCUR_IS_POSITIONED);
|
||||
ut_ad(cursor->pos_state == BTR_PCUR_IS_POSITIONED);
|
||||
ut_ad(cursor->latch_mode != BTR_NO_LATCHES);
|
||||
|
||||
block = btr_pcur_get_block(cursor);
|
||||
@ -124,7 +124,6 @@ btr_pcur_store_position(
|
||||
|
||||
ut_ad(mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_S_FIX)
|
||||
|| mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX));
|
||||
ut_a(cursor->latch_mode != BTR_NO_LATCHES);
|
||||
|
||||
if (UNIV_UNLIKELY(page_get_n_recs(page) == 0)) {
|
||||
/* It must be an empty index tree; NOTE that in this case
|
||||
@ -235,21 +234,12 @@ btr_pcur_restore_position_func(
|
||||
|
||||
ut_ad(mtr);
|
||||
ut_ad(mtr->state == MTR_ACTIVE);
|
||||
ut_ad(cursor->old_stored == BTR_PCUR_OLD_STORED);
|
||||
ut_ad(cursor->pos_state == BTR_PCUR_WAS_POSITIONED
|
||||
|| cursor->pos_state == BTR_PCUR_IS_POSITIONED);
|
||||
|
||||
index = btr_cur_get_index(btr_pcur_get_btr_cur(cursor));
|
||||
|
||||
if (UNIV_UNLIKELY(cursor->old_stored != BTR_PCUR_OLD_STORED)
|
||||
|| UNIV_UNLIKELY(cursor->pos_state != BTR_PCUR_WAS_POSITIONED
|
||||
&& cursor->pos_state != BTR_PCUR_IS_POSITIONED)) {
|
||||
ut_print_buf(stderr, cursor, sizeof(btr_pcur_t));
|
||||
putc('\n', stderr);
|
||||
if (cursor->trx_if_known) {
|
||||
trx_print(stderr, cursor->trx_if_known, 0);
|
||||
}
|
||||
|
||||
ut_error;
|
||||
}
|
||||
|
||||
if (UNIV_UNLIKELY
|
||||
(cursor->rel_pos == BTR_PCUR_AFTER_LAST_IN_TREE
|
||||
|| cursor->rel_pos == BTR_PCUR_BEFORE_FIRST_IN_TREE)) {
|
||||
@ -273,14 +263,14 @@ btr_pcur_restore_position_func(
|
||||
|
||||
if (UNIV_LIKELY(latch_mode == BTR_SEARCH_LEAF)
|
||||
|| UNIV_LIKELY(latch_mode == BTR_MODIFY_LEAF)) {
|
||||
/* Try optimistic restoration */
|
||||
/* Try optimistic restoration. */
|
||||
|
||||
if (UNIV_LIKELY(buf_page_optimistic_get(
|
||||
latch_mode,
|
||||
cursor->block_when_stored,
|
||||
cursor->modify_clock,
|
||||
file, line, mtr))) {
|
||||
if (buf_page_optimistic_get(latch_mode,
|
||||
cursor->block_when_stored,
|
||||
cursor->modify_clock,
|
||||
file, line, mtr)) {
|
||||
cursor->pos_state = BTR_PCUR_IS_POSITIONED;
|
||||
cursor->latch_mode = latch_mode;
|
||||
|
||||
buf_block_dbg_add_level(
|
||||
btr_pcur_get_block(cursor),
|
||||
@ -292,9 +282,6 @@ btr_pcur_restore_position_func(
|
||||
const rec_t* rec;
|
||||
const ulint* offsets1;
|
||||
const ulint* offsets2;
|
||||
#endif /* UNIV_DEBUG */
|
||||
cursor->latch_mode = latch_mode;
|
||||
#ifdef UNIV_DEBUG
|
||||
rec = btr_pcur_get_rec(cursor);
|
||||
|
||||
heap = mem_heap_create(256);
|
||||
@ -312,7 +299,13 @@ btr_pcur_restore_position_func(
|
||||
#endif /* UNIV_DEBUG */
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
/* This is the same record as stored,
|
||||
may need to be adjusted for BTR_PCUR_BEFORE/AFTER,
|
||||
depending on search mode and direction. */
|
||||
if (btr_pcur_is_on_user_rec(cursor)) {
|
||||
cursor->pos_state
|
||||
= BTR_PCUR_IS_POSITIONED_OPTIMISTIC;
|
||||
}
|
||||
return(FALSE);
|
||||
}
|
||||
}
|
||||
@ -414,7 +407,7 @@ btr_pcur_move_to_next_page(
|
||||
buf_block_t* next_block;
|
||||
page_t* next_page;
|
||||
|
||||
ut_a(cursor->pos_state == BTR_PCUR_IS_POSITIONED);
|
||||
ut_ad(cursor->pos_state == BTR_PCUR_IS_POSITIONED);
|
||||
ut_ad(cursor->latch_mode != BTR_NO_LATCHES);
|
||||
ut_ad(btr_pcur_is_after_last_on_page(cursor));
|
||||
|
||||
@ -469,7 +462,6 @@ btr_pcur_move_backward_from_page(
|
||||
ulint latch_mode;
|
||||
ulint latch_mode2;
|
||||
|
||||
ut_a(cursor->pos_state == BTR_PCUR_IS_POSITIONED);
|
||||
ut_ad(cursor->latch_mode != BTR_NO_LATCHES);
|
||||
ut_ad(btr_pcur_is_before_first_on_page(cursor));
|
||||
ut_ad(!btr_pcur_is_before_first_in_tree(cursor, mtr));
|
||||
|
@ -36,6 +36,11 @@ UNIV_INTERN dict_index_t* dict_ind_redundant;
|
||||
/** dummy index for ROW_FORMAT=COMPACT supremum and infimum records */
|
||||
UNIV_INTERN dict_index_t* dict_ind_compact;
|
||||
|
||||
#if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG
|
||||
/** Flag to control insert buffer debugging. */
|
||||
UNIV_INTERN uint ibuf_debug;
|
||||
#endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */
|
||||
|
||||
#ifndef UNIV_HOTBACKUP
|
||||
#include "buf0buf.h"
|
||||
#include "data0type.h"
|
||||
@ -4480,6 +4485,8 @@ dict_update_statistics(
|
||||
dict_index_t* index;
|
||||
ulint sum_of_index_sizes = 0;
|
||||
|
||||
DBUG_EXECUTE_IF("skip_innodb_statistics", return;);
|
||||
|
||||
if (table->ibd_file_missing) {
|
||||
ut_print_timestamp(stderr);
|
||||
fprintf(stderr,
|
||||
@ -4520,6 +4527,12 @@ dict_update_statistics(
|
||||
continue;
|
||||
}
|
||||
|
||||
#if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG
|
||||
if (ibuf_debug && !dict_index_is_clust(index)) {
|
||||
goto fake_statistics;
|
||||
}
|
||||
#endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */
|
||||
|
||||
if (UNIV_LIKELY
|
||||
(srv_force_recovery < SRV_FORCE_NO_IBUF_MERGE
|
||||
|| (srv_force_recovery < SRV_FORCE_NO_LOG_REDO
|
||||
|
@ -3531,7 +3531,7 @@ fil_load_single_table_tablespace(
|
||||
|
||||
if (check_msg) {
|
||||
fprintf(stderr,
|
||||
"InnoDB: Error: %s in file %s",
|
||||
"InnoDB: Error: %s in file %s\n",
|
||||
check_msg, filepath);
|
||||
goto func_exit;
|
||||
}
|
||||
|
@ -53,6 +53,7 @@ this program; if not, write to the Free Software Foundation, Inc.,
|
||||
#include <innodb_priv.h>
|
||||
#include <mysql/psi/psi.h>
|
||||
#include <my_sys.h>
|
||||
#include <my_check_opt.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <io.h>
|
||||
@ -7884,6 +7885,10 @@ ha_innobase::records_in_range(
|
||||
/* There exists possibility of not being able to find requested
|
||||
index due to inconsistency between MySQL and InoDB dictionary info.
|
||||
Necessary message should have been printed in innobase_get_index() */
|
||||
if (prebuilt->table->ibd_file_missing) {
|
||||
n_rows = HA_POS_ERROR;
|
||||
goto func_exit;
|
||||
}
|
||||
if (UNIV_UNLIKELY(!index)) {
|
||||
n_rows = HA_POS_ERROR;
|
||||
goto func_exit;
|
||||
@ -8612,8 +8617,7 @@ int
|
||||
ha_innobase::check(
|
||||
/*===============*/
|
||||
THD* thd, /*!< in: user thread handle */
|
||||
HA_CHECK_OPT* check_opt) /*!< in: check options, currently
|
||||
ignored */
|
||||
HA_CHECK_OPT* check_opt) /*!< in: check options */
|
||||
{
|
||||
dict_index_t* index;
|
||||
ulint n_rows;
|
||||
@ -8670,11 +8674,6 @@ ha_innobase::check(
|
||||
do additional check */
|
||||
prebuilt->table->corrupted = FALSE;
|
||||
|
||||
/* Enlarge the fatal lock wait timeout during CHECK TABLE. */
|
||||
mutex_enter(&kernel_mutex);
|
||||
srv_fatal_semaphore_wait_threshold += SRV_SEMAPHORE_WAIT_EXTENSION;
|
||||
mutex_exit(&kernel_mutex);
|
||||
|
||||
for (index = dict_table_get_first_index(prebuilt->table);
|
||||
index != NULL;
|
||||
index = dict_table_get_next_index(index)) {
|
||||
@ -8687,21 +8686,42 @@ ha_innobase::check(
|
||||
|
||||
/* If this is an index being created, break */
|
||||
if (*index->name == TEMP_INDEX_PREFIX) {
|
||||
break;
|
||||
} else if (!btr_validate_index(index, prebuilt->trx)) {
|
||||
is_ok = FALSE;
|
||||
|
||||
innobase_format_name(
|
||||
index_name, sizeof index_name,
|
||||
prebuilt->index->name, TRUE);
|
||||
|
||||
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
|
||||
ER_NOT_KEYFILE,
|
||||
"InnoDB: The B-tree of"
|
||||
" index %s is corrupted.",
|
||||
index_name);
|
||||
continue;
|
||||
}
|
||||
if (!(check_opt->flags & T_QUICK)) {
|
||||
/* Enlarge the fatal lock wait timeout during
|
||||
CHECK TABLE. */
|
||||
mutex_enter(&kernel_mutex);
|
||||
srv_fatal_semaphore_wait_threshold +=
|
||||
SRV_SEMAPHORE_WAIT_EXTENSION;
|
||||
mutex_exit(&kernel_mutex);
|
||||
|
||||
ibool valid = TRUE;
|
||||
valid = btr_validate_index(index, prebuilt->trx);
|
||||
|
||||
/* Restore the fatal lock wait timeout after
|
||||
CHECK TABLE. */
|
||||
mutex_enter(&kernel_mutex);
|
||||
srv_fatal_semaphore_wait_threshold -=
|
||||
SRV_SEMAPHORE_WAIT_EXTENSION;
|
||||
mutex_exit(&kernel_mutex);
|
||||
|
||||
if (!valid) {
|
||||
is_ok = FALSE;
|
||||
|
||||
innobase_format_name(
|
||||
index_name, sizeof index_name,
|
||||
index->name, TRUE);
|
||||
push_warning_printf(thd,
|
||||
MYSQL_ERROR::WARN_LEVEL_WARN,
|
||||
ER_NOT_KEYFILE,
|
||||
"InnoDB: The B-tree of"
|
||||
" index %s is corrupted.",
|
||||
index_name);
|
||||
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
/* Instead of invoking change_active_index(), set up
|
||||
a dummy template for non-locking reads, disabling
|
||||
@ -8804,21 +8824,17 @@ ha_innobase::check(
|
||||
/* Restore the original isolation level */
|
||||
prebuilt->trx->isolation_level = old_isolation_level;
|
||||
|
||||
/* We validate also the whole adaptive hash index for all tables
|
||||
at every CHECK TABLE */
|
||||
#if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG
|
||||
/* We validate the whole adaptive hash index for all tables
|
||||
at every CHECK TABLE only when QUICK flag is not present. */
|
||||
|
||||
if (!btr_search_validate()) {
|
||||
if (!(check_opt->flags & T_QUICK) && !btr_search_validate()) {
|
||||
push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
|
||||
ER_NOT_KEYFILE,
|
||||
"InnoDB: The adaptive hash index is corrupted.");
|
||||
is_ok = FALSE;
|
||||
}
|
||||
|
||||
/* Restore the fatal lock wait timeout after CHECK TABLE. */
|
||||
mutex_enter(&kernel_mutex);
|
||||
srv_fatal_semaphore_wait_threshold -= SRV_SEMAPHORE_WAIT_EXTENSION;
|
||||
mutex_exit(&kernel_mutex);
|
||||
|
||||
#endif /* defined UNIV_AHI_DEBUG || defined UNIV_DEBUG */
|
||||
prebuilt->trx->op_info = "";
|
||||
if (thd_kill_level(user_thd)) {
|
||||
my_error(ER_QUERY_INTERRUPTED, MYF(0));
|
||||
@ -9672,7 +9688,7 @@ innodb_show_status(
|
||||
const long MAX_STATUS_SIZE = 1048576;
|
||||
ulint trx_list_start = ULINT_UNDEFINED;
|
||||
ulint trx_list_end = ULINT_UNDEFINED;
|
||||
bool res;
|
||||
bool ret_val;
|
||||
|
||||
DBUG_ENTER("innodb_show_status");
|
||||
DBUG_ASSERT(hton == innodb_hton_ptr);
|
||||
@ -9737,13 +9753,13 @@ innodb_show_status(
|
||||
|
||||
mutex_exit(&srv_monitor_file_mutex);
|
||||
|
||||
res= stat_print(thd, innobase_hton_name,
|
||||
(uint) strlen(innobase_hton_name),
|
||||
STRING_WITH_LEN(""), str, flen);
|
||||
ret_val= stat_print(thd, innobase_hton_name,
|
||||
(uint) strlen(innobase_hton_name),
|
||||
STRING_WITH_LEN(""), str, flen);
|
||||
|
||||
my_free(str);
|
||||
|
||||
DBUG_RETURN(res);
|
||||
DBUG_RETURN(ret_val);
|
||||
}
|
||||
|
||||
/************************************************************************//**
|
||||
|
@ -193,11 +193,6 @@ access order rules. */
|
||||
/** Operations that can currently be buffered. */
|
||||
UNIV_INTERN ibuf_use_t ibuf_use = IBUF_USE_ALL;
|
||||
|
||||
#if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG
|
||||
/** Flag to control insert buffer debugging. */
|
||||
UNIV_INTERN uint ibuf_debug;
|
||||
#endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */
|
||||
|
||||
/** The insert buffer control structure */
|
||||
UNIV_INTERN ibuf_t* ibuf = NULL;
|
||||
|
||||
@ -2649,6 +2644,12 @@ ibuf_contract_ext(
|
||||
return(0);
|
||||
}
|
||||
|
||||
#if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG
|
||||
if (ibuf_debug) {
|
||||
return(0);
|
||||
}
|
||||
#endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */
|
||||
|
||||
ibuf_mtr_start(&mtr);
|
||||
|
||||
/* Open a cursor to a randomly chosen leaf of the tree, at a random
|
||||
@ -4016,6 +4017,24 @@ updated_in_place:
|
||||
to btr_cur_update_in_place(). */
|
||||
row_upd_rec_in_place(rec, index, offsets,
|
||||
update, page_zip);
|
||||
|
||||
/* Log the update in place operation. During recovery
|
||||
MLOG_COMP_REC_UPDATE_IN_PLACE/MLOG_REC_UPDATE_IN_PLACE
|
||||
expects trx_id, roll_ptr for secondary indexes. So we
|
||||
just write dummy trx_id(0), roll_ptr(0) */
|
||||
btr_cur_update_in_place_log(BTR_KEEP_SYS_FLAG, rec,
|
||||
index, update,
|
||||
NULL, 0, mtr);
|
||||
DBUG_EXECUTE_IF(
|
||||
"crash_after_log_ibuf_upd_inplace",
|
||||
log_buffer_flush_to_disk();
|
||||
fprintf(stderr,
|
||||
"InnoDB: Wrote log record for ibuf "
|
||||
"update in place operation\n");
|
||||
DBUG_SUICIDE();
|
||||
);
|
||||
|
||||
|
||||
goto updated_in_place;
|
||||
}
|
||||
|
||||
|
@ -636,6 +636,21 @@ btr_cur_set_deleted_flag_for_ibuf(
|
||||
uncompressed */
|
||||
ibool val, /*!< in: value to set */
|
||||
mtr_t* mtr); /*!< in/out: mini-transaction */
|
||||
|
||||
/***********************************************************//**
|
||||
Writes a redo log record of updating a record in-place. */
|
||||
UNIV_INTERN
|
||||
void
|
||||
btr_cur_update_in_place_log(
|
||||
/*========================*/
|
||||
ulint flags, /*!< in: flags */
|
||||
rec_t* rec, /*!< in: record */
|
||||
dict_index_t* index, /*!< in: index where cursor positioned */
|
||||
const upd_t* update, /*!< in: update vector */
|
||||
trx_t* trx, /*!< in: transaction */
|
||||
roll_ptr_t roll_ptr, /*!< in: roll ptr */
|
||||
mtr_t* mtr); /*!< in: mtr */
|
||||
|
||||
/*######################################################################*/
|
||||
|
||||
/** In the pessimistic delete, if the page data size drops below this
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 1996, 2011, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 1996, 2013, 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
|
||||
@ -447,6 +447,27 @@ btr_pcur_move_to_prev_on_page(
|
||||
/*==========================*/
|
||||
btr_pcur_t* cursor);/*!< in/out: persistent cursor */
|
||||
|
||||
/** Position state of persistent B-tree cursor. */
|
||||
enum pcur_pos_t {
|
||||
/** The persistent cursor is not positioned. */
|
||||
BTR_PCUR_NOT_POSITIONED = 0,
|
||||
/** The persistent cursor was previously positioned.
|
||||
TODO: currently, the state can be BTR_PCUR_IS_POSITIONED,
|
||||
though it really should be BTR_PCUR_WAS_POSITIONED,
|
||||
because we have no obligation to commit the cursor with
|
||||
mtr; similarly latch_mode may be out of date. This can
|
||||
lead to problems if btr_pcur is not used the right way;
|
||||
all current code should be ok. */
|
||||
BTR_PCUR_WAS_POSITIONED,
|
||||
/** The persistent cursor is positioned by optimistic get to the same
|
||||
record as it was positioned at. Not used for rel_pos == BTR_PCUR_ON.
|
||||
It may need adjustment depending on previous/current search direction
|
||||
and rel_pos. */
|
||||
BTR_PCUR_IS_POSITIONED_OPTIMISTIC,
|
||||
/** The persistent cursor is positioned by index search.
|
||||
Or optimistic get for rel_pos == BTR_PCUR_ON. */
|
||||
BTR_PCUR_IS_POSITIONED
|
||||
};
|
||||
|
||||
/* The persistent B-tree cursor structure. This is used mainly for SQL
|
||||
selects, updates, and deletes. */
|
||||
@ -480,10 +501,8 @@ struct btr_pcur_struct{
|
||||
ib_uint64_t modify_clock; /*!< the modify clock value of the
|
||||
buffer block when the cursor position
|
||||
was stored */
|
||||
ulint pos_state; /*!< see TODO note below!
|
||||
BTR_PCUR_IS_POSITIONED,
|
||||
BTR_PCUR_WAS_POSITIONED,
|
||||
BTR_PCUR_NOT_POSITIONED */
|
||||
enum pcur_pos_t pos_state; /*!< btr_pcur_store_position() and
|
||||
btr_pcur_restore_position() state. */
|
||||
ulint search_mode; /*!< PAGE_CUR_G, ... */
|
||||
trx_t* trx_if_known; /*!< the transaction, if we know it;
|
||||
otherwise this field is not defined;
|
||||
@ -499,21 +518,6 @@ struct btr_pcur_struct{
|
||||
is not NULL */
|
||||
};
|
||||
|
||||
#define BTR_PCUR_IS_POSITIONED 1997660512 /* TODO: currently, the state
|
||||
can be BTR_PCUR_IS_POSITIONED,
|
||||
though it really should be
|
||||
BTR_PCUR_WAS_POSITIONED,
|
||||
because we have no obligation
|
||||
to commit the cursor with
|
||||
mtr; similarly latch_mode may
|
||||
be out of date. This can
|
||||
lead to problems if btr_pcur
|
||||
is not used the right way;
|
||||
all current code should be
|
||||
ok. */
|
||||
#define BTR_PCUR_WAS_POSITIONED 1187549791
|
||||
#define BTR_PCUR_NOT_POSITIONED 1328997689
|
||||
|
||||
#define BTR_PCUR_OLD_STORED 908467085
|
||||
#define BTR_PCUR_OLD_NOT_STORED 122766467
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 1996, 2011, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 1996, 2013, 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
|
||||
@ -379,7 +379,7 @@ btr_pcur_commit_specify_mtr(
|
||||
btr_pcur_t* pcur, /*!< in: persistent cursor */
|
||||
mtr_t* mtr) /*!< in: mtr to commit */
|
||||
{
|
||||
ut_a(pcur->pos_state == BTR_PCUR_IS_POSITIONED);
|
||||
ut_ad(pcur->pos_state == BTR_PCUR_IS_POSITIONED);
|
||||
|
||||
pcur->latch_mode = BTR_NO_LATCHES;
|
||||
|
||||
|
@ -188,8 +188,6 @@ UNIV_INTERN
|
||||
ibool
|
||||
btr_search_validate(void);
|
||||
/*======================*/
|
||||
#else
|
||||
# define btr_search_validate() TRUE
|
||||
#endif /* defined UNIV_AHI_DEBUG || defined UNIV_DEBUG */
|
||||
|
||||
/** The search info struct in an index */
|
||||
|
@ -63,4 +63,9 @@ typedef enum dict_err_ignore dict_err_ignore_t;
|
||||
#define TEMP_TABLE_PREFIX "#sql"
|
||||
#define TEMP_TABLE_PATH_PREFIX "/" TEMP_TABLE_PREFIX
|
||||
|
||||
#if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG
|
||||
/** Flag to control insert buffer debugging. */
|
||||
extern uint ibuf_debug;
|
||||
#endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */
|
||||
|
||||
#endif
|
||||
|
@ -63,11 +63,6 @@ typedef enum {
|
||||
/** Operations that can currently be buffered. */
|
||||
extern ibuf_use_t ibuf_use;
|
||||
|
||||
#if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG
|
||||
/** Flag to control insert buffer debugging. */
|
||||
extern uint ibuf_debug;
|
||||
#endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */
|
||||
|
||||
/** The insert buffer control structure */
|
||||
extern ibuf_t* ibuf;
|
||||
|
||||
|
@ -809,6 +809,8 @@ struct log_struct{
|
||||
later; this is advanced when a flush
|
||||
operation is completed to all the log
|
||||
groups */
|
||||
volatile ibool is_extending; /*!< this is set to true during extend
|
||||
the log buffer size */
|
||||
ib_uint64_t written_to_some_lsn;
|
||||
/*!< first log sequence number not yet
|
||||
written to any log group; for this to
|
||||
|
@ -213,6 +213,85 @@ log_buf_pool_get_oldest_modification(void)
|
||||
return(lsn);
|
||||
}
|
||||
|
||||
/** Extends the log buffer.
|
||||
@param[in] len requested minimum size in bytes */
|
||||
static
|
||||
void
|
||||
log_buffer_extend(
|
||||
ulint len)
|
||||
{
|
||||
ulint move_start;
|
||||
ulint move_end;
|
||||
byte tmp_buf[OS_FILE_LOG_BLOCK_SIZE];
|
||||
|
||||
mutex_enter(&(log_sys->mutex));
|
||||
|
||||
while (log_sys->is_extending) {
|
||||
/* Another thread is trying to extend already.
|
||||
Needs to wait for. */
|
||||
mutex_exit(&(log_sys->mutex));
|
||||
|
||||
log_buffer_flush_to_disk();
|
||||
|
||||
mutex_enter(&(log_sys->mutex));
|
||||
|
||||
if (srv_log_buffer_size > len / UNIV_PAGE_SIZE) {
|
||||
/* Already extended enough by the others */
|
||||
mutex_exit(&(log_sys->mutex));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
log_sys->is_extending = TRUE;
|
||||
|
||||
while (log_sys->n_pending_writes != 0
|
||||
|| ut_calc_align_down(log_sys->buf_free,
|
||||
OS_FILE_LOG_BLOCK_SIZE)
|
||||
!= ut_calc_align_down(log_sys->buf_next_to_write,
|
||||
OS_FILE_LOG_BLOCK_SIZE)) {
|
||||
/* Buffer might have >1 blocks to write still. */
|
||||
mutex_exit(&(log_sys->mutex));
|
||||
|
||||
log_buffer_flush_to_disk();
|
||||
|
||||
mutex_enter(&(log_sys->mutex));
|
||||
}
|
||||
|
||||
move_start = ut_calc_align_down(
|
||||
log_sys->buf_free,
|
||||
OS_FILE_LOG_BLOCK_SIZE);
|
||||
move_end = log_sys->buf_free;
|
||||
|
||||
/* store the last log block in buffer */
|
||||
ut_memcpy(tmp_buf, log_sys->buf + move_start,
|
||||
move_end - move_start);
|
||||
|
||||
log_sys->buf_free -= move_start;
|
||||
log_sys->buf_next_to_write -= move_start;
|
||||
|
||||
/* reallocate log buffer */
|
||||
srv_log_buffer_size = len / UNIV_PAGE_SIZE + 1;
|
||||
mem_free(log_sys->buf_ptr);
|
||||
log_sys->buf_ptr = mem_alloc(LOG_BUFFER_SIZE + OS_FILE_LOG_BLOCK_SIZE);
|
||||
log_sys->buf = ut_align(log_sys->buf_ptr, OS_FILE_LOG_BLOCK_SIZE);
|
||||
log_sys->buf_size = LOG_BUFFER_SIZE;
|
||||
memset(log_sys->buf, '\0', LOG_BUFFER_SIZE);
|
||||
log_sys->max_buf_free = log_sys->buf_size / LOG_BUF_FLUSH_RATIO
|
||||
- LOG_BUF_FLUSH_MARGIN;
|
||||
|
||||
/* restore the last log block */
|
||||
ut_memcpy(log_sys->buf, tmp_buf, move_end - move_start);
|
||||
|
||||
ut_ad(log_sys->is_extending);
|
||||
log_sys->is_extending = FALSE;
|
||||
|
||||
mutex_exit(&(log_sys->mutex));
|
||||
|
||||
fprintf(stderr,
|
||||
"InnoDB: innodb_log_buffer_size was extended to %lu.\n",
|
||||
LOG_BUFFER_SIZE);
|
||||
}
|
||||
|
||||
/************************************************************//**
|
||||
Opens the log for log_write_low. The log must be closed with log_close and
|
||||
released with log_release.
|
||||
@ -233,11 +312,39 @@ log_reserve_and_open(
|
||||
ulint count = 0;
|
||||
#endif /* UNIV_DEBUG */
|
||||
|
||||
ut_a(len < log->buf_size / 2);
|
||||
if (len >= log->buf_size / 2) {
|
||||
DBUG_EXECUTE_IF("ib_log_buffer_is_short_crash",
|
||||
DBUG_SUICIDE(););
|
||||
|
||||
/* log_buffer is too small. try to extend instead of crash. */
|
||||
ut_print_timestamp(stderr);
|
||||
fprintf(stderr,
|
||||
" InnoDB: Warning: "
|
||||
"The transaction log size is too large"
|
||||
" for innodb_log_buffer_size (%lu >= %lu / 2). "
|
||||
"Trying to extend it.\n",
|
||||
len, LOG_BUFFER_SIZE);
|
||||
|
||||
log_buffer_extend((len + 1) * 2);
|
||||
}
|
||||
loop:
|
||||
mutex_enter(&(log->mutex));
|
||||
ut_ad(!recv_no_log_write);
|
||||
|
||||
if (log->is_extending) {
|
||||
|
||||
mutex_exit(&(log->mutex));
|
||||
|
||||
/* Log buffer size is extending. Writing up to the next block
|
||||
should wait for the extending finished. */
|
||||
|
||||
os_thread_sleep(100000);
|
||||
|
||||
ut_ad(++count < 50);
|
||||
|
||||
goto loop;
|
||||
}
|
||||
|
||||
/* Calculate an upper limit for the space the string may take in the
|
||||
log buffer */
|
||||
|
||||
@ -788,6 +895,7 @@ log_init(void)
|
||||
log_sys->buf = ut_align(log_sys->buf_ptr, OS_FILE_LOG_BLOCK_SIZE);
|
||||
|
||||
log_sys->buf_size = LOG_BUFFER_SIZE;
|
||||
log_sys->is_extending = FALSE;
|
||||
|
||||
memset(log_sys->buf, '\0', LOG_BUFFER_SIZE);
|
||||
|
||||
|
@ -3095,48 +3095,78 @@ sel_restore_position_for_mysql(
|
||||
mtr_t* mtr) /*!< in: mtr; CAUTION: may commit
|
||||
mtr temporarily! */
|
||||
{
|
||||
ibool success;
|
||||
ulint relative_position;
|
||||
|
||||
relative_position = pcur->rel_pos;
|
||||
ibool success;
|
||||
|
||||
success = btr_pcur_restore_position(latch_mode, pcur, mtr);
|
||||
|
||||
*same_user_rec = success;
|
||||
|
||||
if (relative_position == BTR_PCUR_ON) {
|
||||
if (success) {
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
if (moves_up) {
|
||||
btr_pcur_move_to_next(pcur, mtr);
|
||||
}
|
||||
|
||||
return(TRUE);
|
||||
ut_ad(!success || pcur->rel_pos == BTR_PCUR_ON);
|
||||
#ifdef UNIV_DEBUG
|
||||
if (pcur->pos_state == BTR_PCUR_IS_POSITIONED_OPTIMISTIC) {
|
||||
ut_ad(pcur->rel_pos == BTR_PCUR_BEFORE
|
||||
|| pcur->rel_pos == BTR_PCUR_AFTER);
|
||||
} else {
|
||||
ut_ad(pcur->pos_state == BTR_PCUR_IS_POSITIONED);
|
||||
ut_ad((pcur->rel_pos == BTR_PCUR_ON)
|
||||
== btr_pcur_is_on_user_rec(pcur));
|
||||
}
|
||||
#endif
|
||||
|
||||
if (relative_position == BTR_PCUR_AFTER
|
||||
|| relative_position == BTR_PCUR_AFTER_LAST_IN_TREE) {
|
||||
/* The position may need be adjusted for rel_pos and moves_up. */
|
||||
|
||||
if (moves_up) {
|
||||
switch (pcur->rel_pos) {
|
||||
case BTR_PCUR_ON:
|
||||
if (!success && moves_up) {
|
||||
next:
|
||||
btr_pcur_move_to_next(pcur, mtr);
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
if (btr_pcur_is_on_user_rec(pcur)) {
|
||||
return(!success);
|
||||
case BTR_PCUR_AFTER_LAST_IN_TREE:
|
||||
case BTR_PCUR_BEFORE_FIRST_IN_TREE:
|
||||
return(TRUE);
|
||||
case BTR_PCUR_AFTER:
|
||||
/* positioned to record after pcur->old_rec. */
|
||||
pcur->pos_state = BTR_PCUR_IS_POSITIONED;
|
||||
prev:
|
||||
if (btr_pcur_is_on_user_rec(pcur) && !moves_up) {
|
||||
btr_pcur_move_to_prev(pcur, mtr);
|
||||
}
|
||||
|
||||
return(TRUE);
|
||||
case BTR_PCUR_BEFORE:
|
||||
/* For non optimistic restoration:
|
||||
The position is now set to the record before pcur->old_rec.
|
||||
|
||||
For optimistic restoration:
|
||||
The position also needs to take the previous search_mode into
|
||||
consideration. */
|
||||
|
||||
switch (pcur->pos_state) {
|
||||
case BTR_PCUR_IS_POSITIONED_OPTIMISTIC:
|
||||
pcur->pos_state = BTR_PCUR_IS_POSITIONED;
|
||||
if (pcur->search_mode == PAGE_CUR_GE) {
|
||||
/* Positioned during Greater or Equal search
|
||||
with BTR_PCUR_BEFORE. Optimistic restore to
|
||||
the same record. If scanning for lower then
|
||||
we must move to previous record.
|
||||
This can happen with:
|
||||
HANDLER READ idx a = (const);
|
||||
HANDLER READ idx PREV; */
|
||||
goto prev;
|
||||
}
|
||||
return(TRUE);
|
||||
case BTR_PCUR_IS_POSITIONED:
|
||||
if (moves_up && btr_pcur_is_on_user_rec(pcur)) {
|
||||
goto next;
|
||||
}
|
||||
return(TRUE);
|
||||
case BTR_PCUR_WAS_POSITIONED:
|
||||
case BTR_PCUR_NOT_POSITIONED:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
ut_ad(relative_position == BTR_PCUR_BEFORE
|
||||
|| relative_position == BTR_PCUR_BEFORE_FIRST_IN_TREE);
|
||||
|
||||
if (moves_up && btr_pcur_is_on_user_rec(pcur)) {
|
||||
btr_pcur_move_to_next(pcur, mtr);
|
||||
}
|
||||
|
||||
ut_ad(0);
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
@ -4120,6 +4150,14 @@ wrong_offs:
|
||||
|
||||
btr_pcur_store_position(pcur, &mtr);
|
||||
|
||||
/* The found record was not a match, but may be used
|
||||
as NEXT record (index_next). Set the relative position
|
||||
to BTR_PCUR_BEFORE, to reflect that the position of
|
||||
the persistent cursor is before the found/stored row
|
||||
(pcur->old_rec). */
|
||||
ut_ad(pcur->rel_pos == BTR_PCUR_ON);
|
||||
pcur->rel_pos = BTR_PCUR_BEFORE;
|
||||
|
||||
err = DB_RECORD_NOT_FOUND;
|
||||
/* ut_print_name(stderr, index->name);
|
||||
fputs(" record not found 3\n", stderr); */
|
||||
@ -4159,6 +4197,14 @@ wrong_offs:
|
||||
|
||||
btr_pcur_store_position(pcur, &mtr);
|
||||
|
||||
/* The found record was not a match, but may be used
|
||||
as NEXT record (index_next). Set the relative position
|
||||
to BTR_PCUR_BEFORE, to reflect that the position of
|
||||
the persistent cursor is before the found/stored row
|
||||
(pcur->old_rec). */
|
||||
ut_ad(pcur->rel_pos == BTR_PCUR_ON);
|
||||
pcur->rel_pos = BTR_PCUR_BEFORE;
|
||||
|
||||
err = DB_RECORD_NOT_FOUND;
|
||||
/* ut_print_name(stderr, index->name);
|
||||
fputs(" record not found 4\n", stderr); */
|
||||
@ -4736,6 +4782,7 @@ normal_return:
|
||||
if (prebuilt->n_fetch_cached > 0) {
|
||||
row_sel_pop_cached_row_for_mysql(buf, prebuilt);
|
||||
|
||||
DEBUG_SYNC_C("row_search_cached_row");
|
||||
err = DB_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -45,6 +45,7 @@
|
||||
#include "ma_blockrec.h"
|
||||
#include "trnman.h"
|
||||
#include "ma_key_recover.h"
|
||||
#include <my_check_opt.h>
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <my_getopt.h>
|
||||
|
@ -13,6 +13,8 @@
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
#include <my_check_opt.h>
|
||||
|
||||
/* almost every standalone maria program will need it */
|
||||
void _mi_report_crashed(void *file __attribute__((unused)),
|
||||
const char *message __attribute__((unused)),
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include "ma_key_recover.h"
|
||||
#include "ma_recovery_util.h"
|
||||
#include "hash.h"
|
||||
#include <my_check_opt.h>
|
||||
|
||||
struct st_trn_for_recovery /* used only in the REDO phase */
|
||||
{
|
||||
|
@ -19,6 +19,7 @@
|
||||
*/
|
||||
|
||||
#include "ma_fulltext.h"
|
||||
#include <my_check_opt.h>
|
||||
#if defined(MSDOS) || defined(__WIN__)
|
||||
#include <fcntl.h>
|
||||
#else
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include <m_ctype.h>
|
||||
#include <stdarg.h>
|
||||
#include <my_getopt.h>
|
||||
#include <my_check_opt.h>
|
||||
#ifdef HAVE_SYS_MMAN_H
|
||||
#include <sys/mman.h>
|
||||
#endif
|
||||
|
@ -32,3 +32,8 @@ ENDIF()
|
||||
# Avoid dependencies on perschema data defined in mysys
|
||||
ADD_DEFINITIONS(-DDISABLE_MYSQL_THREAD_H)
|
||||
ADD_CONVENIENCE_LIBRARY(strings ${STRINGS_SOURCES})
|
||||
|
||||
INSTALL_DEBUG_SYMBOLS(strings)
|
||||
IF(MSVC)
|
||||
INSTALL_DEBUG_TARGET(strings DESTINATION ${INSTALL_LIBDIR}/debug)
|
||||
ENDIF()
|
||||
|
@ -501,7 +501,7 @@ static size_t my_strnxfrm_win1250ch(CHARSET_INFO * cs __attribute__((unused)),
|
||||
|
||||
do {
|
||||
NEXT_CMP_VALUE(src, p, pass, value, (int)srclen);
|
||||
if (totlen <= len)
|
||||
if (totlen < len)
|
||||
dest[totlen] = value;
|
||||
totlen++;
|
||||
} while (value) ;
|
||||
|
@ -1058,7 +1058,9 @@ echo "=====" >> $STATUS_HISTORY
|
||||
%doc release/Docs/INFO_BIN*
|
||||
%doc release/support-files/my-*.cnf
|
||||
|
||||
%if 0%{?commercial}
|
||||
%doc %attr(644, root, root) %{_infodir}/mysql.info*
|
||||
%endif
|
||||
|
||||
%doc %attr(644, root, man) %{_mandir}/man1/innochecksum.1*
|
||||
%doc %attr(644, root, man) %{_mandir}/man1/my_print_defaults.1*
|
||||
@ -1215,6 +1217,9 @@ echo "=====" >> $STATUS_HISTORY
|
||||
# merging BK trees)
|
||||
##############################################################################
|
||||
%changelog
|
||||
* Wed Oct 30 2013 Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
|
||||
- Removed non gpl file docs/mysql.info from community packages
|
||||
|
||||
* Mon Sep 09 2013 Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
|
||||
- Updated logic to get the correct count of PID files
|
||||
|
||||
|
@ -20,3 +20,8 @@ ADD_DEFINITIONS(${SSL_DEFINES})
|
||||
SET(VIO_SOURCES vio.c viosocket.c viossl.c viosslfactories.c)
|
||||
ADD_CONVENIENCE_LIBRARY(vio ${VIO_SOURCES})
|
||||
TARGET_LINK_LIBRARIES(vio ${LIBSOCKET})
|
||||
|
||||
INSTALL_DEBUG_SYMBOLS(vio)
|
||||
IF(MSVC)
|
||||
INSTALL_DEBUG_TARGET(vio DESTINATION ${INSTALL_LIBDIR}/debug)
|
||||
ENDIF()
|
||||
|
@ -23,3 +23,8 @@ SET(ZLIB_SOURCES adler32.c compress.c crc32.c crc32.h deflate.c deflate.h gzio.
|
||||
ADD_CONVENIENCE_LIBRARY(zlib ${ZLIB_SOURCES})
|
||||
RESTRICT_SYMBOL_EXPORTS(zlib)
|
||||
|
||||
INSTALL_DEBUG_SYMBOLS(zlib)
|
||||
IF(MSVC)
|
||||
INSTALL_DEBUG_TARGET(zlib DESTINATION ${INSTALL_LIBDIR}/debug)
|
||||
ENDIF()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user