Skip to content

Commit 3415228

Browse files
committed
Merge branch '10.3' of https://github.com/mariadb/server into 10.3
2 parents 5276073 + 2e43c45 commit 3415228

File tree

112 files changed

+1430
-1710
lines changed

Some content is hidden

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

112 files changed

+1430
-1710
lines changed

BUILD/SETUP.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,3 +308,5 @@ gprof_compile_flags="-O2 -pg -g"
308308
gprof_link_flags="--disable-shared $static_link"
309309

310310
disable_gprof_plugins="--with-zlib-dir=bundled --without-plugin-oqgraph --without-plugin-mroonga"
311+
312+
disable_asan_plugins="--without-plugin-rocksdb"

BUILD/compile-pentium64-asan-max

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ path=`dirname $0`
1818
. "$path/SETUP.sh"
1919

2020
extra_flags="$pentium64_cflags $debug_cflags -lasan -O -g -fsanitize=address"
21-
extra_configs="$pentium_configs $debug_configs $valgrind_configs $max_configs"
21+
extra_configs="$pentium_configs $debug_configs $valgrind_configs $max_configs $disable_asan_plugins"
2222
export LDFLAGS="-ldl"
2323

2424
. "$path/FINISH.sh"

cmake/build_configurations/mysql_release.cmake

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ IF(FEATURE_SET)
6262
SET(WITH_NONE ON)
6363
ENDIF()
6464

65-
IF(num GREATER FEATURE_SET_xsmall)
65+
IF(num GREATER FEATURE_SET_xsmall AND NOT WIN32)
6666
SET(WITH_EMBEDDED_SERVER ON CACHE BOOL "")
6767
ENDIF()
6868
IF(num GREATER FEATURE_SET_small)
@@ -88,7 +88,9 @@ ENDIF()
8888
OPTION(ENABLED_LOCAL_INFILE "" ON)
8989
SET(WITH_INNODB_SNAPPY OFF CACHE STRING "")
9090
IF(WIN32)
91-
SET(WITH_LIBARCHIVE STATIC CACHE STRING "")
91+
SET(INSTALL_MYSQLTESTDIR "" CACHE STRING "")
92+
SET(INSTALL_SQLBENCHDIR "" CACHE STRING "")
93+
SET(INSTALL_SUPPORTFILESDIR "" CACHE STRING "")
9294
ELSEIF(RPM)
9395
SET(WITH_SSL system CACHE STRING "")
9496
SET(WITH_ZLIB system CACHE STRING "")

cmake/os/Windows.cmake

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,10 @@ IF(MSVC)
8686
# Enable debug info also in Release build,
8787
# and create PDB to be able to analyze crashes.
8888
FOREACH(type EXE SHARED MODULE)
89-
SET(CMAKE_{type}_LINKER_FLAGS_RELEASE
89+
SET(CMAKE_${type}_LINKER_FLAGS_RELEASE
9090
"${CMAKE_${type}_LINKER_FLAGS_RELEASE} /debug")
91+
SET(CMAKE_${type}_LINKER_FLAGS_MINSIZEREL
92+
"${CMAKE_${type}_LINKER_FLAGS_MINSIZEREL} /debug")
9193
ENDFOREACH()
9294

9395
# Force static runtime libraries
@@ -108,10 +110,15 @@ IF(MSVC)
108110
CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_RELWITHDEBINFO
109111
CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_DEBUG_INIT
110112
CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_RELWITHDEBINFO
111-
CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_DEBUG_INIT)
113+
CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_DEBUG_INIT
114+
CMAKE_C_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_MINSIZEREL
115+
)
112116
STRING(REGEX REPLACE "/M[TD][d]?" "${MSVC_CRT_TYPE}" "${flag}" "${${flag}}" )
113117
STRING(REGEX REPLACE "/D[ ]?_DEBUG" "" "${flag}" "${${flag}}")
114118
STRING(REPLACE "/Zi" "/Z7" "${flag}" "${${flag}}")
119+
IF(NOT "${${flag}}" MATCHES "/Z7")
120+
STRING(APPEND ${flag} " /Z7")
121+
ENDIF()
115122
ENDFOREACH()
116123

117124

@@ -139,9 +146,12 @@ IF(MSVC)
139146
ENDIF()
140147

141148
#TODO: update the code and remove the disabled warnings
142-
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4800 /wd4805 /wd4996 /we4700 /we4311 /we4477 /we4302 /we4090 /wd4267 ")
143-
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4800 /wd4805 /wd4996 /wd4291 /wd4577 /we4099 /we4700 /we4311 /we4477 /we4302 /we4090 /wd4267")
144-
149+
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4805 /wd4996 /we4700 /we4311 /we4477 /we4302 /we4090")
150+
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4805 /wd4291 /wd4996 /we4099 /we4700 /we4311 /we4477 /we4302 /we4090")
151+
IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
152+
# Temporarily disable size_t warnings, due to their amount
153+
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4267")
154+
ENDIF()
145155
IF(MYSQL_MAINTAINER_MODE MATCHES "ERR")
146156
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX")
147157
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX")

