Skip to content

Commit

Permalink
Merge branch '10.3' into 10.2-MDEV-10814-dont-dump-query-cache
Browse files Browse the repository at this point in the history
  • Loading branch information
grooverdan committed Feb 25, 2018
2 parents 3188131 + 8936b17 commit 0805a95
Show file tree
Hide file tree
Showing 3,935 changed files with 292,191 additions and 158,228 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
9 changes: 9 additions & 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 Expand Up @@ -494,3 +495,11 @@ UpgradeLog*.htm

# Microsoft Fakes
FakesAssemblies/

compile_commands.json
.clang-format
.kscope/
.vimrc
.editorconfig
.kateconfig
*.kdev4
7 changes: 7 additions & 0 deletions .travis.compiler.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ if [[ "${TRAVIS_OS_NAME}" == 'linux' ]]; then
export CXX CC=${CXX/++/}
elif [[ "${CXX}" == 'g++' ]]; then
CMAKE_OPT=""
if [[ "${MYSQL_TEST_SUITES}" == 'rpl' ]]; then
CMAKE_OPT="${CMAKE_OPT} -DWITHOUT_TOKUDB_STORAGE_ENGINE=TRUE"
CMAKE_OPT="${CMAKE_OPT} -DWITHOUT_MROONGA_STORAGE_ENGINE=TRUE"
fi
export CXX=g++-${GCC_VERSION}
export CC=gcc-${GCC_VERSION}
fi
Expand All @@ -33,6 +37,9 @@ else
if which ccache ; then
CMAKE_OPT="${CMAKE_OPT} -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache"
fi
if [[ "${MYSQL_TEST_SUITES}" == 'rpl' ]]; then
CMAKE_OPT="${CMAKE_OPT} -DWITHOUT_TOKUDB_STORAGE_ENGINE=ON"
fi
CMAKE_OPT="${CMAKE_OPT} -DWITHOUT_MROONGA_STORAGE_ENGINE=ON"
if [[ "${TYPE}" == "Debug" ]]; then
CMAKE_OPT="${CMAKE_OPT} -DWITHOUT_TOKUDB_STORAGE_ENGINE=ON"
Expand Down
44 changes: 5 additions & 39 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,12 @@ compiler:

cache:
apt: true
ccache: true
ccache: true # Does not currently work for clang builds: https://github.com/travis-ci/travis-ci/issues/6201
directories:
- /usr/local/Cellar
- /usr/local/Cellar # Fails do to permission error: https://github.com/travis-ci/travis-ci/issues/8092

env:
matrix:
# - GCC_VERSION=4.8 TYPE=Debug MYSQL_TEST_SUITES=rpl
# - GCC_VERSION=5 TYPE=Debug MYSQL_TEST_SUITES=main,archive,optimizer_unfixed_bugs,parts,sys_vars,unit,vcol,innodb,innodb_gis,innodb_zip,innodb_fts
# - GCC_VERSION=6 TYPE=Debug MYSQL_TEST_SUITES=binlog,binlog_encryption,encryption,rocksdb
# - GCC_VERSION=6 TYPE=Debug MYSQL_TEST_SUITES=csv,federated,funcs_1,funcs_2,gcol,handler,heap,json,maria,perfschema,plugins,multi_source,roles
- GCC_VERSION=4.8 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=rpl
- GCC_VERSION=5 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=main,archive,optimizer_unfixed_bugs,parts,sys_vars,unit,vcol,innodb,innodb_gis,innodb_zip,innodb_fts
- GCC_VERSION=6 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=binlog,binlog_encryption,encryption,rocksdb
Expand All @@ -40,6 +36,8 @@ matrix:
include:
- os: linux
compiler: gcc
env:
- DebPackages
addons:
apt:
packages: # make sure these match debian/control contents
Expand Down Expand Up @@ -80,7 +78,6 @@ matrix:
- fakeroot
script:
- ${CC} --version ; ${CXX} --version
- source .travis.compiler.sh
# https://github.com/travis-ci/travis-ci/issues/7062 - /run/shm isn't writable or executable
# in trusty containers
- export MTR_MEM=/tmp
Expand All @@ -101,44 +98,13 @@ matrix:
compiler: clang
env: GCC_VERSION=6 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=csv,federated,funcs_1,funcs_2,gcol,handler,heap,json,maria,perfschema,plugins,multi_source,roles

