Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/10.2' into bb-10.2-ext
Browse files Browse the repository at this point in the history
Conflicts:
	cmake/make_dist.cmake.in
	mysql-test/r/func_json.result
	mysql-test/r/ps.result
	mysql-test/t/func_json.test
	mysql-test/t/ps.test
	sql/item_cmpfunc.h
  • Loading branch information
montywi committed Jan 1, 2018
2 parents afbb72b + aed2050 commit fbab79c
Show file tree
Hide file tree
Showing 161 changed files with 4,322 additions and 636 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ storage/myisam/sp_test
storage/rocksdb/ldb
storage/rocksdb/mysql_ldb
storage/rocksdb/sst_dump
storage/rocksdb/rdb_source_revision.h
storage/tokudb/PerconaFT/buildheader/db.h
storage/tokudb/PerconaFT/buildheader/make_tdb
storage/tokudb/PerconaFT/buildheader/runcat.sh
Expand Down
17 changes: 17 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: 10.2-{build}
before_build:
- md %APPVEYOR_BUILD_FOLDER%\win_build
- cd %APPVEYOR_BUILD_FOLDER%\win_build
- cmake .. -G "Visual Studio 15 2017" -DBISON_EXECUTABLE=C:\cygwin\bin\bison
- dir
build:
project: win_build\MySQL.sln
parallel: true
verbosity: minimal
configuration:
- Debug
test:
test_script:
- cd %APPVEYOR_BUILD_FOLDER%\win_build\mysql-test
- perl mysql-test-run.pl --force --max-test-fail=20 --parallel=6 --testcase-timeout=4 --skip-test-list=unstable-tests --suite=main,innodb,plugins,mariabackup
image: Visual Studio 2017
8 changes: 6 additions & 2 deletions client/mysql.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1797,8 +1797,12 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
break;
case OPT_MYSQL_PROTOCOL:
#ifndef EMBEDDED_LIBRARY
opt_protocol= find_type_or_exit(argument, &sql_protocol_typelib,
opt->name);
if ((opt_protocol= find_type_with_warning(argument, &sql_protocol_typelib,
opt->name)) <= 0)
{
sf_leaking_memory= 1; /* no memory leak reports here */
exit(1);
}
#endif
break;
case OPT_SERVER_ARG:
Expand Down
8 changes: 6 additions & 2 deletions client/mysqladmin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,12 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
#endif
break;
case OPT_MYSQL_PROTOCOL:
opt_protocol= find_type_or_exit(argument, &sql_protocol_typelib,
opt->name);
if ((opt_protocol= find_type_with_warning(argument, &sql_protocol_typelib,
opt->name)) <= 0)
{
sf_leaking_memory= 1; /* no memory leak reports here */
exit(1);
}
break;
}
return 0;
Expand Down
19 changes: 15 additions & 4 deletions client/mysqlbinlog.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1958,8 +1958,12 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
one_table= 1;
break;
case OPT_MYSQL_PROTOCOL:
opt_protocol= find_type_or_exit(argument, &sql_protocol_typelib,
opt->name);
if ((opt_protocol= find_type_with_warning(argument, &sql_protocol_typelib,
opt->name)) <= 0)
{
sf_leaking_memory= 1; /* no memory leak reports here */
exit(1);
}
break;
#ifdef WHEN_FLASHBACK_REVIEW_READY
case opt_flashback_review:
Expand All @@ -1977,8 +1981,15 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
opt_base64_output_mode= BASE64_OUTPUT_ALWAYS;
else
{
opt_base64_output_mode= (enum_base64_output_mode)
(find_type_or_exit(argument, &base64_output_mode_typelib, opt->name)-1);
int val;

if ((val= find_type_with_warning(argument, &base64_output_mode_typelib,
opt->name)) <= 0)
{
sf_leaking_memory= 1; /* no memory leak reports here */
exit(1);
}
opt_base64_output_mode= (enum_base64_output_mode) (val - 1);
}
break;
case OPT_REWRITE_DB: // db_from->db_to
Expand Down
8 changes: 6 additions & 2 deletions client/mysqlcheck.c
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,12 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
print_version(); exit(0);
break;
case OPT_MYSQL_PROTOCOL:
opt_protocol= find_type_or_exit(argument, &sql_protocol_typelib,
opt->name);
if ((opt_protocol= find_type_with_warning(argument, &sql_protocol_typelib,
opt->name)) <= 0)
{
sf_leaking_memory= 1; /* no memory leak reports here */
exit(1);
}
break;
}

