Skip to content

Commit

Permalink
Merge branch '10.3-release' into 10.3
Browse files Browse the repository at this point in the history
  • Loading branch information
sanja-byelkin committed May 11, 2020
2 parents 9f5ab66 + 607467b commit 19d4e02
Show file tree
Hide file tree
Showing 17 changed files with 851 additions and 215 deletions.
10 changes: 6 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,6 @@ INCLUDE(mysql_version)
INCLUDE(cpack_source_ignore_files)
INCLUDE(install_layout)
INCLUDE(wsrep)
INCLUDE(cpack_rpm)
INCLUDE(cpack_deb)

# Add macros
INCLUDE(character_sets)
Expand Down Expand Up @@ -374,8 +372,6 @@ MYSQL_CHECK_SSL()
MYSQL_CHECK_READLINE()

SET(MALLOC_LIBRARY "system")
SET(PYTHON_SHEBANG "/usr/bin/env python" CACHE STRING "python shebang")
MARK_AS_ADVANCED(PYTHON_SHEBANG)

CHECK_PCRE()

Expand Down Expand Up @@ -413,6 +409,12 @@ SET (MYSQLD_STATIC_PLUGIN_LIBS "" CACHE INTERNAL "")
INCLUDE(submodules)
INCLUDE(mariadb_connector_c) # this does ADD_SUBDIRECTORY(libmariadb)

INCLUDE(cpack_rpm)
INCLUDE(cpack_deb)

SET(PYTHON_SHEBANG "/usr/bin/env python" CACHE STRING "python shebang")
MARK_AS_ADVANCED(PYTHON_SHEBANG)

# Add storage engines and plugins.
CONFIGURE_PLUGINS()