# Matrix include for coverity
# - env:
# - GCC_VERSION=6
# addon:
# coverity_scan:
# # ref: https://scan.coverity.com/travis_ci
# # GitHub project metadata
# project:
# - name: MariaDB/server
# - description: MariaDB Server
#
# # Where email notification of build analysis results will be sent
# notification_email: security@mariadb.org
#
# # Commands to prepare for build_command
# build_command_prepend:
# - source .travis.compiler.sh
# - ${MYSQL_BUILD_CC} --version ; ${MYSQL_BUILD_CXX} --version
# - cmake .
# -DCMAKE_BUILD_TYPE=Debug
# -DWITH_SSL=system -DWITH_ZLIB=system
# -DWITHOUT_TOKUDB_STORAGE_ENGINE=ON -DWITHOUT_MROONGA_STORAGE_ENGINE=ON
#
# # The command that will be added as an argument to "cov-build" to compile your project for analysis,
# build_command: make -j 4
#
# # Pattern to match selecting branches that will run analysis.
# # Take care in resource usage, and consider the build frequency allowances per
# # https://scan.coverity.com/faq#frequency - 7 per week is the current limit.
# branch_pattern: .*coverity.*

addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-4.0
- sourceline: 'deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-5.0 main'
packages: # make sure these match the build requirements
packages: # make sure these include all compilers and all build dependencies (see list above)
- gcc-5
- g++-5
- gcc-6
Expand Down
2 changes: 1 addition & 1 deletion BUILD-CMAKE
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ shell>cd ../build
shell>cmake ../src

Note: if a directory was used for in-source build, out-of-source will
not work. To reenable out-of-source build, remove <source-root>/CMakeCache.txt
not work. To re-enable out-of-source build, remove <source-root>/CMakeCache.txt
file.


Expand Down
10 changes: 7 additions & 3 deletions BUILD/FINISH.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,19 @@ then
configure="$configure --verbose"
fi

commands=""
# git clean -fdX removes all ignored (build) files
commands="\
if test -d .git
then
commands="\
git clean -fdX
cd ./libmariadb
git submodule update
cd ../storage/rocksdb/rocksdb
git submodule update
cd ../../..
cd ../../.."
fi
commands="$commands
path=`dirname $0`
. \"$path/autorun.sh\""

Expand Down
3 changes: 3 additions & 0 deletions BUILD/SETUP.sh
Original file line number Diff line number Diff line change
Expand Up @@ -307,3 +307,6 @@ gprof_compile_flags="-O2 -pg -g"

gprof_link_flags="--disable-shared $static_link"

disable_gprof_plugins="--with-zlib-dir=bundled --without-plugin-oqgraph --without-plugin-mroonga"