Expand Down
8 changes: 6 additions & 2 deletions client/mysqldump.c
Original file line number Diff line number Diff line change
Expand Up @@ -960,8 +960,12 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
break;
}
case (int) OPT_MYSQL_PROTOCOL:
opt_protocol= find_type_or_exit(argument, &sql_protocol_typelib,
opt->name);
if ((opt_protocol= find_type_with_warning(argument, &sql_protocol_typelib,
opt->name)) <= 0)
{
sf_leaking_memory= 1; /* no memory leak reports here */
exit(1);
}
break;
}
return 0;
Expand Down
8 changes: 6 additions & 2 deletions client/mysqlimport.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,12 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
break;
#endif
case OPT_MYSQL_PROTOCOL:
opt_protocol= find_type_or_exit(argument, &sql_protocol_typelib,
opt->name);
if ((opt_protocol= find_type_with_warning(argument, &sql_protocol_typelib,
opt->name)) <= 0)
{
sf_leaking_memory= 1; /* no memory leak reports here */
exit(1);
}
break;
case '#':
DBUG_PUSH(argument ? argument : "d:t:o");
Expand Down
8 changes: 6 additions & 2 deletions client/mysqlshow.c
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,12 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
#endif
break;
case OPT_MYSQL_PROTOCOL:
opt_protocol= find_type_or_exit(argument, &sql_protocol_typelib,
opt->name);
if ((opt_protocol= find_type_with_warning(argument, &sql_protocol_typelib,
opt->name)) <= 0)
{
sf_leaking_memory= 1; /* no memory leak reports here */
exit(1);
}
break;
case '#':
DBUG_PUSH(argument ? argument : "d:t:o");
Expand Down
8 changes: 6 additions & 2 deletions client/mysqlslap.c
Original file line number Diff line number Diff line change
Expand Up @@ -779,8 +779,12 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
#endif
break;
case OPT_MYSQL_PROTOCOL:
opt_protocol= find_type_or_exit(argument, &sql_protocol_typelib,
opt->name);
if ((opt_protocol= find_type_with_warning(argument, &sql_protocol_typelib,
opt->name)) <= 0)
{
sf_leaking_memory= 1; /* no memory leak reports here */
exit(1);
}
break;
case '#':
DBUG_PUSH(argument ? argument : default_dbug_option);
Expand Down
8 changes: 6 additions & 2 deletions client/mysqltest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7294,8 +7294,12 @@ get_one_option(int optid, const struct my_option *opt, char *argument)
exit(0);
case OPT_MYSQL_PROTOCOL:
#ifndef EMBEDDED_LIBRARY
opt_protocol= find_type_or_exit(argument, &sql_protocol_typelib,
opt->name);
if ((opt_protocol= find_type_with_warning(argument, &sql_protocol_typelib,
opt->name)) <= 0)
{
sf_leaking_memory= 1; /* no memory leak reports here */
exit(1);
}
#endif
break;
case '?':
Expand Down
6 changes: 5 additions & 1 deletion cmake/install_layout.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ SET(INSTALL_MYSQLDATADIR_RPM "/var/lib/mysql")

SET(INSTALL_UNIX_ADDRDIR_RPM "${INSTALL_MYSQLDATADIR_RPM}/mysql.sock")
SET(INSTALL_SYSTEMD_UNITDIR_RPM "/usr/lib/systemd/system")
SET(INSTALL_SYSTEMD_SYSUSERSDIR_RPM "/usr/lib/sysusers.d")
SET(INSTALL_SYSTEMD_TMPFILESDIR_RPM "/usr/lib/tmpfiles.d")

#
# DEB layout
Expand Down Expand Up @@ -191,6 +193,8 @@ SET(INSTALL_MYSQLDATADIR_DEB "/var/lib/mysql")

SET(INSTALL_UNIX_ADDRDIR_DEB "/var/run/mysqld/mysqld.sock")
SET(INSTALL_SYSTEMD_UNITDIR_DEB "/lib/systemd/system")
SET(INSTALL_SYSTEMD_SYSUSERSDIR_DEB "/usr/lib/sysusers.d")
SET(INSTALL_SYSTEMD_TMPFILESDIR_DEB "/usr/lib/tmpfiles.d")

#
# SVR4 layout
Expand Down Expand Up @@ -232,7 +236,7 @@ SET(OLD_INSTALL_LAYOUT ${INSTALL_LAYOUT} CACHE INTERNAL "")
# layout is chosen)
FOREACH(var BIN SBIN LIB MYSQLSHARE SHARE PLUGIN INCLUDE SCRIPT DOC MAN SYSCONF SYSCONF2
INFO MYSQLTEST SQLBENCH DOCREADME SUPPORTFILES MYSQLDATA UNIX_ADDR
SYSTEMD_UNIT)
SYSTEMD_UNIT SYSTEMD_SYSUSERS SYSTEMD_TMPFILES)
SET(INSTALL_${var}DIR ${INSTALL_${var}DIR_${INSTALL_LAYOUT}}
CACHE STRING "${var} installation directory" ${FORCE})
MARK_AS_ADVANCED(INSTALL_${var}DIR)
Expand Down
3 changes: 3 additions & 0 deletions cmake/make_dist.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ ENDIF()
CONFIGURE_FILE(${CMAKE_BINARY_DIR}/include/source_revision.h
${PACKAGE_DIR}/include/source_revision.h COPYONLY)