include/my_valgrind.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
# define MEM_CHECK_DEFINED(a,len) ((void) 0)
3333
#endif /* HAVE_VALGRIND_MEMCHECK_H */
3434

35-
#ifndef DBUG_OFF
35+
#if !defined(DBUG_OFF) || defined(TRASH_FREED_MEMORY)
3636
#define TRASH_FILL(A,B,C) do { const size_t trash_tmp= (B); memset(A, C, trash_tmp); MEM_UNDEFINED(A, trash_tmp); } while (0)
3737
#else
3838
#define TRASH_FILL(A,B,C) do{ const size_t trash_tmp __attribute__((unused)) = (B) ; MEM_CHECK_ADDRESSABLE(A,trash_tmp);MEM_UNDEFINED(A,trash_tmp);} while (0)

libmariadb

mysql-test/include/have_semisync_plugin.inc

Lines changed: 0 additions & 15 deletions
This file was deleted.

mysql-test/lib/My/SafeProcess/CMakeLists.txt

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,16 @@
1313
# along with this program; if not, write to the Free Software
1414
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
1515

16-
IF (NOT INSTALL_MYSQLTESTDIR)
16+
17+
IF (WIN32)
18+
ADD_EXECUTABLE(my_safe_process safe_process_win.cc)
19+
ADD_EXECUTABLE(my_safe_kill safe_kill_win.cc)
20+
TARGET_LINK_LIBRARIES(my_safe_kill dbghelp psapi)
21+
ELSE()
22+
ADD_EXECUTABLE(my_safe_process safe_process.cc)
23+
ENDIF()
24+
25+
IF(NOT INSTALL_MYSQLTESTDIR)
1726
RETURN()
1827
ENDIF()
1928

@@ -22,14 +31,9 @@ SET(INSTALL_ARGS
2231
COMPONENT Test
2332
)
2433

34+
INSTALL(TARGETS my_safe_process ${INSTALL_ARGS})
2535
IF (WIN32)
26-
MYSQL_ADD_EXECUTABLE(my_safe_process safe_process_win.cc ${INSTALL_ARGS})
27-
MYSQL_ADD_EXECUTABLE(my_safe_kill safe_kill_win.cc ${INSTALL_ARGS})
28-
TARGET_LINK_LIBRARIES(my_safe_kill dbghelp psapi)
29-
ELSE()
30-
MYSQL_ADD_EXECUTABLE(my_safe_process safe_process.cc ${INSTALL_ARGS})
36+
INSTALL(TARGETS my_safe_kill ${INSTALL_ARGS})
3137
ENDIF()
3238

33-
INSTALL(FILES Base.pm
34-
DESTINATION "${INSTALL_MYSQLTESTDIR}/lib/My/SafeProcess" COMPONENT Test
35-
)
39+
INSTALL(FILES Base.pm ${INSTALL_ARGS})

mysql-test/r/sp.result

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8186,6 +8186,34 @@ END
81868186
CALL p1();
81878187
DROP PROCEDURE p1;
81888188
#
8189+
# MDEV-15057 Crash when using an unknown identifier as an SP parameter
8190+
#
8191+
CREATE OR REPLACE PROCEDURE p1 (a VARCHAR(10)) SELECT 1;
8192+
CALL p1(a);
8193+
ERROR 42S22: Unknown column 'a' in 'field list'
8194+
drop procedure p1;
8195+
CREATE OR REPLACE PROCEDURE p1 (a VARCHAR(10)) SELECT a|
8196+
CREATE OR REPLACE PROCEDURE p2 ()
8197+
BEGIN
8198+
DECLARE name VARCHAR(10);
8199+
SET name="hello";
8200+
call p1(name);
8201+
END|
8202+
CREATE OR REPLACE PROCEDURE p3 ()
8203+
BEGIN
8204+
DECLARE name VARCHAR(10);
8205+
SET name="hello";
8206+
call p1(name2);
8207+
END|
8208+
call p2();
8209+
a
8210+
hello
8211+
call p3();
8212+
ERROR 42S22: Unknown column 'name2' in 'field list'
8213+
drop procedure p1;
8214+
drop procedure p2;
8215+
drop procedure p3;
8216+
#
81898217
# Start of 10.3 tests
81908218
#
81918219
#

mysql-test/std_data/mdev11084.frm

589 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)