Expand Down
36 changes: 32 additions & 4 deletions cmake/cpack_rpm.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,16 @@ SET(ignored
"%ignore ${CMAKE_INSTALL_PREFIX}/lib/systemd"
"%ignore ${CMAKE_INSTALL_PREFIX}/lib/systemd/system"
"%ignore ${CMAKE_INSTALL_PREFIX}/lib/tmpfiles.d"
"%ignore ${CMAKE_INSTALL_PREFIX}/lib/sysusers.d"
"%ignore ${CMAKE_INSTALL_PREFIX}/lib64"
"%ignore ${CMAKE_INSTALL_PREFIX}/lib64/pkgconfig"
"%ignore ${CMAKE_INSTALL_PREFIX}/sbin"
"%ignore ${CMAKE_INSTALL_PREFIX}/share"
"%ignore ${CMAKE_INSTALL_PREFIX}/share/aclocal"
"%ignore ${CMAKE_INSTALL_PREFIX}/share/doc"
"%ignore ${CMAKE_INSTALL_PREFIX}/share/man"
"%ignore ${CMAKE_INSTALL_PREFIX}/share/man/man1"
"%ignore ${CMAKE_INSTALL_PREFIX}/share/man/man8"
"%ignore ${CMAKE_INSTALL_PREFIX}/share/man/man1*"
"%ignore ${CMAKE_INSTALL_PREFIX}/share/man/man8*"
"%ignore ${CMAKE_INSTALL_PREFIX}/share/pkgconfig"
Expand Down Expand Up @@ -192,9 +196,10 @@ SET(CPACK_RPM_compat_POST_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/
SET(CPACK_RPM_compat_POST_UNINSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/shared-post.sh)

MACRO(ALTERNATIVE_NAME real alt)
SET(ver "%{version}-%{release}")
IF (${epoch})
SET(ver "${epoch}:${ver}")
IF(${ARGC} GREATER 2)
SET(ver ${ARGV2})
ELSE()
SET(ver "${epoch}%{version}-%{release}")
ENDIF()

SET(p "CPACK_RPM_${real}_PACKAGE_PROVIDES")
Expand All @@ -209,17 +214,40 @@ ALTERNATIVE_NAME("test" "mysql-test")

# Argh! Different distributions call packages differently, to be a drop-in
# replacement we have to fake distribution-specific dependencies
# NOTE, use ALTERNATIVE_NAME when a package has a different name
# in some distribution, it's not for adding new PROVIDES

IF(RPM MATCHES "(rhel|centos)6")
ALTERNATIVE_NAME("client" "mysql")
ELSEIF(RPM MATCHES "fedora" OR RPM MATCHES "(rhel|centos)7")
SET(epoch 1) # this is fedora
SET(epoch 1:) # this is fedora
ALTERNATIVE_NAME("client" "mariadb")
ALTERNATIVE_NAME("client" "mysql")
ALTERNATIVE_NAME("devel" "mariadb-devel")
ALTERNATIVE_NAME("server" "mariadb-server")
ALTERNATIVE_NAME("server" "mysql-compat-server")
ALTERNATIVE_NAME("test" "mariadb-test")
ELSEIF(RPM MATCHES "(rhel|centos)8")
SET(epoch 3:)
ALTERNATIVE_NAME("backup" "mariadb-backup")
ALTERNATIVE_NAME("client" "mariadb")
ALTERNATIVE_NAME("common" "mariadb-common")
ALTERNATIVE_NAME("common" "mariadb-errmsg")
ALTERNATIVE_NAME("server" "mariadb-server")
ALTERNATIVE_NAME("server" "mariadb-server-utils")
ALTERNATIVE_NAME("shared" "mariadb-connector-c" ${MARIADB_CONNECTOR_C_VERSION}-1)
ALTERNATIVE_NAME("shared" "mariadb-connector-c-config" ${MARIADB_CONNECTOR_C_VERSION}-1)
SETA(CPACK_RPM_client_PACKAGE_PROVIDES "mariadb-galera = 3:%{version}-%{release}")
SETA(CPACK_RPM_common_PACKAGE_PROVIDES "mariadb-galera-common = 3:%{version}-%{release}")
SETA(CPACK_RPM_common_PACKAGE_REQUIRES "MariaDB-shared")
ELSEIF(RPM MATCHES "sles")
ALTERNATIVE_NAME("server" "mariadb")
SETA(CPACK_RPM_server_PACKAGE_PROVIDES
"mysql = %{version}-%{release}"
"mariadb_${MAJOR_VERSION}${MINOR_VERSION} = %{version}-%{release}"
"mariadb-${MAJOR_VERSION}${MINOR_VERSION} = %{version}-%{release}"
"mariadb-server = %{version}-%{release}"
)
ENDIF()
IF(RPM MATCHES "fedora31" OR RPM MATCHES "(rhel|centos)8")
SET(PYTHON_SHEBANG "/usr/bin/python3" CACHE STRING "python shebang")
Expand Down
3 changes: 3 additions & 0 deletions cmake/mariadb_connector_c.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,6 @@ ADD_SUBDIRECTORY(libmariadb)
IF(TARGET caching_sha2_password AND CMAKE_C_FLAGS_DEBUG MATCHES "-Werror")
SET_PROPERTY(TARGET caching_sha2_password APPEND_STRING PROPERTY COMPILE_FLAGS -Wno-unused-function)
ENDIF()

GET_DIRECTORY_PROPERTY(MARIADB_CONNECTOR_C_VERSION DIRECTORY libmariadb DEFINITION CPACK_PACKAGE_VERSION)
MESSAGE1(MARIADB_CONNECTOR_C_VERSION "MariaDB Connector/C ${MARIADB_CONNECTOR_C_VERSION}")
2 changes: 1 addition & 1 deletion libmariadb
18 changes: 17 additions & 1 deletion mysql-test/main/mysqltest_tracking_info.result
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
set @save_session_track_system_variables=@@session_track_system_variables;
SELECT @@session.character_set_connection;
@@session.character_set_connection
latin1
Expand Down Expand Up @@ -28,4 +29,19 @@ SET NAMES 'utf8';

# tracking info off once
SET NAMES 'big5';
SET @@session.session_track_system_variables= default;
SET @@session.session_track_system_variables= @save_session_track_system_variables;
#
# MDEV-22504: session tracking return incorrectly long traking data
#
set @save_optimizer_switch=@@optimizer_switch;
SET @@session.session_track_system_variables='optimizer_switch';
set optimizer_switch='index_merge=off,index_merge_union=off,index_merge_sort_union=off,index_merge_intersection=off,index_merge_sort_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=on,mrr_cost_based=on,mrr_sort_keys=on,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=on,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=off';
-- Tracker : SESSION_TRACK_SYSTEM_VARIABLES
-- optimizer_switch
-- index_merge=off,index_merge_union=off,index_merge_sort_union=off,index_merge_intersection=off,index_merge_sort_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=on,mrr_cost_based=on,mrr_sort_keys=on,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=on,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=off,split_materialized=on

Warnings:
Warning 1681 'engine_condition_pushdown=on' is deprecated and will be removed in a future release
set @@optimizer_switch=@save_optimizer_switch;
SET @@session.session_track_system_variables= @save_session_track_system_variables;
# End of 10.2 tests
24 changes: 23 additions & 1 deletion mysql-test/main/mysqltest_tracking_info.test
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
--source include/no_protocol.inc
--source include/not_embedded.inc


set @save_session_track_system_variables=@@session_track_system_variables;

SELECT @@session.character_set_connection;
SET @@session.session_track_system_variables='character_set_connection';

Expand All @@ -22,4 +25,23 @@ SET NAMES 'utf8';
SET NAMES 'big5';
--disable_session_track_info

SET @@session.session_track_system_variables= default;
SET @@session.session_track_system_variables= @save_session_track_system_variables;

--echo #
--echo # MDEV-22504: session tracking return incorrectly long traking data
--echo #

set @save_optimizer_switch=@@optimizer_switch;

SET @@session.session_track_system_variables='optimizer_switch';

--enable_session_track_info
set optimizer_switch='index_merge=off,index_merge_union=off,index_merge_sort_union=off,index_merge_intersection=off,index_merge_sort_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=on,mrr_cost_based=on,mrr_sort_keys=on,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=on,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=off';
--disable_session_track_info

set @@optimizer_switch=@save_optimizer_switch;


SET @@session.session_track_system_variables= @save_session_track_system_variables;

--echo # End of 10.2 tests
5 changes: 3 additions & 2 deletions mysql-test/main/processlist_notembedded.result
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
#
connect con1,localhost,root,,;
connection con1;
SET DEBUG_SYNC= 'before_join_optimize SIGNAL in_sync';
SET DEBUG_SYNC= 'before_join_optimize SIGNAL in_sync WAIT_FOR go';
connection default;
SET DEBUG_SYNC= 'now WAIT_FOR in_sync';
FOUND 1 /sleep \(30\)/ in MDEV-20466.text
FOUND 1 /sleep/ in MDEV-20466.text
SET DEBUG_SYNC= 'now SIGNAL go';
disconnect con1;
SET DEBUG_SYNC = 'RESET';
End of 5.5 tests
11 changes: 8 additions & 3 deletions mysql-test/main/processlist_notembedded.test
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
source include/have_debug.inc;
source include/have_debug_sync.inc;
source include/not_embedded.inc;
source include/count_sessions.inc;

--echo #
--echo # MDEV-20466: SHOW PROCESSLIST truncates query text on \0 bytes
Expand All @@ -10,9 +11,9 @@ connect (con1,localhost,root,,);

connection con1;

let $q= `select CONCAT("SELECT user FROM mysql.user WHERE user ='some", CHAR(0), "' or sleep (30)")`;
let $q= `select CONCAT("SELECT user FROM mysql.user WHERE user ='some", CHAR(0), "sleep'")`;

SET DEBUG_SYNC= 'before_join_optimize SIGNAL in_sync';
SET DEBUG_SYNC= 'before_join_optimize SIGNAL in_sync WAIT_FOR go';
--disable_query_log
--send_eval $q;
--enable_query_log
Expand All @@ -23,12 +24,16 @@ SET DEBUG_SYNC= 'now WAIT_FOR in_sync';
exec $MYSQL test -e "SHOW PROCESSLIST" > $MYSQLTEST_VARDIR/tmp/MDEV-20466.text;

let SEARCH_FILE=$MYSQLTEST_VARDIR/tmp/MDEV-20466.text;
let SEARCH_PATTERN=sleep \(30\);
let SEARCH_PATTERN=sleep;
source include/search_pattern_in_file.inc;
remove_file $MYSQLTEST_VARDIR/tmp/MDEV-20466.text;

SET DEBUG_SYNC= 'now SIGNAL go';

disconnect con1;

SET DEBUG_SYNC = 'RESET';

source include/wait_until_count_sessions.inc;

--echo End of 5.5 tests
Loading

0 comments on commit 19d4e02

Please sign in to comment.