CONFIGURE_FILE(${CMAKE_BINARY_DIR}/storage/rocksdb/rdb_source_revision.h
${PACKAGE_DIR}/storage/rocksdb/rdb_source_revision.h COPYONLY)

IF(NOT GIT_EXECUTABLE)
MESSAGE(STATUS "git not found or source dir is not a repo, use CPack")

Expand Down
2 changes: 1 addition & 1 deletion cmake/plugin.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ MACRO(MYSQL_ADD_PLUGIN)
SET(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} PARENT_SCOPE)

IF (NOT ARG_CLIENT)
SET(CPACK_RPM_${ARG_COMPONENT}_PACKAGE_REQUIRES "MariaDB${ver}" PARENT_SCOPE)
SET(CPACK_RPM_${ARG_COMPONENT}_PACKAGE_REQUIRES "MariaDB-server${ver}" PARENT_SCOPE)
ENDIF()
# workarounds for cmake issues #13248 and #12864:
SET(CPACK_RPM_${ARG_COMPONENT}_PACKAGE_PROVIDES "cmake_bug_13248" PARENT_SCOPE)
Expand Down
2 changes: 1 addition & 1 deletion debian/autobake-deb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ GCCVERSION=$(gcc -dumpversion | sed -e 's/\.\([0-9][0-9]\)/\1/g' -e 's/\.\([0-9]
# x86 32 bit.
if [[ $GCCVERSION -lt 40800 ]] || [[ $(arch) =~ i[346]86 ]]
then
sed '/Package: mariadb-plugin-rocksdb/,+7d' -i debian/control
sed '/Package: mariadb-plugin-rocksdb/,+9d' -i debian/control
fi
if [[ $GCCVERSION -lt 40800 ]]
then
Expand Down
27 changes: 20 additions & 7 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ Description: MariaDB database client (metapackage depending on the latest versio
Package: mariadb-plugin-connect
Architecture: any
Depends: libxml2,
mariadb-server-10.2,
mariadb-server-10.2 (= ${binary:Version}),
unixodbc,
${misc:Depends},
${shlibs:Depends}
Expand All @@ -452,15 +452,20 @@ Description: Connect storage engine for MariaDB

Package: mariadb-plugin-rocksdb
Architecture: any
Depends: mariadb-server-10.2, ${misc:Depends}, ${shlibs:Depends}
Depends: mariadb-server-10.2 (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends}
Description: RocksDB storage engine for MariaDB
The RocksDB storage engine is a high performance storage engine, aimed
at maximising storage efficiency while maintaining InnoDB-like performance.
This package contains the RocksDB plugin for MariaDB.

Package: mariadb-plugin-oqgraph
Architecture: any
Depends: libjudydebian1, mariadb-server-10.2, ${misc:Depends}, ${shlibs:Depends}
Depends: libjudydebian1,
mariadb-server-10.2 (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends}
Breaks: mariadb-oqgraph-engine-10.1, mariadb-oqgraph-engine-10.2
Replaces: mariadb-oqgraph-engine-10.1, mariadb-oqgraph-engine-10.2
Description: OQGraph storage engine for MariaDB
Expand All @@ -470,7 +475,9 @@ Description: OQGraph storage engine for MariaDB

Package: mariadb-plugin-tokudb
Architecture: any
Depends: mariadb-server-10.2, ${misc:Depends}, ${shlibs:Depends}
Depends: mariadb-server-10.2 (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends}
Breaks: mariadb-server-10.0,
mariadb-server-10.1,
mariadb-server-10.2 (<< ${source:Version})
Expand All @@ -485,7 +492,9 @@ Description: TokuDB storage engine for MariaDB

Package: mariadb-plugin-mroonga
Architecture: any
Depends: mariadb-server-10.2, ${misc:Depends}, ${shlibs:Depends}
Depends: mariadb-server-10.2 (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends}
Breaks: mariadb-server-10.0,
mariadb-server-10.1,
mariadb-server-10.2 (<< ${source:Version})
Expand All @@ -499,7 +508,9 @@ Description: Mroonga storage engine for MariaDB

Package: mariadb-plugin-spider
Architecture: any
Depends: mariadb-server-10.2, ${misc:Depends}, ${shlibs:Depends}
Depends: mariadb-server-10.2 (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends}
Breaks: mariadb-server-10.0,
mariadb-server-10.1,
mariadb-server-10.2 (<< ${source:Version})
Expand All @@ -514,7 +525,9 @@ Description: Spider storage engine for MariaDB

Package: mariadb-plugin-cassandra
Architecture: any
Depends: mariadb-server-10.2, ${misc:Depends}, ${shlibs:Depends}
Depends: mariadb-server-10.2 (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends}
Breaks: mariadb-server-10.0,
mariadb-server-10.1,
mariadb-server-10.2 (<< ${source:Version})
Expand Down
19 changes: 5 additions & 14 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,6 @@ else
TESTSUITE_FAIL_CMD:=exit 1
endif

# Skip TokuDB if arch is not amd64
ifneq ($(ARCH), amd64)
CMAKEFLAGS += -DWITHOUT_TOKUDB=true
endif

# Add support for verbose builds
MAKEFLAGS += VERBOSE=1

Expand Down Expand Up @@ -119,19 +114,15 @@ override_dh_auto_install:
dh_testdir
dh_testroot

# If TokuDB plugin was not built skip the package
[ -f $(BUILDDIR)/storage/tokudb/ha_tokudb.so ] || sed -i -e "/Package: mariadb-plugin-tokudb/,+14d" debian/control

# If Mroonga plugin was not built skip the package
[ -f $(BUILDDIR)/storage/mroonga/ha_mroonga.so ] || sed -i -e "/Package: mariadb-plugin-mroonga/,+13d" debian/control
# Skip TokuDB if arch is not amd64
ifneq ($(ARCH), amd64)
sed -i -e "/Package: mariadb-plugin-tokudb/,+16d" debian/control
endif

# If libthrift-dev was available (manually installed, as it is
# not in Debian) and ha_cassandra.so was thus built, create package,
# otherwise skip it.
[ -f $(BUILDDIR)/storage/cassandra/ha_cassandra.so ] || sed -i -e "/Package: mariadb-plugin-cassandra/,+16d" debian/control

# If Spider plugin was not built skip the package
[ -f $(BUILDDIR)/storage/spider/ha_spider.so ] || sed -i -e "/Package: mariadb-plugin-spider/,+14d" debian/control
[ -f $(BUILDDIR)/storage/cassandra/ha_cassandra.so ] || sed -i -e "/Package: mariadb-plugin-cassandra/,+18d" debian/control

# Copy systemd files to a location available for dh_installinit
cp $(BUILDDIR)/support-files/mariadb.service debian/mariadb-server-10.2.mariadb.service
Expand Down
8 changes: 6 additions & 2 deletions extra/mariabackup/xtrabackup.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1421,8 +1421,12 @@ xb_get_one_option(int optid,
case OPT_PROTOCOL:
if (argument)
{
opt_protocol= find_type_or_exit(argument, &sql_protocol_typelib,
opt->name);
if ((opt_protocol= find_type_with_warning(argument, &sql_protocol_typelib,
opt->name)) <= 0)
{
sf_leaking_memory= 1; /* no memory leak reports here */
exit(1);
}
}
break;
#include "sslopt-case.h"
Expand Down
9 changes: 0 additions & 9 deletions include/m_string.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,6 @@
extern "C" {
#endif

/*
my_str_malloc(), my_str_realloc() and my_str_free() are assigned to
implementations in strings/alloc.c, but can be overridden in
the calling program.
*/
extern void *(*my_str_malloc)(size_t);
extern void *(*my_str_realloc)(void *, size_t);
extern void (*my_str_free)(void *);

#ifdef DBUG_OFF
#if defined(HAVE_STPCPY) && MY_GNUC_PREREQ(3, 4) && !defined(__INTEL_COMPILER)
#define strmov(A,B) __builtin_stpcpy((A),(B))
Expand Down
2 changes: 0 additions & 2 deletions include/mysql.h.pp
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,6 @@
extern my_ulonglong find_typeset(char *x, TYPELIB *typelib,int *error_position);
extern int find_type_with_warning(const char *x, TYPELIB *typelib,
const char *option);
extern int find_type_or_exit(const char *x, TYPELIB *typelib,
const char *option);
extern int find_type(const char *x, const TYPELIB *typelib, unsigned int flags);
extern void make_type(char *to,unsigned int nr,TYPELIB *typelib);
extern const char *get_type(TYPELIB *typelib,unsigned int nr);
Expand Down
2 changes: 0 additions & 2 deletions include/typelib.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ typedef struct st_typelib { /* Different types saved here */
extern my_ulonglong find_typeset(char *x, TYPELIB *typelib,int *error_position);
extern int find_type_with_warning(const char *x, TYPELIB *typelib,
const char *option);
extern int find_type_or_exit(const char *x, TYPELIB *typelib,
const char *option);
#define FIND_TYPE_BASIC 0
/** makes @c find_type() require the whole name, no prefix */
#define FIND_TYPE_NO_PREFIX (1U << 0)
Expand Down
2 changes: 1 addition & 1 deletion libmariadb
Loading

0 comments on commit fbab79c

Please sign in to comment.