Skip to content

Commit

Permalink
Merge tag 'mysql-5.5.35' into MYSQL-288
Browse files Browse the repository at this point in the history
Conflicts:
	VERSION
	scripts/mysql_system_tables_data.sql
	scripts/mysql_system_tables_fix.sql
	sql/sql_load.cc
	sql/sql_parse.cc
	storage/innobase/include/ibuf0ibuf.h
	support-files/mysql.spec.sh
  • Loading branch information
Liang Guo committed Jan 16, 2014
2 parents cc4d3db + 4d83862 commit 14b9be5
Show file tree
Hide file tree
Showing 90 changed files with 896 additions and 294 deletions.
Binary file modified .bzrfileids
Binary file not shown.
82 changes: 80 additions & 2 deletions CMakeLists.txt
Expand Up @@ -177,7 +177,83 @@ ENDIF()
OPTION (WITH_UNIT_TESTS "Compile MySQL with unit tests" ON)
MARK_AS_ADVANCED(CYBOZU BACKUP_TEST WITHOUT_SERVER DISABLE_SHARED)




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")
Expand Down Expand Up @@ -375,7 +451,6 @@ ADD_SUBDIRECTORY(packaging/solaris)
# (see http://public.kitware.com/Bug/view.php?id=11452)
SET(CPACK_MONOLITHIC_INSTALL 1 CACHE INTERNAL "")

INCLUDE(CPack)
IF(UNIX)
INSTALL(FILES Docs/mysql.info DESTINATION ${INSTALL_INFODIR} OPTIONAL COMPONENT Info)
ENDIF()
Expand All @@ -390,6 +465,7 @@ IF(NOT INSTALL_LAYOUT MATCHES "RPM")
)
INSTALL(FILES README-MySQL DESTINATION ${INSTALL_DOCREADMEDIR} COMPONENT Readme RENAME README)
INSTALL(FILES ${CMAKE_BINARY_DIR}/Docs/INFO_SRC ${CMAKE_BINARY_DIR}/Docs/INFO_BIN DESTINATION ${INSTALL_DOCDIR})

IF(UNIX)
INSTALL(FILES Docs/INSTALL-BINARY DESTINATION ${INSTALL_DOCREADMEDIR} COMPONENT Readme)
ENDIF()
Expand All @@ -407,3 +483,5 @@ IF(NOT INSTALL_LAYOUT MATCHES "RPM")
PATTERN "sp-imp-spec.txt" EXCLUDE
)
ENDIF()

INCLUDE(CPack)
2 changes: 1 addition & 1 deletion VERSION
@@ -1,4 +1,4 @@
MYSQL_VERSION_MAJOR=5
MYSQL_VERSION_MINOR=5
MYSQL_VERSION_PATCH=34
MYSQL_VERSION_PATCH=35
MYSQL_VERSION_EXTRA=.t14
7 changes: 5 additions & 2 deletions cmake/os/Linux.cmake
@@ -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
Expand Down Expand Up @@ -33,7 +33,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)
Expand Down
4 changes: 4 additions & 0 deletions configure.cmake
Expand Up @@ -150,6 +150,10 @@ IF(UNIX)

SET(CMAKE_REQUIRED_LIBRARIES
${LIBM} ${LIBNSL} ${LIBBIND} ${LIBCRYPT} ${LIBSOCKET} ${LIBDL} ${CMAKE_THREAD_LIBS_INIT} ${LIBRT})
# 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()

LIST(LENGTH CMAKE_REQUIRED_LIBRARIES required_libs_length)
IF(${required_libs_length} GREATER 0)
Expand Down
5 changes: 5 additions & 0 deletions extra/yassl/CMakeLists.txt
Expand Up @@ -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()


5 changes: 5 additions & 0 deletions extra/yassl/taocrypt/CMakeLists.txt
Expand Up @@ -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()