disable_asan_plugins="--without-plugin-rocksdb"
6 changes: 6 additions & 0 deletions BUILD/check-cpu
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ check_compiler_cpu_flags () {
cc_major=$1
cc_minor=$2
cc_patch=$3
if test -z "$cc_minor"; then
cc_minor="0";
fi
if test -z "$cc_patch"; then
cc_minor="0";
fi
cc_comp=`expr $cc_major '*' 100 '+' $cc_minor`
fi

Expand Down
2 changes: 1 addition & 1 deletion BUILD/compile-pentium-gprof
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ path=`dirname $0`
. "$path/SETUP.sh"

extra_flags="$pentium_cflags $gprof_compile_flags"
extra_configs="$pentium_configs $debug_configs $gprof_link_flags $disable_64_bit_plugins"
extra_configs="$pentium_configs $debug_configs $gprof_link_flags $disable_64_bit_plugins $disable_gprof_plugins"

. "$path/FINISH.sh"
24 changes: 24 additions & 0 deletions BUILD/compile-pentium64-asan-max
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#! /bin/sh
# Copyright (c) 2018, MariaDB Corporation.
#
# 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
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

path=`dirname $0`
. "$path/SETUP.sh"

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

. "$path/FINISH.sh"
2 changes: 1 addition & 1 deletion BUILD/compile-pentium64-gcov
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ export LDFLAGS="$gcov_link_flags"
extra_flags="$pentium64_cflags $max_cflags $gcov_compile_flags"
c_warnings="$c_warnings $debug_extra_warnings"
cxx_warnings="$cxx_warnings $debug_extra_warnings"
extra_configs="$pentium_configs $debug_configs $gcov_configs $max_configs"
extra_configs="$pentium_configs $debug_configs $gcov_configs $max_configs --without-oqgraph"

. "$path/FINISH.sh"
2 changes: 1 addition & 1 deletion BUILD/compile-pentium64-gprof
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ path=`dirname $0`
. "$path/SETUP.sh"

extra_flags="$pentium64_cflags $gprof_compile_flags"
extra_configs="$pentium_configs $max_configs $gprof_link_flags --with-zlib-dir=bundled"
extra_configs="$pentium_configs $max_configs $gprof_link_flags $disable_gprof_plugins"

. "$path/FINISH.sh"
8 changes: 5 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ ENDIF()
SET(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING
"Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel")

# MAX_INDEXES - Set the maximum number of indexes per table, default 64U
# MAX_INDEXES - Set the maximum number of indexes per table, default 64
IF (NOT MAX_INDEXES)
SET(MAX_INDEXES 64U)
SET(MAX_INDEXES 64)
ENDIF(NOT MAX_INDEXES)

IF (${MAX_INDEXES} GREATER 128)
Expand Down Expand Up @@ -162,6 +162,7 @@ INCLUDE(plugin)
INCLUDE(install_macros)
INCLUDE(systemd)
INCLUDE(mysql_add_executable)
INCLUDE(compile_flags)
INCLUDE(crc32-vpmsum)

# Handle options
Expand All @@ -182,7 +183,8 @@ OPTION(NOT_FOR_DISTRIBUTION "Allow linking with GPLv2-incompatible system librar
INCLUDE(check_compiler_flag)

OPTION(WITH_ASAN "Enable address sanitizer" OFF)
IF (WITH_ASAN)

IF (WITH_ASAN AND NOT MSVC)
# gcc 4.8.1 and new versions of clang
MY_CHECK_AND_SET_COMPILER_FLAG("-fsanitize=address -fPIC"
DEBUG RELWITHDEBINFO)
Expand Down
3 changes: 2 additions & 1 deletion CREDITS
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ organization registered in the USA.

The current main sponsors of the MariaDB Foundation are:

Alibaba Cloud https://intl.aliyun.com (2017)
Alibaba Cloud https://www.alibabacloud.com/ (2017)
Booking.com https://www.booking.com (2013)
Microsoft https://microsoft.com/ (2017)
Tencent Cloud https://cloud.tencent.com (2017)
Development Bank of Singapore https://dbs.com (2016)
IBM https://www.ibm.com (2017)
Expand Down
14 changes: 7 additions & 7 deletions Docs/sp-imp-spec.txt
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
- Statements:
The Lex in THD is replaced by a new Lex structure and the statement,
is parsed as usual. A sp_instr_stmt is created, containing the new
Lex, and added to added to the instructions in sphead.
Lex, and added to the instructions in sphead.
Afterwards, the procedure's Lex is restored in THD.
- SET var:
Setting a local variable generates a sp_instr_set instruction,
Expand Down Expand Up @@ -169,7 +169,7 @@

- Parsing CREATE FUNCTION ...

Creating a functions is essensially the same thing as for a PROCEDURE,
Creating a functions is essentially the same thing as for a PROCEDURE,
with the addition that a FUNCTION has a return type and a RETURN
statement, but no OUT or INOUT parameters.

Expand All @@ -189,7 +189,7 @@
additional requirement. They will be called in expressions with the same
syntax as UDFs, so UDFs and stored FUNCTIONs share the namespace. Thus,
we must make sure that we do not have UDFs and FUNCTIONs with the same
name (even if they are storded in different places).
name (even if they are stored in different places).

This means that we can reparse the procedure as many time as we want.
The first time, the resulting Lex is used to store the procedure in
Expand Down Expand Up @@ -225,7 +225,7 @@

sql_parse.cc:mysql_execute_command() then uses sp.cc:sp_find() to
get the sp_head for the procedure (which may have been read from the
database or feetched from the in-memory cache) and calls the sp_head's
database or fetched from the in-memory cache) and calls the sp_head's
method execute().
Note: It's important that substatements called by the procedure do not
do send_ok(). Fortunately, there is a flag in THD->net to disable
Expand Down Expand Up @@ -323,7 +323,7 @@
One "obvious" solution would be to simply push "mysql.proc" to the list
of tables used by the query, but this implies a "join" with this table
if the query is a select, so it doesn't work (and we can't exclude this
table easily; since a priviledged used might in fact want to search
table easily; since a privileged used might in fact want to search
the proc table).
Another solution would of course be to allow the opening and closing
of the mysql.proc table during a query execution, but this it not
Expand Down Expand Up @@ -400,7 +400,7 @@
instruction.

