Commit 9e78a031 authored by Otto Kekäläinen's avatar Otto Kekäläinen
Browse files

Update upstream source from tag 'upstream/5.5.63'

Update to upstream version '5.5.63'
with Debian dir fc4032dc747eef4e5be3af715bcfbdd82284a3e4
parents 696c5f5d 15f2dedb
...@@ -236,6 +236,7 @@ storage/mroonga/vendor/groonga/src/grnslap ...@@ -236,6 +236,7 @@ storage/mroonga/vendor/groonga/src/grnslap
storage/mroonga/vendor/groonga/src/groonga storage/mroonga/vendor/groonga/src/groonga
storage/mroonga/vendor/groonga/src/groonga-benchmark storage/mroonga/vendor/groonga/src/groonga-benchmark
storage/mroonga/vendor/groonga/src/suggest/groonga-suggest-create-dataset storage/mroonga/vendor/groonga/src/suggest/groonga-suggest-create-dataset
zlib/zconf.h
# macOS garbage # macOS garbage
.DS_Store .DS_Store
......
# Copyright (c) 2006, 2017, Oracle and/or its affiliates. # Copyright (c) 2006, 2017, Oracle and/or its affiliates.
# Copyright (c) 2008, 2017, MariaDB # Copyright (c) 2008, 2018, MariaDB Corporation
# #
# This program is free software; you can redistribute it and/or modify # 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 # it under the terms of the GNU General Public License as published by
...@@ -256,9 +256,15 @@ IF(HAVE_GGDB3) ...@@ -256,9 +256,15 @@ IF(HAVE_GGDB3)
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -ggdb3") SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -ggdb3")
ENDIF() ENDIF()
OPTION(ENABLED_LOCAL_INFILE SET(ENABLED_LOCAL_INFILE "AUTO" CACHE STRING "If we should should enable LOAD DATA LOCAL by default (OFF/ON/AUTO)")
"If we should should enable LOAD DATA LOCAL by default" ${IF_WIN})
MARK_AS_ADVANCED(ENABLED_LOCAL_INFILE) MARK_AS_ADVANCED(ENABLED_LOCAL_INFILE)
IF (ENABLED_LOCAL_INFILE MATCHES "^(0|FALSE)$")
SET(ENABLED_LOCAL_INFILE OFF)
ELSEIF(ENABLED_LOCAL_INFILE MATCHES "^(1|TRUE)$")
SET(ENABLED_LOCAL_INFILE ON)
ELSEIF (NOT ENABLED_LOCAL_INFILE MATCHES "^(ON|OFF|AUTO)$")
MESSAGE(FATAL_ERROR "ENABLED_LOCAL_INFILE must be one of OFF, ON, AUTO")
ENDIF()
OPTION(WITH_FAST_MUTEXES "Compile with fast mutexes" OFF) OPTION(WITH_FAST_MUTEXES "Compile with fast mutexes" OFF)
MARK_AS_ADVANCED(WITH_FAST_MUTEXES) MARK_AS_ADVANCED(WITH_FAST_MUTEXES)
......
commit: a49ec980422e04ce1a37344be09aa6254f16fa2a commit: 2175bfce3e9da8332f10ab0e0286dc93915533a2
date: 2018-07-30 15:32:22 +0300 date: 2019-01-27 18:54:12 +0100
build-date: 2018-07-30 12:57:27 +0000 build-date: 2019-01-27 18:02:26 +0000
short: a49ec98 short: 2175bfc
branch: HEAD branch: HEAD
MySQL source 5.5.61 MySQL source 5.5.63
MYSQL_VERSION_MAJOR=5 MYSQL_VERSION_MAJOR=5
MYSQL_VERSION_MINOR=5 MYSQL_VERSION_MINOR=5
MYSQL_VERSION_PATCH=61 MYSQL_VERSION_PATCH=63
MYSQL_VERSION_EXTRA= MYSQL_VERSION_EXTRA=
# Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2008, 2018, MariaDB Corporation
# #
# This program is free software; you can redistribute it and/or modify # 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 # it under the terms of the GNU General Public License as published by
......
/* /*
Copyright (c) 2000, 2014, Oracle and/or its affiliates. Copyright (c) 2000, 2018, Oracle and/or its affiliates.
Copyright (c) 2009, 2017, MariaDB Copyright (c) 2009, 2018, MariaDB Corporation
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
...@@ -1459,7 +1459,7 @@ static struct my_option my_long_options[] = ...@@ -1459,7 +1459,7 @@ static struct my_option my_long_options[] =
{"batch", 'B', {"batch", 'B',
"Don't use history file. Disable interactive behavior. (Enables --silent.)", "Don't use history file. Disable interactive behavior. (Enables --silent.)",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"binary-as-hex", 'b', "Print binary data as hex", &opt_binhex, &opt_binhex, {"binary-as-hex", 0, "Print binary data as hex", &opt_binhex, &opt_binhex,
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"character-sets-dir", OPT_CHARSETS_DIR, {"character-sets-dir", OPT_CHARSETS_DIR,
"Directory for character set files.", &charsets_dir, "Directory for character set files.", &charsets_dir,
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
Tool used for executing a .test file Tool used for executing a .test file
See the "MySQL Test framework manual" for more information See the "MySQL Test framework manual" for more information
http://dev.mysql.com/doc/mysqltest/en/index.html https://mariadb.com/kb/en/library/mysqltest/
Please keep the test framework tools identical in all versions! Please keep the test framework tools identical in all versions!
...@@ -6045,7 +6045,6 @@ void do_connect(struct st_command *command) ...@@ -6045,7 +6045,6 @@ void do_connect(struct st_command *command)
#endif #endif
if (opt_compress || con_compress) if (opt_compress || con_compress)
mysql_options(con_slot->mysql, MYSQL_OPT_COMPRESS, NullS); mysql_options(con_slot->mysql, MYSQL_OPT_COMPRESS, NullS);
mysql_options(con_slot->mysql, MYSQL_OPT_LOCAL_INFILE, 0);
mysql_options(con_slot->mysql, MYSQL_SET_CHARSET_NAME, mysql_options(con_slot->mysql, MYSQL_SET_CHARSET_NAME,
charset_info->csname); charset_info->csname);
if (opt_charsets_dir) if (opt_charsets_dir)
...@@ -6129,6 +6128,11 @@ void do_connect(struct st_command *command) ...@@ -6129,6 +6128,11 @@ void do_connect(struct st_command *command)
if (con_slot == next_con) if (con_slot == next_con)
next_con++; /* if we used the next_con slot, advance the pointer */ next_con++; /* if we used the next_con slot, advance the pointer */
} }
else // Failed to connect. Free the memory.
{
mysql_close(con_slot->mysql);
con_slot->mysql= NULL;
}
dynstr_free(&ds_connection_name); dynstr_free(&ds_connection_name);
dynstr_free(&ds_host); dynstr_free(&ds_host);
...@@ -6501,8 +6505,6 @@ static inline bool is_escape_char(char c, char in_string) ...@@ -6501,8 +6505,6 @@ static inline bool is_escape_char(char c, char in_string)
SYNOPSIS SYNOPSIS
read_line read_line
buf buffer for the read line
size size of the buffer i.e max size to read
DESCRIPTION DESCRIPTION
This function actually reads several lines and adds them to the This function actually reads several lines and adds them to the
...@@ -6520,10 +6522,15 @@ static inline bool is_escape_char(char c, char in_string) ...@@ -6520,10 +6522,15 @@ static inline bool is_escape_char(char c, char in_string)
*/ */
int read_line(char *buf, int size) static char *read_command_buf= NULL;
static size_t read_command_buflen= 0;
static const size_t max_multibyte_length= 6;
int read_line()
{ {
char c, last_quote=0, last_char= 0; char c, last_quote=0, last_char= 0;
char *p= buf, *buf_end= buf + size - 1; char *p= read_command_buf;
char *buf_end= read_command_buf + read_command_buflen - max_multibyte_length;
int skip_char= 0; int skip_char= 0;
my_bool have_slash= FALSE; my_bool have_slash= FALSE;
...@@ -6531,10 +6538,21 @@ int read_line(char *buf, int size) ...@@ -6531,10 +6538,21 @@ int read_line(char *buf, int size)
R_COMMENT, R_LINE_START} state= R_LINE_START; R_COMMENT, R_LINE_START} state= R_LINE_START;
DBUG_ENTER("read_line"); DBUG_ENTER("read_line");
*p= 0;
start_lineno= cur_file->lineno; start_lineno= cur_file->lineno;
DBUG_PRINT("info", ("Starting to read at lineno: %d", start_lineno)); DBUG_PRINT("info", ("Starting to read at lineno: %d", start_lineno));
for (; p < buf_end ;) while (1)
{
if (p >= buf_end)
{ {
my_ptrdiff_t off= p - read_command_buf;
read_command_buf= (char*)my_realloc(read_command_buf,
read_command_buflen*2, MYF(MY_FAE));
p= read_command_buf + off;
read_command_buflen*= 2;
buf_end= read_command_buf + read_command_buflen - max_multibyte_length;
}
skip_char= 0; skip_char= 0;
c= my_getc(cur_file->file); c= my_getc(cur_file->file);
if (feof(cur_file->file)) if (feof(cur_file->file))
...@@ -6570,7 +6588,7 @@ int read_line(char *buf, int size) ...@@ -6570,7 +6588,7 @@ int read_line(char *buf, int size)
cur_file->lineno++; cur_file->lineno++;
/* Convert cr/lf to lf */ /* Convert cr/lf to lf */
if (p != buf && *(p-1) == '\r') if (p != read_command_buf && *(p-1) == '\r')
p--; p--;
} }
...@@ -6585,9 +6603,9 @@ int read_line(char *buf, int size) ...@@ -6585,9 +6603,9 @@ int read_line(char *buf, int size)
} }
else if ((c == '{' && else if ((c == '{' &&
(!my_strnncoll_simple(charset_info, (const uchar*) "while", 5, (!my_strnncoll_simple(charset_info, (const uchar*) "while", 5,
(uchar*) buf, min(5, p - buf), 0) || (uchar*) read_command_buf, min(5, p - read_command_buf), 0) ||
!my_strnncoll_simple(charset_info, (const uchar*) "if", 2, !my_strnncoll_simple(charset_info, (const uchar*) "if", 2,
(uchar*) buf, min(2, p - buf), 0)))) (uchar*) read_command_buf, min(2, p - read_command_buf), 0))))
{ {
/* Only if and while commands can be terminated by { */ /* Only if and while commands can be terminated by { */
*p++= c; *p++= c;
...@@ -6721,8 +6739,6 @@ int read_line(char *buf, int size) ...@@ -6721,8 +6739,6 @@ int read_line(char *buf, int size)
*p++= c; *p++= c;
} }
} }
die("The input buffer is too small for this query.x\n" \
"check your query or increase MAX_QUERY and recompile");
DBUG_RETURN(0); DBUG_RETURN(0);
} }
...@@ -6867,12 +6883,8 @@ bool is_delimiter(const char* p) ...@@ -6867,12 +6883,8 @@ bool is_delimiter(const char* p)
terminated by new line '\n' regardless how many "delimiter" it contain. terminated by new line '\n' regardless how many "delimiter" it contain.
*/ */
#define MAX_QUERY (256*1024*2) /* 256K -- a test in sp-big is >128K */
static char read_command_buf[MAX_QUERY];
int read_command(struct st_command** command_ptr) int read_command(struct st_command** command_ptr)
{ {
char *p= read_command_buf;
struct st_command* command; struct st_command* command;
DBUG_ENTER("read_command"); DBUG_ENTER("read_command");
...@@ -6888,8 +6900,7 @@ int read_command(struct st_command** command_ptr) ...@@ -6888,8 +6900,7 @@ int read_command(struct st_command** command_ptr)
die("Out of memory"); die("Out of memory");
command->type= Q_UNKNOWN; command->type= Q_UNKNOWN;
read_command_buf[0]= 0; if (read_line())
if (read_line(read_command_buf, sizeof(read_command_buf)))
{ {
check_eol_junk(read_command_buf); check_eol_junk(read_command_buf);
DBUG_RETURN(1); DBUG_RETURN(1);
...@@ -6898,6 +6909,7 @@ int read_command(struct st_command** command_ptr) ...@@ -6898,6 +6909,7 @@ int read_command(struct st_command** command_ptr)
if (opt_result_format_version == 1) if (opt_result_format_version == 1)
convert_to_format_v1(read_command_buf); convert_to_format_v1(read_command_buf);
char *p= read_command_buf;
DBUG_PRINT("info", ("query: '%s'", read_command_buf)); DBUG_PRINT("info", ("query: '%s'", read_command_buf));
if (*p == '#') if (*p == '#')
{ {
...@@ -9025,6 +9037,8 @@ int main(int argc, char **argv) ...@@ -9025,6 +9037,8 @@ int main(int argc, char **argv)
init_win_path_patterns(); init_win_path_patterns();
#endif #endif
read_command_buf= (char*)my_malloc(read_command_buflen= 65536, MYF(MY_FAE));
init_dynamic_string(&ds_res, "", 2048, 2048); init_dynamic_string(&ds_res, "", 2048, 2048);
init_alloc_root(&require_file_root, 1024, 1024); init_alloc_root(&require_file_root, 1024, 1024);
...@@ -9095,7 +9109,6 @@ int main(int argc, char **argv) ...@@ -9095,7 +9109,6 @@ int main(int argc, char **argv)
(void *) &opt_connect_timeout); (void *) &opt_connect_timeout);
if (opt_compress) if (opt_compress)
mysql_options(con->mysql,MYSQL_OPT_COMPRESS,NullS); mysql_options(con->mysql,MYSQL_OPT_COMPRESS,NullS);
mysql_options(con->mysql, MYSQL_OPT_LOCAL_INFILE, 0);
mysql_options(con->mysql, MYSQL_SET_CHARSET_NAME, mysql_options(con->mysql, MYSQL_SET_CHARSET_NAME,
charset_info->csname); charset_info->csname);
if (opt_charsets_dir) if (opt_charsets_dir)
......
...@@ -94,7 +94,6 @@ IF(FEATURE_SET) ...@@ -94,7 +94,6 @@ IF(FEATURE_SET)
ENDFOREACH() ENDFOREACH()
ENDIF() ENDIF()
OPTION(ENABLED_LOCAL_INFILE "" ON)
IF(RPM) IF(RPM)
SET(WITH_SSL system CACHE STRING "") SET(WITH_SSL system CACHE STRING "")
SET(WITH_ZLIB system CACHE STRING "") SET(WITH_ZLIB system CACHE STRING "")
......
...@@ -136,6 +136,10 @@ MACRO(MERGE_STATIC_LIBS TARGET OUTPUT_NAME LIBS_TO_MERGE) ...@@ -136,6 +136,10 @@ MACRO(MERGE_STATIC_LIBS TARGET OUTPUT_NAME LIBS_TO_MERGE)
SET(SOURCE_FILE ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_depends.c) SET(SOURCE_FILE ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_depends.c)
ADD_LIBRARY(${TARGET} STATIC ${SOURCE_FILE}) ADD_LIBRARY(${TARGET} STATIC ${SOURCE_FILE})
SET_TARGET_PROPERTIES(${TARGET} PROPERTIES OUTPUT_NAME ${OUTPUT_NAME}) SET_TARGET_PROPERTIES(${TARGET} PROPERTIES OUTPUT_NAME ${OUTPUT_NAME})
IF(NOT _SKIP_PIC)
SET_TARGET_PROPERTIES(${TARGET} PROPERTIES COMPILE_FLAGS
"${CMAKE_SHARED_LIBRARY_C_FLAGS}")
ENDIF()
SET(OSLIBS) SET(OSLIBS)
FOREACH(LIB ${LIBS_TO_MERGE}) FOREACH(LIB ${LIBS_TO_MERGE})
...@@ -240,11 +244,11 @@ MACRO(MERGE_LIBRARIES) ...@@ -240,11 +244,11 @@ MACRO(MERGE_LIBRARIES)
# check for non-PIC libraries # check for non-PIC libraries
IF(NOT _SKIP_PIC) IF(NOT _SKIP_PIC)
FOREACH(LIB ${LIBS}) FOREACH(LIB ${LIBS})
GET_TARGET_PROPERTY(${LIB} TYPE LIBTYPE) GET_TARGET_PROPERTY(LTYPE ${LIB} TYPE)
IF(LIBTYPE STREQUAL "STATIC_LIBRARY") IF(LTYPE STREQUAL "STATIC_LIBRARY")
GET_TARGET_PROPERTY(LIB COMPILE_FLAGS LIB_COMPILE_FLAGS) GET_TARGET_PROPERTY(LIB_COMPILE_FLAGS ${LIB} COMPILE_FLAGS)
STRING(REPLACE "${CMAKE_SHARED_LIBRARY_C_FLAGS}" STRING(REPLACE "${CMAKE_SHARED_LIBRARY_C_FLAGS}"
"<PIC_FLAG>" LIB_COMPILE_FLAGS ${LIB_COMPILE_FLAG}) "<PIC_FLAG>" LIB_COMPILE_FLAGS "${LIB_COMPILE_FLAGS}")
IF(NOT LIB_COMPILE_FLAGS MATCHES "<PIC_FLAG>") IF(NOT LIB_COMPILE_FLAGS MATCHES "<PIC_FLAG>")
MESSAGE(FATAL_ERROR MESSAGE(FATAL_ERROR
"Attempted to link non-PIC static library ${LIB} to shared library ${TARGET}\n" "Attempted to link non-PIC static library ${LIB} to shared library ${TARGET}\n"
......
...@@ -132,9 +132,8 @@ IF(MSVC) ...@@ -132,9 +132,8 @@ IF(MSVC)
ENDIF() ENDIF()
# Always link with socket library # Always link with socket library
LINK_LIBRARIES(ws2_32) STRING(APPEND CMAKE_C_STANDARD_LIBRARIES " ws2_32.lib")
# ..also for tests STRING(APPEND CMAKE_CXX_STANDARD_LIBRARIES " ws2_32.lib")
SET(CMAKE_REQUIRED_LIBRARIES ws2_32)
# System checks # System checks
SET(SIGNAL_WITH_VIO_CLOSE 1) # Something that runtime team needs SET(SIGNAL_WITH_VIO_CLOSE 1) # Something that runtime team needs
......
# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2009, 2018, Oracle and/or its affiliates.
# Copyright (c) 2011, 2018, MariaDB Corporation
# #
# This program is free software; you can redistribute it and/or modify # 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 # it under the terms of the GNU General Public License as published by
......
...@@ -71,15 +71,24 @@ MACRO (MYSQL_CHECK_SSL) ...@@ -71,15 +71,24 @@ MACRO (MYSQL_CHECK_SSL)
FIND_LIBRARY(CRYPTO_LIBRARY crypto) FIND_LIBRARY(CRYPTO_LIBRARY crypto)
MARK_AS_ADVANCED(CRYPTO_LIBRARY) MARK_AS_ADVANCED(CRYPTO_LIBRARY)
INCLUDE(CheckSymbolExists) INCLUDE(CheckSymbolExists)
INCLUDE(CheckCSourceCompiles)
SET(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR}) SET(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
SET(CMAKE_REQUIRED_LIBRARIES ${OPENSSL_LIBRARIES}) SET(CMAKE_REQUIRED_LIBRARIES ${OPENSSL_LIBRARIES})
CHECK_SYMBOL_EXISTS(SHA512_DIGEST_LENGTH "openssl/sha.h" CHECK_SYMBOL_EXISTS(SHA512_DIGEST_LENGTH "openssl/sha.h"
HAVE_SHA512_DIGEST_LENGTH) HAVE_SHA512_DIGEST_LENGTH)
CHECK_SYMBOL_EXISTS(ERR_remove_thread_state "openssl/err.h" CHECK_SYMBOL_EXISTS(ERR_remove_thread_state "openssl/err.h"
HAVE_ERR_remove_thread_state) HAVE_ERR_remove_thread_state)
CHECK_C_SOURCE_COMPILES("
#include <openssl/dh.h>
int main()
{
DH dh;
return sizeof(dh.version);
}" OLD_OPENSSL_API)
SET(CMAKE_REQUIRED_INCLUDES) SET(CMAKE_REQUIRED_INCLUDES)
SET(CMAKE_REQUIRED_LIBRARIES) SET(CMAKE_REQUIRED_LIBRARIES)
IF(OPENSSL_FOUND AND CRYPTO_LIBRARY AND HAVE_SHA512_DIGEST_LENGTH) IF(OPENSSL_FOUND AND OLD_OPENSSL_API AND
CRYPTO_LIBRARY AND HAVE_SHA512_DIGEST_LENGTH)
SET(SSL_SOURCES "") SET(SSL_SOURCES "")
SET(SSL_LIBRARIES ${OPENSSL_LIBRARIES} ${CRYPTO_LIBRARY}) SET(SSL_LIBRARIES ${OPENSSL_LIBRARIES} ${CRYPTO_LIBRARY})
SET(SSL_INCLUDE_DIRS ${OPENSSL_INCLUDE_DIR}) SET(SSL_INCLUDE_DIRS ${OPENSSL_INCLUDE_DIR})
......
# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2009, 2018, Oracle and/or its affiliates. All rights reserved.
# #
# This program is free software; you can redistribute it and/or modify # 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 # it under the terms of the GNU General Public License as published by
...@@ -14,15 +14,12 @@ ...@@ -14,15 +14,12 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
MACRO (MYSQL_USE_BUNDLED_ZLIB) MACRO (MYSQL_USE_BUNDLED_ZLIB)
SET(ZLIB_LIBRARY zlib) SET(ZLIB_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/zlib ${CMAKE_BINARY_DIR}/zlib)
SET(ZLIB_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/zlib) SET(BUILD_BUNDLED_ZLIB 1)
SET(ZLIB_LIBRARY zlib CACHE INTERNAL "Bundled zlib library")
SET(ZLIB_FOUND TRUE) SET(ZLIB_FOUND TRUE)
SET(WITH_ZLIB "bundled" CACHE STRING "Use bundled zlib") SET(WITH_ZLIB "bundled" CACHE STRING "Use bundled zlib")
ADD_SUBDIRECTORY(zlib) ADD_SUBDIRECTORY(zlib)
GET_TARGET_PROPERTY(src zlib SOURCES)
FOREACH(file ${src})
SET(ZLIB_SOURCES ${ZLIB_SOURCES} ${CMAKE_SOURCE_DIR}/zlib/${file})
ENDFOREACH()
ENDMACRO() ENDMACRO()
# MYSQL_CHECK_ZLIB_WITH_COMPRESS # MYSQL_CHECK_ZLIB_WITH_COMPRESS
...@@ -37,16 +34,6 @@ ENDMACRO() ...@@ -37,16 +34,6 @@ ENDMACRO()
MACRO (MYSQL_CHECK_ZLIB_WITH_COMPRESS) MACRO (MYSQL_CHECK_ZLIB_WITH_COMPRESS)
IF(CMAKE_SYSTEM_NAME STREQUAL "OS400" OR
CMAKE_SYSTEM_NAME STREQUAL "AIX" OR
CMAKE_SYSTEM_NAME STREQUAL "Windows")
# Use bundled zlib on some platforms by default (system one is too
# old or not existent)
IF (NOT WITH_ZLIB)
SET(WITH_ZLIB "bundled" CACHE STRING "By default use bundled zlib on this platform")
ENDIF()
ENDIF()
IF(WITH_ZLIB STREQUAL "bundled") IF(WITH_ZLIB STREQUAL "bundled")
MYSQL_USE_BUNDLED_ZLIB() MYSQL_USE_BUNDLED_ZLIB()
ELSE() ELSE()
......
...@@ -530,7 +530,11 @@ ...@@ -530,7 +530,11 @@
/* /*
MySQL features MySQL features
*/ */
#cmakedefine ENABLED_LOCAL_INFILE 1 #define LOCAL_INFILE_MODE_OFF 0
#define LOCAL_INFILE_MODE_ON 1
#define LOCAL_INFILE_MODE_AUTO 2
#define ENABLED_LOCAL_INFILE LOCAL_INFILE_MODE_@ENABLED_LOCAL_INFILE@
#cmakedefine ENABLED_PROFILING 1 #cmakedefine ENABLED_PROFILING 1
#cmakedefine EXTRA_DEBUG 1 #cmakedefine EXTRA_DEBUG 1
#cmakedefine BACKUP_TEST 1 #cmakedefine BACKUP_TEST 1
......
...@@ -42,16 +42,16 @@ ...@@ -42,16 +42,16 @@
# define MEM_CHECK_ADDRESSABLE(a,len) ((void) 0) # define MEM_CHECK_ADDRESSABLE(a,len) ((void) 0)
# define MEM_CHECK_DEFINED(a,len) ((void) 0) # define MEM_CHECK_DEFINED(a,len) ((void) 0)
#else #else
# define MEM_UNDEFINED(a,len) ((void) 0) # define MEM_UNDEFINED(a,len) ((void) (a), (void) (len))
# define MEM_NOACCESS(a,len) ((void) 0) # define MEM_NOACCESS(a,len) ((void) 0)
# define MEM_CHECK_ADDRESSABLE(a,len) ((void) 0) # define MEM_CHECK_ADDRESSABLE(a,len) ((void) 0)
# define MEM_CHECK_DEFINED(a,len) ((void) 0) # define MEM_CHECK_DEFINED(a,len) ((void) 0)
#endif /* HAVE_VALGRIND */ #endif /* HAVE_VALGRIND */
#ifndef DBUG_OFF #ifndef DBUG_OFF
#define TRASH_FILL(A,B,C) do { MEM_UNDEFINED(A,B); memset(A,C,B); } while(0) #define TRASH_FILL(A,B,C) do { const size_t trash_tmp= (B); MEM_UNDEFINED(A, trash_tmp); memset(A, C, trash_tmp); } while (0)
#else #else
#define TRASH_FILL(A,B,C) do { MEM_UNDEFINED(A,B); } while(0) #define TRASH_FILL(A,B,C) do { MEM_UNDEFINED((A), (B)); } while (0)
#endif #endif
#define TRASH_ALLOC(A,B) do { TRASH_FILL(A,B,0xA5); MEM_UNDEFINED(A,B); } while(0) #define TRASH_ALLOC(A,B) do { TRASH_FILL(A,B,0xA5); MEM_UNDEFINED(A,B); } while(0)
#define TRASH_FREE(A,B) do { TRASH_FILL(A,B,0x8F); MEM_NOACCESS(A,B); } while(0) #define TRASH_FREE(A,B) do { TRASH_FILL(A,B,0x8F); MEM_NOACCESS(A,B); } while(0)
...@@ -274,7 +274,7 @@ typedef struct st_mysql ...@@ -274,7 +274,7 @@ typedef struct st_mysql
/* session-wide random string */ /* session-wide random string */
char scramble[SCRAMBLE_LENGTH+1]; char scramble[SCRAMBLE_LENGTH+1];
my_bool unused1; my_bool auto_local_infile;
void *unused2, *unused3, *unused4, *unused5; void *unused2, *unused3, *unused4, *unused5;
LIST *stmts; /* list of all statements */ LIST *stmts; /* list of all statements */
......
...@@ -341,7 +341,7 @@ typedef struct st_mysql ...@@ -341,7 +341,7 @@ typedef struct st_mysql
my_bool free_me; my_bool free_me;
my_bool reconnect; my_bool reconnect;
char scramble[20 +1]; char scramble[20 +1];
my_bool unused1; my_bool auto_local_infile;
void *unused2, *unused3, *unused4, *unused5; void *unused2, *unused3, *unused4, *unused5;
LIST *stmts; LIST *stmts;
const struct st_mysql_methods *methods; const struct st_mysql_methods *methods;
......
# Copyright (c) 2006, 2011, Oracle and/or its affiliates. # Copyright (c) 2006, 2011, Oracle and/or its affiliates.
# Copyright (c) 2009, 2018, MariaDB Corporation
# #
# This program is free software; you can redistribute it and/or modify # 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 # it under the terms of the GNU General Public License as published by
...@@ -183,4 +184,3 @@ IF(NOT DISABLE_SHARED) ...@@ -183,4 +184,3 @@ IF(NOT DISABLE_SHARED)
ENDIF() ENDIF()
ENDIF() ENDIF()
ENDIF() ENDIF()
# BUG#37656
#
# This test aims at checking whether lower_case_table_names=1 option works
# for database names and table names.
#
# This test checks the following (when lower_case_table_names=1 is set on slave):
# (i) creating a database on upper case on master results in lower case
# database name on slave
# (ii) creating tables with upper case names on master results in lower case
# table names on slave
# (iii) loading data infile into capitalized table name on master replicates to
# lower case table name on slave
# (iv) Propagating changes from upper case table names on into correspondent
# lower case table names on slave works.
# setup: create database and tables
-- echo ******** [ MASTER ] ********
-- let $dbname_upper= BUG_37656
-- let $dbname_lower= `SELECT LOWER('$dbname_upper')`
-- eval CREATE DATABASE $dbname_upper
-- eval use $dbname_upper
# assert: database names are in upper case in master and lower
# case in slave
-- eval show databases like '$dbname_upper'
sync_slave_with_master;
-- echo ******** [ SLAVE ] ********
--eval show databases like '$dbname_lower'
-- connection master
-- echo ******** [ MASTER ] ********
CREATE TABLE T1 (a int);
-- eval CREATE TABLE T2 (b int) ENGINE=$engine
CREATE TABLE T3 (txt TEXT);
# assert: that tables exist on master with upper case names
show tables;
# assert: that tables exist on slave but with lower case names
-- sync_slave_with_master
-- echo ******** [ SLAVE ] ********
-- eval use $dbname_lower
show tables;
# action: lets create t1 for asserting below that t1 does not get changes
# from master (slave configured with --replicate-ignore-db=$dbname_lower.t1)
CREATE TABLE t1 (a INT);
# action: fill data into tables
-- connection master
-- echo ******** [ MASTER ] ********
-- eval use $dbname_upper
INSERT INTO T1 VALUES (1);
INSERT INTO T2 VALUES (1);
if (`SELECT @@session.binlog_format != 'ROW'`)
{
-- eval LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE $dbname_upper.T3
}
if (`SELECT @@session.binlog_format = 'ROW'`)
{
use test;
-- eval INSERT INTO $dbname_upper.T1 VALUES (2)
-- eval INSERT INTO $dbname_upper.T2 VALUES (2)
-- eval LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE $dbname_upper.T3
}
# assert: lower case tables on lower case database on slave
# get updates from upper case tables on upper case
# database on master
-- sync_slave_with_master
-- echo ******** [ SLAVE ] ********
# assert: changes for slave's t1 were filterd out
if (`SELECT count(*) != 0 FROM t1`)
{
-- echo UNEXPECTED DATA on $dbname_lower.t1 as table is filtered by replicate-ignore-table rules
}
-- let $diff_tables=master:$dbname_upper.T2, slave:$dbname_lower.t2
-- source include/diff_tables.inc
-- let $diff_tables=master:$dbname_upper.T3, slave:$dbname_lower.t3
-- source include/diff_tables.inc
# clean up
-- connection master
-- echo ******** [ MASTER ] ********
-- eval DROP DATABASE $dbname_upper
-- sync_slave_with_master
#
# BUG#50653: drop procedure implicitely treats db name in a case sensitive way
#
-- connection master
-- let $dbname= B50653
-- let $procname= b50653_proc
-- eval CREATE DATABASE $dbname
-- eval USE $dbname
-- eval CREATE PROCEDURE $procname() BEGIN SELECT 1; END
if (`SELECT count(*) = 1 FROM mysql.proc WHERE name like '$dbname'`)
{
-- die Procedure not created on MASTER
}
-- sync_slave_with_master
if (`SELECT count(*) = 1 FROM mysql.proc WHERE name like '$dbname'`)
{
-- die Procedure not created on SLAVE
}
-- connection master
-- eval DROP PROCEDURE $procname
if (`SELECT count(*) FROM mysql.proc WHERE name like '$dbname'`)
{
-- die Procedure not dropped on MASTER
}
-- sync_slave_with_master
if (`SELECT count(*) FROM mysql.proc WHERE name like '$dbname'`)
{
-- die Procedure not dropped on SLAVE
}
-- let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1)
if ($last_error)
{
-- die UNEXPECTED SLAVE SQL error: $last_error
}
-- connection master
-- eval DROP DATABASE $dbname
-- sync_slave_with_master
-- source include/rpl_end.inc
...@@ -195,14 +195,10 @@ sub value { ...@@ -195,14 +195,10 @@ sub value {
my ($self, $option_name)= @_; my ($self, $option_name)= @_;
my $option= $self->option($option_name); my $option= $self->option($option_name);
if (! defined($option) and defined $ENV{$option_name}) { if (! defined($option)) {
my $value= $ENV{$option_name}; my $value= $ENV{$option_name};
$option= My::Config::Option->new($option_name, $value); $option= My::Config::Option->new($option_name, $value);
} }
croak "No option named '$option_name' in group '$self->{name}'"
if ! defined($option);
return $option->value(); return $option->value();
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment