Skip to content

Commit beded7d

Browse files
committed
Merge branch '10.0' into 10.1
2 parents af71da5 + 2553f14 commit beded7d

File tree

186 files changed

+2825
-963
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

186 files changed

+2825
-963
lines changed

client/mysql.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1106,7 +1106,7 @@ inline int get_command_index(char cmd_char)
11061106
All client-specific commands are in the first part of commands array
11071107
and have a function to implement it.
11081108
*/
1109-
for (uint i= 0; *commands[i].func; i++)
1109+
for (uint i= 0; commands[i].func; i++)
11101110
if (commands[i].cmd_char == cmd_char)
11111111
return i;
11121112
return -1;

client/mysql_upgrade.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -879,6 +879,7 @@ static const char *expected_errors[]=
879879
"ERROR 1060", /* Duplicate column name */
880880
"ERROR 1061", /* Duplicate key name */
881881
"ERROR 1054", /* Unknown column */
882+
"ERROR 1290", /* RR_OPTION_PREVENTS_STATEMENT */
882883
0
883884
};
884885

client/mysqltest.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5101,7 +5101,7 @@ static st_error global_error_names[] =
51015101
#include <my_base.h>
51025102
static st_error handler_error_names[] =
51035103
{
5104-
{ "<No error>", -1U, "" },
5104+
{ "<No error>", UINT_MAX, "" },
51055105
#include <handler_ername.h>
51065106
{ 0, 0, 0 }
51075107
};

cmake/os/Windows.cmake

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,11 @@ IF(MSVC)
9595
STRING(REGEX REPLACE "/STACK:([^ ]+)" "" CMAKE_${type}_LINKER_FLAGS "${CMAKE_${type}_LINKER_FLAGS}")
9696
STRING(REGEX REPLACE "/INCREMENTAL:([^ ]+)" "/INCREMENTAL:NO" CMAKE_${type}_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_${type}_LINKER_FLAGS_RELWITHDEBINFO}")
9797
STRING(REGEX REPLACE "/INCREMENTAL$" "/INCREMENTAL:NO" CMAKE_${type}_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_${type}_LINKER_FLAGS_RELWITHDEBINFO}")
98+
STRING(REGEX REPLACE "/INCREMENTAL:([^ ]+)" "/INCREMENTAL:NO" CMAKE_${type}_LINKER_FLAGS_DEBUG "${CMAKE_${type}_LINKER_FLAGS_DEBUG}")
99+
STRING(REGEX REPLACE "/INCREMENTAL$" "/INCREMENTAL:NO" CMAKE_${type}_LINKER_FLAGS_DEBUG "${CMAKE_${type}_LINKER_FLAGS_DEBUG}")
98100
SET(CMAKE_${type}_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_${type}_LINKER_FLAGS_RELWITHDEBINFO} /OPT:REF /release")
99101
ENDFOREACH()
102+
100103

101104
# Mark 32 bit executables large address aware so they can
102105
# use > 2GB address space
@@ -112,7 +115,7 @@ IF(MSVC)
112115

113116
#TODO: update the code and remove the disabled warnings
114117
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4800 /wd4805 /wd4996")
115-
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4800 /wd4805 /wd4996 /we4099")
118+
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4800 /wd4805 /wd4996 /wd4291 /we4099")
116119

117120
IF(CMAKE_SIZEOF_VOID_P MATCHES 8)
118121
# _WIN64 is defined by the compiler itself.
@@ -180,14 +183,14 @@ CHECK_SYMBOL_REPLACEMENT(S_IROTH _S_IREAD sys/stat.h)
180183
CHECK_SYMBOL_REPLACEMENT(S_IFIFO _S_IFIFO sys/stat.h)
181184
CHECK_SYMBOL_REPLACEMENT(SIGQUIT SIGTERM signal.h)
182185
CHECK_SYMBOL_REPLACEMENT(SIGPIPE SIGINT signal.h)
183-
CHECK_SYMBOL_REPLACEMENT(isnan _isnan float.h)
184-
CHECK_SYMBOL_REPLACEMENT(finite _finite float.h)
186+
CHECK_SYMBOL_REPLACEMENT(isnan _isnan "math.h;float.h")
187+
CHECK_SYMBOL_REPLACEMENT(finite _finite "math;float.h")
185188
CHECK_FUNCTION_REPLACEMENT(popen _popen)
186189
CHECK_FUNCTION_REPLACEMENT(pclose _pclose)
187190
CHECK_FUNCTION_REPLACEMENT(access _access)
188191
CHECK_FUNCTION_REPLACEMENT(strcasecmp _stricmp)
189192
CHECK_FUNCTION_REPLACEMENT(strncasecmp _strnicmp)
190-
CHECK_FUNCTION_REPLACEMENT(snprintf _snprintf)
193+
CHECK_SYMBOL_REPLACEMENT(snprintf _snprintf stdio.h)
191194
CHECK_FUNCTION_REPLACEMENT(strtok_r strtok_s)
192195
CHECK_FUNCTION_REPLACEMENT(strtoll _strtoi64)
193196
CHECK_FUNCTION_REPLACEMENT(strtoull _strtoui64)

cmake/os/WindowsCache.cmake

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ SET(HAVE_IPPROTO_IPV6 CACHE INTERNAL "")
102102
SET(HAVE_IPV6 TRUE CACHE INTERNAL "")
103103
SET(HAVE_IPV6_V6ONLY 1 CACHE INTERNAL "")
104104
SET(HAVE_ISINF CACHE INTERNAL "")
105-
SET(HAVE_ISNAN CACHE INTERNAL "")
106105
SET(HAVE_ISSETUGID CACHE INTERNAL "")
107106
SET(HAVE_GETUID CACHE INTERNAL "")
108107
SET(HAVE_GETEUID CACHE INTERNAL "")
@@ -232,7 +231,6 @@ SET(HAVE_SIZEOF_ULONG FALSE CACHE INTERNAL "")
232231
SET(HAVE_SIZEOF_U_INT32_T FALSE CACHE INTERNAL "")
233232
SET(HAVE_SIZE_OF_SSIZE_T FALSE CACHE INTERNAL "")
234233
SET(HAVE_SLEEP CACHE INTERNAL "")
235-
SET(HAVE_SNPRINTF CACHE INTERNAL "")
236234
SET(HAVE_SOCKADDR_STORAGE_SS_FAMILY 1 CACHE INTERNAL "")
237235
SET(HAVE_SOLARIS_STYLE_GETHOST CACHE INTERNAL "")
238236
SET(STACK_DIRECTION -1 CACHE INTERNAL "")
@@ -326,10 +324,8 @@ SET(WORDS_BIGENDIAN CACHE INTERNAL "")
326324
SET(HAVE__S_IFIFO 1 CACHE INTERNAL "")
327325
SET(HAVE__S_IREAD 1 CACHE INTERNAL "")
328326
SET(HAVE__finite 1 CACHE INTERNAL "")
329-
SET(HAVE__isnan 1 CACHE INTERNAL "")
330327
SET(HAVE__pclose 1 CACHE INTERNAL "")
331328
SET(HAVE__popen 1 CACHE INTERNAL "")
332-
SET(HAVE__snprintf 1 CACHE INTERNAL "")
333329
SET(HAVE__stricmp 1 CACHE INTERNAL "")
334330
SET(HAVE__strnicmp 1 CACHE INTERNAL "")
335331
SET(HAVE__strtoi64 1 CACHE INTERNAL "")

config.h.cmake

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,8 @@
325325
#cmakedefine HAVE_TIMESPEC_TS_SEC 1
326326
#cmakedefine STRUCT_DIRENT_HAS_D_INO 1
327327
#cmakedefine STRUCT_DIRENT_HAS_D_NAMLEN 1
328+
#cmakedefine STRUCT_TIMESPEC_HAS_TV_SEC 1
329+
#cmakedefine STRUCT_TIMESPEC_HAS_TV_NSEC 1
328330
#cmakedefine SPRINTF_RETURNS_INT 1
329331