Calling and returning from a CONTINUE handler poses some special
problems. Since we need to return to the point after its invokation,
problems. Since we need to return to the point after its invocation,
we push the return location on a stack in the sp_rcontext (this is
done by the exectution loop). The handler then ends with a special
instruction, sp_instr_hreturn, which returns to this location.
Expand Down Expand Up @@ -545,7 +545,7 @@
Cons: Uses more memory, each SP read from table once per thread.

Unfortunately, we cannot use alternative 1 for the time being, as most
of the datastructures to be cached (lex and items) are not reentrant
of the data structures to be cached (lex and items) are not reentrant
and thread-safe. (Things are modifed at execution, we have THD pointers
stored everywhere, etc.)
This leaves us with alternative 2, one cache per thread; or actually
Expand Down
3 changes: 2 additions & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
MYSQL_VERSION_MAJOR=10
MYSQL_VERSION_MINOR=3
MYSQL_VERSION_PATCH=3
MYSQL_VERSION_PATCH=5
SERVER_MATURITY=gamma
21 changes: 21 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: build-{build}~branch-{branch}

before_build:
- md %APPVEYOR_BUILD_FOLDER%\win_build
- cd %APPVEYOR_BUILD_FOLDER%\win_build
- cmake .. -G "Visual Studio 15 2017 Win64" -DWITH_UNIT_TESTS=0

build:
project: win_build\MySQL.sln
parallel: true
verbosity: minimal

configuration: RelWithDebInfo
platform: x64

test_script:
- set PATH=%PATH%;C:\Program Files (x86)\Windows Kits\10\Debuggers\x64
- cd %APPVEYOR_BUILD_FOLDER%\win_build\mysql-test
- perl mysql-test-run.pl --force --max-test-fail=10 --parallel=auto --testcase-timeout=10 --skip-test-list=unstable-tests --suite=main,innodb,plugins,mariabackup

image: Visual Studio 2017
1 change: 1 addition & 0 deletions client/client_priv.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ enum options_client
OPT_REPORT_PROGRESS,
OPT_SKIP_ANNOTATE_ROWS_EVENTS,
OPT_SSL_CRL, OPT_SSL_CRLPATH,
OPT_PRINT_ROW_COUNT, OPT_PRINT_ROW_EVENT_POSITIONS,
OPT_MAX_CLIENT_OPTION /* should be always the last */
};

Expand Down
2 changes: 1 addition & 1 deletion client/completion_hash.cc
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ int completion_hash_init(HashTable *ht, uint nSize)
ht->initialized = 0;
return FAILURE;
}
init_alloc_root(&ht->mem_root, 8192, 0, MYF(0));
init_alloc_root(&ht->mem_root, "completion_hash", 8192, 0, MYF(0));
ht->pHashFunction = hashpjw;
ht->nTableSize = nSize;
ht->initialized = 1;
Expand Down
Loading

0 comments on commit 0805a95

Please sign in to comment.