69 changes: 69 additions & 0 deletions include/my_check_opt.h
@@ -0,0 +1,69 @@
/* 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_REP_ANY (T_REP | T_REP_BY_SORT | T_REP_PARALLEL)

#ifdef __cplusplus
}
#endif
#endif
47 changes: 1 addition & 46 deletions include/myisam.h
Expand Up @@ -33,7 +33,7 @@ extern "C" {
#endif
#include "my_compare.h"
#include <mysql/plugin.h>

#include <my_check_opt.h>
/*
Limit max keys according to HA_MAX_POSSIBLE_KEY
*/
Expand Down Expand Up @@ -311,51 +311,6 @@ extern uint mi_get_pointer_length(ulonglong file_length, uint def);
#define MYISAMCHK_REPAIR 1 /* equivalent to myisamchk -r */
#define MYISAMCHK_VERIFY 2 /* Verify, run repair if failure */

/*
Definitions needed for myisamchk.c
Entries marked as "QQ to be removed" are NOT used to
pass check/repair options to mi_check.c. They are used
internally by myisamchk.c or/and ha_myisam.cc and should NOT
be stored together with other flags. They should be removed
from the following list to make addition of new flags possible.
*/

#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 /* QQ to be removed */
#define T_CHECK_ONLY_CHANGED 32 /* QQ to be removed */
#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) /* QQ to be removed */
#define T_FORCE_CREATE (1L << 11) /* QQ to be removed */
#define T_FORCE_UNIQUENESS (1L << 12)
#define T_INFO (1L << 13)
#define T_MEDIUM (1L << 14)
#define T_QUICK (1L << 15) /* QQ to be removed */
#define T_READONLY (1L << 16) /* QQ to be removed */
#define T_REP (1L << 17)
#define T_REP_BY_SORT (1L << 18) /* QQ to be removed */
#define T_REP_PARALLEL (1L << 19) /* QQ to be removed */
#define T_RETRY_WITHOUT_QUICK (1L << 20)
#define T_SAFE_REPAIR (1L << 21)
#define T_SILENT (1L << 22)
#define T_SORT_INDEX (1L << 23) /* QQ to be removed */
#define T_SORT_RECORDS (1L << 24) /* QQ to be removed */
#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_REP_ANY (T_REP | T_REP_BY_SORT | T_REP_PARALLEL)

/*
Flags used by myisamchk.c or/and ha_myisam.cc that are NOT passed
to mi_check.c follows:
Expand Down
2 changes: 2 additions & 0 deletions libmysql/CMakeLists.txt
Expand Up @@ -168,8 +168,10 @@ ENDIF()
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)
Expand Down
5 changes: 5 additions & 0 deletions libmysql/authentication_win/CMakeLists.txt
Expand Up @@ -31,3 +31,8 @@ TARGET_LINK_LIBRARIES(auth_win_client Secur32)
# In IDE, group headers in a separate folder.

SOURCE_GROUP(Headers REGULAR_EXPRESSION ".*h$")

INSTALL_DEBUG_SYMBOLS(auth_win_client)
IF(MSVC)
INSTALL_DEBUG_TARGET(auth_win_client DESTINATION ${INSTALL_LIBDIR}/debug)
ENDIF()
1 change: 1 addition & 0 deletions mysql-test/collections/default.experimental
Expand Up @@ -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
10 changes: 7 additions & 3 deletions mysql-test/extra/rpl_tests/rpl_drop_create_temp_table.inc
Expand Up @@ -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;
Expand All @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion mysql-test/extra/rpl_tests/rpl_innodb.test
Expand Up @@ -112,7 +112,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
Expand Down
3 changes: 3 additions & 0 deletions mysql-test/extra/rpl_tests/rpl_reset_slave.test
Expand Up @@ -38,6 +38,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*
Expand Down
2 changes: 2 additions & 0 deletions mysql-test/include/mtr_check.sql
Expand Up @@ -72,6 +72,8 @@ BEGIN
mysql.time_zone_transition_type,
mysql.user;

show status like 'slave_open_temp_tables';

END||

--
Expand Down

0 comments on commit 14b9be5

Please sign in to comment.