330332
#define USE_MB 1
@@ -496,6 +498,7 @@
496498

497499
#define SYSTEM_TYPE "@SYSTEM_TYPE@"
498500
#define MACHINE_TYPE "@CMAKE_SYSTEM_PROCESSOR@"
501+
#define DEFAULT_MACHINE "@DEFAULT_MACHINE@"
499502
#cmakedefine HAVE_DTRACE 1
500503

501504
#cmakedefine SIGNAL_WITH_VIO_CLOSE 1
@@ -521,6 +524,10 @@
521524
#cmakedefine strtoll @strtoll@
522525
#cmakedefine strtoull @strtoull@
523526
#cmakedefine vsnprintf @vsnprintf@
527+
#if (_MSC_VER > 1800)
528+
#define tzname _tzname
529+
#define P_tmpdir "C:\\TEMP"
530+
#endif
524531
#if (_MSC_VER > 1310)
525532
# define HAVE_SETENV
526533
#define setenv(a,b,c) _putenv_s(a,b)
@@ -529,7 +536,7 @@
529536

530537
/* We don't want the min/max macros */
531538
#ifdef __WIN__
532-
#define NOMINMAX
539+
#define NOMINMAX 1
533540
#endif
534541

535542
/*

configure.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,6 +1067,9 @@ CHECK_STRUCT_HAS_MEMBER("struct dirent" d_namlen "dirent.h" STRUCT_DIRENT_HAS_D
10671067
SET(SPRINTF_RETURNS_INT 1)
10681068
CHECK_INCLUDE_FILE(ucontext.h HAVE_UCONTEXT_H)
10691069

1070+
CHECK_STRUCT_HAS_MEMBER("struct timespec" tv_sec "time.h" STRUCT_TIMESPEC_HAS_TV_SEC)
1071+
CHECK_STRUCT_HAS_MEMBER("struct timespec" tv_nsec "time.h" STRUCT_TIMESPEC_HAS_TV_NSEC)
1072+
10701073
IF(NOT MSVC)
10711074
CHECK_C_SOURCE_RUNS(
10721075
"

include/decimal.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616
#ifndef _decimal_h
1717
#define _decimal_h
1818

19+
#ifdef __cplusplus
20+
extern "C" {
21+
#endif
22+
1923
typedef enum
2024
{TRUNCATE=0, HALF_EVEN, HALF_UP, CEILING, FLOOR}
2125
decimal_round_mode;
@@ -112,5 +116,9 @@ void max_decimal(int precision, int frac, decimal_t *to);
112116
#define E_DEC_ERROR 31
113117
#define E_DEC_FATAL_ERROR 30
114118

119+
#ifdef __cplusplus
120+
}
121+
#endif
122+
115123
#endif
116124

include/my_pthread.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,12 @@ typedef volatile LONG my_pthread_once_t;
8686
#define MY_PTHREAD_ONCE_INPROGRESS 1
8787
#define MY_PTHREAD_ONCE_DONE 2
8888

89+
#if !STRUCT_TIMESPEC_HAS_TV_SEC || !STRUCT_TIMESPEC_HAS_TV_NSEC
8990
struct timespec {
9091
time_t tv_sec;
9192
long tv_nsec;
9293
};
94+
#endif
9395

9496
int win_pthread_mutex_trylock(pthread_mutex_t *mutex);
9597
int pthread_create(pthread_t *, const pthread_attr_t *, pthread_handler, void *);

libmysql/errmsg.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ const char *client_errors[]=
9090
""
9191
};
9292

93-
const char** get_client_errmsgs()
93+
const char** get_client_errmsgs(void)
9494
{
9595
return client_errors;
9696
}

0 commit comments

Comments
 (0)