mirror of
https://github.com/MariaDB/server.git
synced 2025-01-27 01:04:19 +01:00
Merge branch '10.3' into 10.4
This commit is contained in:
commit
a70a1cf3f4
197 changed files with 5210 additions and 1291 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -128,6 +128,7 @@ scripts/mysqld_safe
|
||||||
scripts/mysqldumpslow
|
scripts/mysqldumpslow
|
||||||
scripts/mysqlhotcopy
|
scripts/mysqlhotcopy
|
||||||
scripts/mytop
|
scripts/mytop
|
||||||
|
scripts/wsrep_sst_backup
|
||||||
scripts/wsrep_sst_common
|
scripts/wsrep_sst_common
|
||||||
scripts/wsrep_sst_mysqldump
|
scripts/wsrep_sst_mysqldump
|
||||||
scripts/wsrep_sst_rsync
|
scripts/wsrep_sst_rsync
|
||||||
|
|
|
@ -1,55 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
set -v -x
|
|
||||||
|
|
||||||
# Exclude modules from build not directly affecting the current
|
|
||||||
# test suites found in $MYSQL_TEST_SUITES, to conserve job time
|
|
||||||
# as well as disk usage
|
|
||||||
|
|
||||||
function exclude_modules() {
|
|
||||||
# excludes for all
|
|
||||||
CMAKE_OPT="${CMAKE_OPT} -DPLUGIN_TOKUDB=NO -DPLUGIN_MROONGA=NO -DPLUGIN_SPIDER=NO -DPLUGIN_OQGRAPH=NO -DPLUGIN_PERFSCHEMA=NO -DPLUGIN_SPHINX=NO"
|
|
||||||
# exclude storage engines not being tested in current job
|
|
||||||
if [[ ! "${MYSQL_TEST_SUITES}" =~ "archive" ]]; then
|
|
||||||
CMAKE_OPT="${CMAKE_OPT} -DPLUGIN_ARCHIVE=NO"
|
|
||||||
fi
|
|
||||||
if [[ ! "${MYSQL_TEST_SUITES}" =~ "rocksdb" ]]; then
|
|
||||||
CMAKE_OPT="${CMAKE_OPT} -DPLUGIN_ROCKSDB=NO"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
if [[ "${TRAVIS_OS_NAME}" == 'linux' ]]; then
|
|
||||||
TEST_CASE_TIMEOUT=2
|
|
||||||
exclude_modules;
|
|
||||||
if which ccache ; then
|
|
||||||
CMAKE_OPT="${CMAKE_OPT} -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache"
|
|
||||||
fi
|
|
||||||
if [[ "${CXX}" == 'clang++' ]]; then
|
|
||||||
if [[ "${CC_VERSION}" == '6' ]]; then
|
|
||||||
export CXX=${CXX}-${CC_VERSION}.0
|
|
||||||
else
|
|
||||||
export CXX=${CXX}-${CC_VERSION}
|
|
||||||
fi
|
|
||||||
export CC=${CXX/++/}
|
|
||||||
# excess warnings about unused include path
|
|
||||||
export CFLAGS='-Wno-unused-command-line-argument'
|
|
||||||
export CXXFLAGS='-Wno-unused-command-line-argument'
|
|
||||||
elif [[ "${CXX}" == 'g++' ]]; then
|
|
||||||
export CXX=g++-${CC_VERSION}
|
|
||||||
export CC=gcc-${CC_VERSION}
|
|
||||||
fi
|
|
||||||
if [[ ${CC_VERSION} == 7 ]]; then
|
|
||||||
export WSREP_PROVIDER=/usr/lib/galera/libgalera_smm.so
|
|
||||||
MYSQL_TEST_SUITES="${MYSQL_TEST_SUITES},wsrep"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "${TRAVIS_OS_NAME}" == 'osx' ]]; then
|
|
||||||
TEST_CASE_TIMEOUT=20
|
|
||||||
exclude_modules;
|
|
||||||
CMAKE_OPT="${CMAKE_OPT} -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl"
|
|
||||||
if which ccache ; then
|
|
||||||
CMAKE_OPT="${CMAKE_OPT} -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
set +v +x
|
|
209
.travis.yml
209
.travis.yml
|
@ -1,209 +0,0 @@
|
||||||
# vim ft=yaml
|
|
||||||
# travis-ci.org definition
|
|
||||||
|
|
||||||
sudo: false
|
|
||||||
dist: xenial
|
|
||||||
|
|
||||||
git:
|
|
||||||
depth: 2
|
|
||||||
|
|
||||||
language: cpp
|
|
||||||
os:
|
|
||||||
- linux
|
|
||||||
- osx
|
|
||||||
osx_image: xcode12u
|
|
||||||
compiler:
|
|
||||||
- gcc
|
|
||||||
- clang
|
|
||||||
|
|
||||||
cache:
|
|
||||||
timeout: 500
|
|
||||||
apt: true
|
|
||||||
ccache: true
|
|
||||||
|
|
||||||
env:
|
|
||||||
matrix:
|
|
||||||
- CC_VERSION=6 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=main
|
|
||||||
- CC_VERSION=6 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=archive,optimizer_unfixed_bugs,parts,sys_vars,unit,vcol,innodb,innodb_gis,innodb_zip,innodb_fts
|
|
||||||
- CC_VERSION=6 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=rpl
|
|
||||||
- CC_VERSION=7 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=binlog,binlog_encryption,encryption
|
|
||||||
- CC_VERSION=7 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=rocksdb,versioning
|
|
||||||
- CC_VERSION=7 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=csv,federated,funcs_1,funcs_2,gcol,handler,heap,json,maria,perfschema,plugins,multi_source,roles
|
|
||||||
- CC_VERSION=8 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=main
|
|
||||||
|
|
||||||
matrix:
|
|
||||||
exclude:
|
|
||||||
- os: osx
|
|
||||||
compiler: gcc
|
|
||||||
- os: osx
|
|
||||||
compiler: clang
|
|
||||||
env: CC_VERSION=8 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=main
|
|
||||||
- os: linux
|
|
||||||
compiler: clang
|
|
||||||
env: CC_VERSION=8 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=main
|
|
||||||
include:
|
|
||||||
- os: linux
|
|
||||||
compiler: gcc
|
|
||||||
env:
|
|
||||||
- DebPackages
|
|
||||||
addons:
|
|
||||||
apt:
|
|
||||||
packages: # make sure these match debian/control contents
|
|
||||||
- bison
|
|
||||||
- chrpath
|
|
||||||
- cmake
|
|
||||||
- debhelper
|
|
||||||
- dh-apparmor
|
|
||||||
- dh-exec
|
|
||||||
- dpatch
|
|
||||||
- gdb
|
|
||||||
- libaio-dev
|
|
||||||
- libboost-dev
|
|
||||||
- libcurl3-dev
|
|
||||||
- libdbd-mysql
|
|
||||||
- libjudy-dev
|
|
||||||
- libncurses5-dev
|
|
||||||
- libpam0g-dev
|
|
||||||
- libpcre3-dev
|
|
||||||
- libreadline-gplv2-dev
|
|
||||||
- libstemmer-dev
|
|
||||||
- libssl-dev
|
|
||||||
- libnuma-dev
|
|
||||||
- libxml2-dev
|
|
||||||
- lsb-release
|
|
||||||
- perl
|
|
||||||
- po-debconf
|
|
||||||
- psmisc
|
|
||||||
- zlib1g-dev
|
|
||||||
- libcrack2-dev
|
|
||||||
- cracklib-runtime
|
|
||||||
- libjemalloc-dev
|
|
||||||
- libsnappy-dev
|
|
||||||
- liblzma-dev
|
|
||||||
- libzmq-dev
|
|
||||||
- libdistro-info-perl
|
|
||||||
- uuid-dev
|
|
||||||
- devscripts
|
|
||||||
- fakeroot
|
|
||||||
- dh-systemd
|
|
||||||
- libsystemd-dev
|
|
||||||
- libzstd-dev
|
|
||||||
- unixodbc-dev
|
|
||||||
script:
|
|
||||||
- ${CC} --version ; ${CXX} --version
|
|
||||||
- env DEB_BUILD_OPTIONS="parallel=4" debian/autobake-deb.sh;
|
|
||||||
# Until OSX becomes a bit more stable: MDEV-12435 MDEV-16213
|
|
||||||
allow_failures:
|
|
||||||
- os: osx
|
|
||||||
compiler: clang
|
|
||||||
env: CC_VERSION=6 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=rpl
|
|
||||||
- os: osx
|
|
||||||
compiler: clang
|
|
||||||
env: CC_VERSION=6 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=main
|
|
||||||
- os: osx
|
|
||||||
compiler: clang
|
|
||||||
env: CC_VERSION=6 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=archive,optimizer_unfixed_bugs,parts,sys_vars,unit,vcol,innodb,innodb_gis,innodb_zip,innodb_fts
|
|
||||||
- os: osx
|
|
||||||
compiler: clang
|
|
||||||
env: CC_VERSION=7 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=binlog,binlog_encryption,encryption
|
|
||||||
- os: osx
|
|
||||||
compiler: clang
|
|
||||||
env: CC_VERSION=7 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=rocksdb,versioning
|
|
||||||
- os: osx
|
|
||||||
compiler: clang
|
|
||||||
env: CC_VERSION=7 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=csv,federated,funcs_1,funcs_2,gcol,handler,heap,json,maria,perfschema,plugins,multi_source,roles
|
|
||||||
|
|
||||||
addons:
|
|
||||||
apt:
|
|
||||||
sources:
|
|
||||||
- ubuntu-toolchain-r-test
|
|
||||||
- llvm-toolchain-xenial-6.0
|
|
||||||
- llvm-toolchain-xenial-7
|
|
||||||
- sourceline: 'deb [arch=amd64,arm64,i386,ppc64el] http://ftp.osuosl.org/pub/mariadb/repo/10.4/ubuntu xenial main'
|
|
||||||
key_url: 'http://keyserver.ubuntu.com/pks/lookup?search=0xF1656F24C74CD1D8&op=get'
|
|
||||||
packages: # make sure these include all compilers and all build dependencies (see list above)
|
|
||||||
- gcc-6
|
|
||||||
- g++-6
|
|
||||||
- gcc-7
|
|
||||||
- g++-7
|
|
||||||
- gcc-8
|
|
||||||
- g++-8
|
|
||||||
- clang-6.0
|
|
||||||
- llvm-6.0-dev
|
|
||||||
- clang-7
|
|
||||||
- llvm-7-dev
|
|
||||||
- bison
|
|
||||||
- chrpath
|
|
||||||
- cmake
|
|
||||||
- gdb
|
|
||||||
- galera-4
|
|
||||||
- libaio-dev
|
|
||||||
- libboost-dev
|
|
||||||
- libcurl3-dev
|
|
||||||
- libdbd-mysql
|
|
||||||
- libjudy-dev
|
|
||||||
- libncurses5-dev
|
|
||||||
- libpam0g-dev
|
|
||||||
- libpcre3-dev
|
|
||||||
- libreadline-gplv2-dev
|
|
||||||
- libstemmer-dev
|
|
||||||
- libssl-dev
|
|
||||||
- libnuma-dev
|
|
||||||
- libxml2-dev
|
|
||||||
- lsb-release
|
|
||||||
- perl
|
|
||||||
- psmisc
|
|
||||||
- zlib1g-dev
|
|
||||||
- libcrack2-dev
|
|
||||||
- cracklib-runtime
|
|
||||||
- libjemalloc-dev
|
|
||||||
- libsnappy-dev
|
|
||||||
- liblzma-dev
|
|
||||||
- libzmq-dev
|
|
||||||
- uuid-dev
|
|
||||||
|
|
||||||
# libsystemd-daemon-dev # https://github.com/travis-ci/apt-package-whitelist/issues/3882
|
|
||||||
|
|
||||||
before_install:
|
|
||||||
- if [[ "${TRAVIS_OS_NAME}" == 'osx' ]]; then
|
|
||||||
brew update;
|
|
||||||
brew install gnutls lz4 lzo xz snappy ccache jemalloc curl ossp-uuid pcre zstd;
|
|
||||||
brew link ccache;
|
|
||||||
export PATH="/usr/local/opt/ccache/libexec:$PATH";
|
|
||||||
fi
|
|
||||||
|
|
||||||
before_script:
|
|
||||||
- df -h
|
|
||||||
- ccache --version
|
|
||||||
- ccache --show-stats
|
|
||||||
- ccache --max-size=5G
|
|
||||||
|
|
||||||
script:
|
|
||||||
# following modules are disabled after sourcing .travis.compiler.sh:
|
|
||||||
# clang disabled: mroonga just generates too many warnings with clang and travis stops the job
|
|
||||||
# cland disabled: tokudb has fatal warnings
|
|
||||||
# gcc/rpl: tokudb and mroonga
|
|
||||||
- source .travis.compiler.sh
|
|
||||||
- cmake .
|
|
||||||
-DCMAKE_BUILD_TYPE=${TYPE}
|
|
||||||
${CMAKE_OPT}
|
|
||||||
-DWITH_SSL=system -DWITH_ZLIB=system
|
|
||||||
- make -j 4
|
|
||||||
- cd mysql-test
|
|
||||||
- travis_wait 30 ./mtr --force --max-test-fail=20 --parallel=4 --testcase-timeout=${TEST_CASE_TIMEOUT}
|
|
||||||
--suite=${MYSQL_TEST_SUITES}
|
|
||||||
--skip-test-list=unstable-tests
|
|
||||||
--skip-test=binlog.binlog_unsafe
|
|
||||||
|
|
||||||
after_script:
|
|
||||||
- ccache --show-stats
|
|
||||||
- df -h
|
|
||||||
|
|
||||||
notifications:
|
|
||||||
irc:
|
|
||||||
channels:
|
|
||||||
- "chat.freenode.net#maria"
|
|
||||||
on_success: never # [always|never|change]
|
|
||||||
on_failure: never
|
|
||||||
template:
|
|
||||||
- "%{repository}/%{branch} (%{commit} - %{author}): %{build_url}: %{message}"
|
|
|
@ -2747,6 +2747,9 @@ static uint dump_routines_for_db(char *db)
|
||||||
create_caption_xml[i]);
|
create_caption_xml[i]);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
switch_sql_mode(sql_file, ";", row[1]);
|
||||||
|
|
||||||
if (opt_drop)
|
if (opt_drop)
|
||||||
fprintf(sql_file, "/*!50003 DROP %s IF EXISTS %s */;\n",
|
fprintf(sql_file, "/*!50003 DROP %s IF EXISTS %s */;\n",
|
||||||
routine_type[i], routine_name);
|
routine_type[i], routine_name);
|
||||||
|
@ -2786,9 +2789,6 @@ static uint dump_routines_for_db(char *db)
|
||||||
"--\n");
|
"--\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
switch_sql_mode(sql_file, ";", row[1]);
|
|
||||||
|
|
||||||
fprintf(sql_file,
|
fprintf(sql_file,
|
||||||
"DELIMITER ;;\n"
|
"DELIMITER ;;\n"
|
||||||
"%s ;;\n"
|
"%s ;;\n"
|
||||||
|
@ -5219,6 +5219,55 @@ int init_dumping_views(char *qdatabase __attribute__((unused)))
|
||||||
} /* init_dumping_views */
|
} /* init_dumping_views */
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
mysql specific database initialization.
|
||||||
|
|
||||||
|
SYNOPSIS
|
||||||
|
init_dumping_mysql_tables
|
||||||
|
|
||||||
|
protections around dumping general/slow query log
|
||||||
|
qdatabase quoted name of the "mysql" database
|
||||||
|
|
||||||
|
RETURN VALUES
|
||||||
|
0 Success.
|
||||||
|
1 Failure.
|
||||||
|
*/
|
||||||
|
static int init_dumping_mysql_tables(char *qdatabase)
|
||||||
|
{
|
||||||
|
DBUG_ENTER("init_dumping_mysql_tables");
|
||||||
|
|
||||||
|
if (opt_drop_database)
|
||||||
|
fprintf(md_result_file,
|
||||||
|
"\n/*!50106 SET @save_log_output=@@LOG_OUTPUT*/;\n"
|
||||||
|
"/*M!100203 EXECUTE IMMEDIATE IF(@@LOG_OUTPUT='TABLE' AND (@@SLOW_QUERY_LOG=1 OR @@GENERAL_LOG=1),"
|
||||||
|
"\"SET GLOBAL LOG_OUTPUT='NONE'\", \"DO 0\") */;\n");
|
||||||
|
|
||||||
|
DBUG_RETURN(init_dumping_tables(qdatabase));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void dump_first_mysql_tables(char *database)
|
||||||
|
{
|
||||||
|
char table_type[NAME_LEN];
|
||||||
|
char ignore_flag;
|
||||||
|
DBUG_ENTER("dump_first_mysql_tables");
|
||||||
|
|
||||||
|
if (!get_table_structure((char *) "general_log",
|
||||||
|
database, table_type, &ignore_flag) )
|
||||||
|
verbose_msg("-- Warning: get_table_structure() failed with some internal "
|
||||||
|
"error for 'general_log' table\n");
|
||||||
|
if (!get_table_structure((char *) "slow_log",
|
||||||
|
database, table_type, &ignore_flag) )
|
||||||
|
verbose_msg("-- Warning: get_table_structure() failed with some internal "
|
||||||
|
"error for 'slow_log' table\n");
|
||||||
|
/* general and slow query logs exist now */
|
||||||
|
if (opt_drop_database)
|
||||||
|
fprintf(md_result_file,
|
||||||
|
"\n/*!50106 SET GLOBAL LOG_OUTPUT=@save_log_output*/;\n\n");
|
||||||
|
DBUG_VOID_RETURN;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Table Specific database initialization.
|
Table Specific database initialization.
|
||||||
|
|
||||||
|
@ -5325,7 +5374,6 @@ static int dump_all_tables_in_db(char *database)
|
||||||
char table_buff[NAME_LEN*2+3];
|
char table_buff[NAME_LEN*2+3];
|
||||||
char hash_key[2*NAME_LEN+2]; /* "db.tablename" */
|
char hash_key[2*NAME_LEN+2]; /* "db.tablename" */
|
||||||
char *afterdot;
|
char *afterdot;
|
||||||
my_bool general_log_table_exists= 0, slow_log_table_exists=0;
|
|
||||||
my_bool transaction_registry_table_exists= 0;
|
my_bool transaction_registry_table_exists= 0;
|
||||||
int using_mysql_db= !my_strcasecmp(charset_info, database, "mysql");
|
int using_mysql_db= !my_strcasecmp(charset_info, database, "mysql");
|
||||||
DBUG_ENTER("dump_all_tables_in_db");
|
DBUG_ENTER("dump_all_tables_in_db");
|
||||||
|
@ -5333,11 +5381,15 @@ static int dump_all_tables_in_db(char *database)
|
||||||
afterdot= strmov(hash_key, database);
|
afterdot= strmov(hash_key, database);
|
||||||
*afterdot++= '.';
|
*afterdot++= '.';
|
||||||
|
|
||||||
if (init_dumping(database, init_dumping_tables))
|
if (init_dumping(database, using_mysql_db ? init_dumping_mysql_tables
|
||||||
|
: init_dumping_tables))
|
||||||
DBUG_RETURN(1);
|
DBUG_RETURN(1);
|
||||||
if (opt_xml)
|
if (opt_xml)
|
||||||
print_xml_tag(md_result_file, "", "\n", "database", "name=", database, NullS);
|
print_xml_tag(md_result_file, "", "\n", "database", "name=", database, NullS);
|
||||||
|
|
||||||
|
if (using_mysql_db)
|
||||||
|
dump_first_mysql_tables(database);
|
||||||
|
|
||||||
if (lock_tables)
|
if (lock_tables)
|
||||||
{
|
{
|
||||||
DYNAMIC_STRING query;
|
DYNAMIC_STRING query;
|
||||||
|
@ -5426,24 +5478,16 @@ static int dump_all_tables_in_db(char *database)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
If general_log and slow_log exists in the 'mysql' database,
|
If transaction_registry exists in the 'mysql' database,
|
||||||
we should dump the table structure. But we cannot
|
we should dump the table structure. But we cannot
|
||||||
call get_table_structure() here as 'LOCK TABLES' query got executed
|
call get_table_structure() here as 'LOCK TABLES' query got executed
|
||||||
above on the session and that 'LOCK TABLES' query does not contain
|
above on the session and that 'LOCK TABLES' query does not contain
|
||||||
'general_log' and 'slow_log' tables. (you cannot acquire lock
|
'transaction_registry'. Hence mark the existence of the table here and
|
||||||
on log tables). Hence mark the existence of these log tables here and
|
|
||||||
after 'UNLOCK TABLES' query is executed on the session, get the table
|
after 'UNLOCK TABLES' query is executed on the session, get the table
|
||||||
structure from server and dump it in the file.
|
structure from server and dump it in the file.
|
||||||
*/
|
*/
|
||||||
if (using_mysql_db)
|
if (using_mysql_db && !my_strcasecmp(charset_info, table, "transaction_registry"))
|
||||||
{
|
transaction_registry_table_exists= 1;
|
||||||
if (!my_strcasecmp(charset_info, table, "general_log"))
|
|
||||||
general_log_table_exists= 1;
|
|
||||||
else if (!my_strcasecmp(charset_info, table, "slow_log"))
|
|
||||||
slow_log_table_exists= 1;
|
|
||||||
else if (!my_strcasecmp(charset_info, table, "transaction_registry"))
|
|
||||||
transaction_registry_table_exists= 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5464,39 +5508,25 @@ static int dump_all_tables_in_db(char *database)
|
||||||
DBUG_PRINT("info", ("Dumping routines for database %s", database));
|
DBUG_PRINT("info", ("Dumping routines for database %s", database));
|
||||||
dump_routines_for_db(database);
|
dump_routines_for_db(database);
|
||||||
}
|
}
|
||||||
if (opt_xml)
|
|
||||||
{
|
|
||||||
fputs("</database>\n", md_result_file);
|
|
||||||
check_io(md_result_file);
|
|
||||||
}
|
|
||||||
if (lock_tables)
|
if (lock_tables)
|
||||||
(void) mysql_query_with_error_report(mysql, 0, "UNLOCK TABLES");
|
(void) mysql_query_with_error_report(mysql, 0, "UNLOCK TABLES");
|
||||||
if (using_mysql_db)
|
if (using_mysql_db)
|
||||||
{
|
{
|
||||||
char table_type[NAME_LEN];
|
|
||||||
char ignore_flag;
|
|
||||||
if (general_log_table_exists)
|
|
||||||
{
|
|
||||||
if (!get_table_structure((char *) "general_log",
|
|
||||||
database, table_type, &ignore_flag) )
|
|
||||||
verbose_msg("-- Warning: get_table_structure() failed with some internal "
|
|
||||||
"error for 'general_log' table\n");
|
|
||||||
}
|
|
||||||
if (slow_log_table_exists)
|
|
||||||
{
|
|
||||||
if (!get_table_structure((char *) "slow_log",
|
|
||||||
database, table_type, &ignore_flag) )
|
|
||||||
verbose_msg("-- Warning: get_table_structure() failed with some internal "
|
|
||||||
"error for 'slow_log' table\n");
|
|
||||||
}
|
|
||||||
if (transaction_registry_table_exists)
|
if (transaction_registry_table_exists)
|
||||||
{
|
{
|
||||||
|
char table_type[NAME_LEN];
|
||||||
|
char ignore_flag;
|
||||||
if (!get_table_structure((char *) "transaction_registry",
|
if (!get_table_structure((char *) "transaction_registry",
|
||||||
database, table_type, &ignore_flag) )
|
database, table_type, &ignore_flag) )
|
||||||
verbose_msg("-- Warning: get_table_structure() failed with some internal "
|
verbose_msg("-- Warning: get_table_structure() failed with some internal "
|
||||||
"error for 'transaction_registry' table\n");
|
"error for 'transaction_registry' table\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (opt_xml)
|
||||||
|
{
|
||||||
|
fputs("</database>\n", md_result_file);
|
||||||
|
check_io(md_result_file);
|
||||||
|
}
|
||||||
if (flush_privileges && using_mysql_db)
|
if (flush_privileges && using_mysql_db)
|
||||||
{
|
{
|
||||||
fprintf(md_result_file,"\n--\n-- Flush Grant Tables \n--\n");
|
fprintf(md_result_file,"\n--\n-- Flush Grant Tables \n--\n");
|
||||||
|
|
|
@ -565,3 +565,5 @@
|
||||||
#endif // !defined(__STDC_FORMAT_MACROS)
|
#endif // !defined(__STDC_FORMAT_MACROS)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#cmakedefine HAVE_VFORK 1
|
||||||
|
|
|
@ -989,3 +989,19 @@ IF(NOT MSVC)
|
||||||
HAVE_FALLOC_PUNCH_HOLE_AND_KEEP_SIZE
|
HAVE_FALLOC_PUNCH_HOLE_AND_KEEP_SIZE
|
||||||
)
|
)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
MY_CHECK_C_COMPILER_FLAG("-Werror")
|
||||||
|
IF(have_C__Werror)
|
||||||
|
SET(SAVE_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
|
||||||
|
SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Werror")
|
||||||
|
CHECK_C_SOURCE_COMPILES("
|
||||||
|
#include <unistd.h>
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
pid_t pid=vfork();
|
||||||
|
return (int)pid;
|
||||||
|
}"
|
||||||
|
HAVE_VFORK
|
||||||
|
)
|
||||||
|
SET(CMAKE_REQUIRED_FLAGS ${SAVE_CMAKE_REQUIRED_FLAGS})
|
||||||
|
ENDIF()
|
||||||
|
|
2
debian/additions/debian-start
vendored
2
debian/additions/debian-start
vendored
|
@ -16,7 +16,7 @@ fi
|
||||||
MYSQL="/usr/bin/mysql --defaults-file=/etc/mysql/debian.cnf"
|
MYSQL="/usr/bin/mysql --defaults-file=/etc/mysql/debian.cnf"
|
||||||
MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf"
|
MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf"
|
||||||
# Don't run full mysql_upgrade on every server restart, use --version-check to do it only once
|
# Don't run full mysql_upgrade on every server restart, use --version-check to do it only once
|
||||||
MYUPGRADE="/usr/bin/mysql_upgrade --defaults-extra-file=/etc/mysql/debian.cnf --version-check"
|
MYUPGRADE="/usr/bin/mysql_upgrade --defaults-extra-file=/etc/mysql/debian.cnf --version-check --silent"
|
||||||
MYCHECK="/usr/bin/mysqlcheck --defaults-file=/etc/mysql/debian.cnf"
|
MYCHECK="/usr/bin/mysqlcheck --defaults-file=/etc/mysql/debian.cnf"
|
||||||
MYCHECK_SUBJECT="WARNING: mysqlcheck has found corrupt tables"
|
MYCHECK_SUBJECT="WARNING: mysqlcheck has found corrupt tables"
|
||||||
MYCHECK_PARAMS="--all-databases --fast --silent"
|
MYCHECK_PARAMS="--all-databases --fast --silent"
|
||||||
|
|
5
debian/mariadb-server-10.4.postrm
vendored
5
debian/mariadb-server-10.4.postrm
vendored
|
@ -11,6 +11,11 @@ MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf"
|
||||||
# do it himself. No database directories should be removed while the server
|
# do it himself. No database directories should be removed while the server
|
||||||
# is running!
|
# is running!
|
||||||
stop_server() {
|
stop_server() {
|
||||||
|
# Return immediately if there are no mysql processes running
|
||||||
|
# as there is no point in trying to shutdown in that case.
|
||||||
|
# Compatibility with versions that ran 'mariadbd'
|
||||||
|
if ! pgrep -x --nslist pid --ns $$ "mysqld|mariadbd" > /dev/null; then return; fi
|
||||||
|
|
||||||
set +e
|
set +e
|
||||||
systemctl stop mysql
|
systemctl stop mysql
|
||||||
errno=$?
|
errno=$?
|
||||||
|
|
6
debian/mariadb-server-10.4.preinst
vendored
6
debian/mariadb-server-10.4.preinst
vendored
|
@ -20,9 +20,11 @@ mysql_upgradedir=/var/lib/mysql-upgrade
|
||||||
# do it himself. No database directories should be removed while the server
|
# do it himself. No database directories should be removed while the server
|
||||||
# is running! Another mysqld in e.g. a different chroot is fine for us.
|
# is running! Another mysqld in e.g. a different chroot is fine for us.
|
||||||
stop_server() {
|
stop_server() {
|
||||||
# Return immediately if there are no mysql processes running
|
# Return immediately if there are no mysql processes running on a host
|
||||||
|
# (leave containerized processes with the same name in other namespaces)
|
||||||
# as there is no point in trying to shutdown in that case.
|
# as there is no point in trying to shutdown in that case.
|
||||||
if ! pgrep -x --ns $$ mysqld > /dev/null; then return; fi
|
# Compatibility with versions that ran 'mariadbd'
|
||||||
|
if ! pgrep -x --nslist pid --ns $$ "mysqld|mariadbd" > /dev/null; then return; fi
|
||||||
|
|
||||||
set +e
|
set +e
|
||||||
systemctl stop mysql
|
systemctl stop mysql
|
||||||
|
|
|
@ -266,7 +266,8 @@ free_mysql_variables(mysql_variable *vars)
|
||||||
|
|
||||||
static
|
static
|
||||||
char *
|
char *
|
||||||
read_mysql_one_value(MYSQL *connection, const char *query)
|
read_mysql_one_value(MYSQL *connection, const char *query,
|
||||||
|
uint column, uint expect_columns)
|
||||||
{
|
{
|
||||||
MYSQL_RES *mysql_result;
|
MYSQL_RES *mysql_result;
|
||||||
MYSQL_ROW row;
|
MYSQL_ROW row;
|
||||||
|
@ -274,10 +275,10 @@ read_mysql_one_value(MYSQL *connection, const char *query)
|
||||||
|
|
||||||
mysql_result = xb_mysql_query(connection, query, true);
|
mysql_result = xb_mysql_query(connection, query, true);
|
||||||
|
|
||||||
ut_ad(mysql_num_fields(mysql_result) == 1);
|
ut_ad(mysql_num_fields(mysql_result) == expect_columns);
|
||||||
|
|
||||||
if ((row = mysql_fetch_row(mysql_result))) {
|
if ((row = mysql_fetch_row(mysql_result))) {
|
||||||
result = strdup(row[0]);
|
result = strdup(row[column]);
|
||||||
}
|
}
|
||||||
|
|
||||||
mysql_free_result(mysql_result);
|
mysql_free_result(mysql_result);
|
||||||
|
@ -285,6 +286,15 @@ read_mysql_one_value(MYSQL *connection, const char *query)
|
||||||
return(result);
|
return(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static
|
||||||
|
char *
|
||||||
|
read_mysql_one_value(MYSQL *mysql, const char *query)
|
||||||
|
{
|
||||||
|
return read_mysql_one_value(mysql, query, 0/*offset*/, 1/*total columns*/);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static
|
static
|
||||||
bool
|
bool
|
||||||
check_server_version(unsigned long version_number,
|
check_server_version(unsigned long version_number,
|
||||||
|
@ -1087,92 +1097,322 @@ cleanup:
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
class Var
|
||||||
|
{
|
||||||
|
const char *m_name;
|
||||||
|
char *m_value;
|
||||||
|
/*
|
||||||
|
Disable copying constructors for safety, as the default binary copying
|
||||||
|
which would be wrong. If we ever want them, the m_value
|
||||||
|
member should be copied using an strdup()-alike function.
|
||||||
|
*/
|
||||||
|
Var(const Var &); // Disabled
|
||||||
|
Var(Var &); // Disabled
|
||||||
|
public:
|
||||||
|
~Var()
|
||||||
|
{
|
||||||
|
free(m_value);
|
||||||
|
}
|
||||||
|
Var(const char *name)
|
||||||
|
:m_name(name),
|
||||||
|
m_value(NULL)
|
||||||
|
{ }
|
||||||
|
// Init using a SHOW VARIABLES LIKE 'name' query
|
||||||
|
Var(const char *name, MYSQL *mysql)
|
||||||
|
:m_name(name)
|
||||||
|
{
|
||||||
|
char buf[128];
|
||||||
|
my_snprintf(buf, sizeof(buf), "SHOW VARIABLES LIKE '%s'", m_name);
|
||||||
|
m_value= read_mysql_one_value(mysql, buf, 1/*offset*/, 2/*total columns*/);
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
Init by name from a result set.
|
||||||
|
If the variable name is not found in the result set metadata field names,
|
||||||
|
it's value stays untouched.
|
||||||
|
*/
|
||||||
|
bool init(MYSQL_RES *mysql_result, MYSQL_ROW row)
|
||||||
|
{
|
||||||
|
MYSQL_FIELD *field= mysql_fetch_fields(mysql_result);
|
||||||
|
for (uint i= 0; i < mysql_num_fields(mysql_result); i++)
|
||||||
|
{
|
||||||
|
if (!strcmp(field[i].name, m_name))
|
||||||
|
{
|
||||||
|
free(m_value); // In case it was initialized earlier
|
||||||
|
m_value= row[i] ? strdup(row[i]) : NULL;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
void replace(char from, char to)
|
||||||
|
{
|
||||||
|
ut_ad(m_value);
|
||||||
|
for (char *ptr= strchr(m_value, from); ptr; ptr= strchr(ptr, from))
|
||||||
|
*ptr= to;
|
||||||
|
}
|
||||||
|
|
||||||
|
const char *value() const { return m_value; }
|
||||||
|
bool eq_value(const char *str, size_t length) const
|
||||||
|
{
|
||||||
|
return m_value && !strncmp(m_value, str, length) && m_value[length] == '\0';
|
||||||
|
}
|
||||||
|
bool is_null_or_empty() const { return !m_value || !m_value[0]; }
|
||||||
|
bool print(String *to) const
|
||||||
|
{
|
||||||
|
ut_ad(m_value);
|
||||||
|
return to->append(m_value);
|
||||||
|
}
|
||||||
|
bool print_quoted(String *to) const
|
||||||
|
{
|
||||||
|
ut_ad(m_value);
|
||||||
|
return to->append("'") || to->append(m_value) || to->append("'");
|
||||||
|
}
|
||||||
|
bool print_set_global(String *to) const
|
||||||
|
{
|
||||||
|
ut_ad(m_value);
|
||||||
|
return
|
||||||
|
to->append("SET GLOBAL ") ||
|
||||||
|
to->append(m_name) ||
|
||||||
|
to->append(" = '") ||
|
||||||
|
to->append(m_value) ||
|
||||||
|
to->append("';\n");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class Show_slave_status
|
||||||
|
{
|
||||||
|
Var m_mariadb_connection_name; // MariaDB: e.g. 'master1'
|
||||||
|
Var m_master; // e.g. 'localhost'
|
||||||
|
Var m_filename; // e.g. 'source-bin.000002'
|
||||||
|
Var m_position; // a number
|
||||||
|
Var m_mysql_gtid_executed; // MySQL56: e.g. single '<UUID>:1-5" or multiline
|
||||||
|
// '<UUID1>:1-10,\n<UUID2>:1-20\n<UUID3>:1-30'
|
||||||
|
Var m_mariadb_using_gtid; // MariaDB: 'No','Slave_Pos','Current_Pos'
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
Show_slave_status()
|
||||||
|
:m_mariadb_connection_name("Connection_name"),
|
||||||
|
m_master("Master_Host"),
|
||||||
|
m_filename("Relay_Master_Log_File"),
|
||||||
|
m_position("Exec_Master_Log_Pos"),
|
||||||
|
m_mysql_gtid_executed("Executed_Gtid_Set"),
|
||||||
|
m_mariadb_using_gtid("Using_Gtid")
|
||||||
|
{ }
|
||||||
|
|
||||||
|
void init(MYSQL_RES *res, MYSQL_ROW row)
|
||||||
|
{
|
||||||
|
m_mariadb_connection_name.init(res, row);
|
||||||
|
m_master.init(res, row);
|
||||||
|
m_filename.init(res, row);
|
||||||
|
m_position.init(res, row);
|
||||||
|
m_mysql_gtid_executed.init(res, row);
|
||||||
|
m_mariadb_using_gtid.init(res, row);
|
||||||
|
// Normalize
|
||||||
|
if (m_mysql_gtid_executed.value())
|
||||||
|
m_mysql_gtid_executed.replace('\n', ' ');
|
||||||
|
}
|
||||||
|
|
||||||
|
static void msg_is_not_slave()
|
||||||
|
{
|
||||||
|
msg("Failed to get master binlog coordinates "
|
||||||
|
"from SHOW SLAVE STATUS.This means that the server is not a "
|
||||||
|
"replication slave. Ignoring the --slave-info option");
|
||||||
|
}
|
||||||
|
|
||||||
|
bool is_mariadb_using_gtid() const
|
||||||
|
{
|
||||||
|
return !m_mariadb_using_gtid.eq_value("No", 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool start_comment_chunk(String *to)
|
||||||
|
{
|
||||||
|
return to->length() ? to->append("; ") : false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool print_connection_name_if_set(String *to) const
|
||||||
|
{
|
||||||
|
if (!m_mariadb_connection_name.is_null_or_empty())
|
||||||
|
return m_mariadb_connection_name.print_quoted(to) || to->append(' ');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool print_comment_master_identity(String *comment) const
|
||||||
|
{
|
||||||
|
if (comment->append("master "))
|
||||||
|
return true;
|
||||||
|
if (!m_mariadb_connection_name.is_null_or_empty())
|
||||||
|
return m_mariadb_connection_name.print_quoted(comment);
|
||||||
|
return comment->append("''"); // Default not named master
|
||||||
|
}
|
||||||
|
|
||||||
|
bool print_using_master_log_pos(String *sql, String *comment) const
|
||||||
|
{
|
||||||
|
return
|
||||||
|
sql->append("CHANGE MASTER ") ||
|
||||||
|
print_connection_name_if_set(sql) ||
|
||||||
|
sql->append("TO MASTER_LOG_FILE=") || m_filename.print_quoted(sql) ||
|
||||||
|
sql->append(", MASTER_LOG_POS=") || m_position.print(sql) ||
|
||||||
|
sql->append(";\n") ||
|
||||||
|
print_comment_master_identity(comment) ||
|
||||||
|
comment->append(" filename ") || m_filename.print_quoted(comment) ||
|
||||||
|
comment->append(" position ") || m_position.print_quoted(comment);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool print_mysql56(String *sql, String *comment) const
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
SET @@GLOBAL.gtid_purged = '2174B383-5441-11E8-B90A-C80AA9429562:1-1029, '
|
||||||
|
'224DA167-0C0C-11E8-8442-00059A3C7B00:1-2695';
|
||||||
|
CHANGE MASTER TO MASTER_AUTO_POSITION=1;
|
||||||
|
*/
|
||||||
|
return
|
||||||
|
sql->append("SET GLOBAL gtid_purged=") ||
|
||||||
|
m_mysql_gtid_executed.print_quoted(sql) ||
|
||||||
|
sql->append(";\n") ||
|
||||||
|
sql->append("CHANGE MASTER TO MASTER_AUTO_POSITION=1;\n") ||
|
||||||
|
print_comment_master_identity(comment) ||
|
||||||
|
comment->append(" purge list ") ||
|
||||||
|
m_mysql_gtid_executed.print_quoted(comment);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool print_mariadb10_using_gtid(String *sql, String *comment) const
|
||||||
|
{
|
||||||
|
return
|
||||||
|
sql->append("CHANGE MASTER ") ||
|
||||||
|
print_connection_name_if_set(sql) ||
|
||||||
|
sql->append("TO master_use_gtid = slave_pos;\n") ||
|
||||||
|
print_comment_master_identity(comment) ||
|
||||||
|
comment->append(" master_use_gtid = slave_pos");
|
||||||
|
}
|
||||||
|
|
||||||
|
bool print(String *sql, String *comment, const Var >id_slave_pos) const
|
||||||
|
{
|
||||||
|
if (!m_mysql_gtid_executed.is_null_or_empty())
|
||||||
|
{
|
||||||
|
/* MySQL >= 5.6 with GTID enabled */
|
||||||
|
return print_mysql56(sql, comment);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!gtid_slave_pos.is_null_or_empty() && is_mariadb_using_gtid())
|
||||||
|
{
|
||||||
|
/* MariaDB >= 10.0 with GTID enabled */
|
||||||
|
return print_mariadb10_using_gtid(sql, comment);
|
||||||
|
}
|
||||||
|
|
||||||
|
return print_using_master_log_pos(sql, comment);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Get master info into strings "sql" and "comment" from a MYSQL_RES.
|
||||||
|
@return false on success
|
||||||
|
@return true on error
|
||||||
|
*/
|
||||||
|
static bool get_slave_info(MYSQL_RES *show_slave_info_result,
|
||||||
|
const Var >id_slave_pos,
|
||||||
|
String *sql, String *comment)
|
||||||
|
{
|
||||||
|
if (!gtid_slave_pos.is_null_or_empty())
|
||||||
|
{
|
||||||
|
// Print gtid_slave_pos if any of the masters really needs it.
|
||||||
|
while (MYSQL_ROW row= mysql_fetch_row(show_slave_info_result))
|
||||||
|
{
|
||||||
|
Show_slave_status status;
|
||||||
|
status.init(show_slave_info_result, row);
|
||||||
|
if (status.is_mariadb_using_gtid())
|
||||||
|
{
|
||||||
|
if (gtid_slave_pos.print_set_global(sql) ||
|
||||||
|
comment->append("gtid_slave_pos ") ||
|
||||||
|
gtid_slave_pos.print_quoted(comment))
|
||||||
|
return true; // Error
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Print the list of masters
|
||||||
|
mysql_data_seek(show_slave_info_result, 0);
|
||||||
|
while (MYSQL_ROW row= mysql_fetch_row(show_slave_info_result))
|
||||||
|
{
|
||||||
|
Show_slave_status status;
|
||||||
|
status.init(show_slave_info_result, row);
|
||||||
|
if (start_comment_chunk(comment) ||
|
||||||
|
status.print(sql, comment, gtid_slave_pos))
|
||||||
|
return true; // Error
|
||||||
|
}
|
||||||
|
return false; // Success
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Get master info into strings "sql" and "comment".
|
||||||
|
@return false on success
|
||||||
|
@return true on error
|
||||||
|
*/
|
||||||
|
static bool get_slave_info(MYSQL *mysql, bool show_all_slave_status,
|
||||||
|
String *sql, String *comment)
|
||||||
|
{
|
||||||
|
bool rc= false; // Success
|
||||||
|
// gtid_slave_pos - MariaDB variable : e.g. "0-1-1" or "1-10-100,2-20-500"
|
||||||
|
Var gtid_slave_pos("gtid_slave_pos", mysql);
|
||||||
|
const char *query= show_all_slave_status ? "SHOW ALL SLAVES STATUS" :
|
||||||
|
"SHOW SLAVE STATUS";
|
||||||
|
MYSQL_RES *mysql_result= xb_mysql_query(mysql, query, true);
|
||||||
|
if (!mysql_num_rows(mysql_result))
|
||||||
|
{
|
||||||
|
msg_is_not_slave();
|
||||||
|
// Don't change rc, we still want to continue the backup
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
rc= get_slave_info(mysql_result, gtid_slave_pos, sql, comment);
|
||||||
|
}
|
||||||
|
mysql_free_result(mysql_result);
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*********************************************************************//**
|
/*********************************************************************//**
|
||||||
Retrieves MySQL binlog position of the master server in a replication
|
Retrieves MySQL binlog position of the master server in a replication
|
||||||
setup and saves it in a file. It also saves it in mysql_slave_position
|
setup and saves it in a file. It also saves it in mysql_slave_position
|
||||||
variable. */
|
variable.
|
||||||
|
@returns false on error
|
||||||
|
@returns true on success
|
||||||
|
*/
|
||||||
bool
|
bool
|
||||||
write_slave_info(MYSQL *connection)
|
write_slave_info(MYSQL *connection)
|
||||||
{
|
{
|
||||||
char *master = NULL;
|
String sql, comment;
|
||||||
char *filename = NULL;
|
bool show_all_slaves_status= false;
|
||||||
char *gtid_executed = NULL;
|
|
||||||
char *using_gtid = NULL;
|
|
||||||
char *position = NULL;
|
|
||||||
char *gtid_slave_pos = NULL;
|
|
||||||
char *ptr;
|
|
||||||
bool result = false;
|
|
||||||
|
|
||||||
mysql_variable status[] = {
|
switch (server_flavor)
|
||||||
{"Master_Host", &master},
|
{
|
||||||
{"Relay_Master_Log_File", &filename},
|
case FLAVOR_MARIADB:
|
||||||
{"Exec_Master_Log_Pos", &position},
|
show_all_slaves_status= mysql_server_version >= 100000;
|
||||||
{"Executed_Gtid_Set", >id_executed},
|
break;
|
||||||
{"Using_Gtid", &using_gtid},
|
case FLAVOR_UNKNOWN:
|
||||||
{NULL, NULL}
|
case FLAVOR_MYSQL:
|
||||||
};
|
case FLAVOR_PERCONA_SERVER:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
mysql_variable variables[] = {
|
if (Show_slave_status::get_slave_info(connection, show_all_slaves_status,
|
||||||
{"gtid_slave_pos", >id_slave_pos},
|
&sql, &comment))
|
||||||
{NULL, NULL}
|
return false; // Error
|
||||||
};
|
|
||||||
|
|
||||||
read_mysql_variables(connection, "SHOW SLAVE STATUS", status, false);
|
if (!sql.length())
|
||||||
read_mysql_variables(connection, "SHOW VARIABLES", variables, true);
|
{
|
||||||
|
/*
|
||||||
|
SHOW [ALL] SLAVE STATUS returned no rows.
|
||||||
|
Don't create the file, but return success to continue the backup.
|
||||||
|
*/
|
||||||
|
return true; // Success
|
||||||
|
}
|
||||||
|
|
||||||
if (master == NULL || filename == NULL || position == NULL) {
|
mysql_slave_position= strdup(comment.c_ptr());
|
||||||
msg("Failed to get master binlog coordinates "
|
return backup_file_print_buf(XTRABACKUP_SLAVE_INFO, sql.ptr(), sql.length());
|
||||||
"from SHOW SLAVE STATUS.This means that the server is not a "
|
|
||||||
"replication slave. Ignoring the --slave-info option");
|
|
||||||
/* we still want to continue the backup */
|
|
||||||
result = true;
|
|
||||||
goto cleanup;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Print slave status to a file.
|
|
||||||
If GTID mode is used, construct a CHANGE MASTER statement with
|
|
||||||
MASTER_AUTO_POSITION and correct a gtid_purged value. */
|
|
||||||
if (gtid_executed != NULL && *gtid_executed) {
|
|
||||||
/* MySQL >= 5.6 with GTID enabled */
|
|
||||||
|
|
||||||
for (ptr = strchr(gtid_executed, '\n');
|
|
||||||
ptr;
|
|
||||||
ptr = strchr(ptr, '\n')) {
|
|
||||||
*ptr = ' ';
|
|
||||||
}
|
|
||||||
|
|
||||||
result = backup_file_printf(XTRABACKUP_SLAVE_INFO,
|
|
||||||
"SET GLOBAL gtid_purged='%s';\n"
|
|
||||||
"CHANGE MASTER TO MASTER_AUTO_POSITION=1\n",
|
|
||||||
gtid_executed);
|
|
||||||
|
|
||||||
ut_a(asprintf(&mysql_slave_position,
|
|
||||||
"master host '%s', purge list '%s'",
|
|
||||||
master, gtid_executed) != -1);
|
|
||||||
} else if (gtid_slave_pos && *gtid_slave_pos &&
|
|
||||||
!(using_gtid && !strncmp(using_gtid, "No", 2))) {
|
|
||||||
/* MariaDB >= 10.0 with GTID enabled */
|
|
||||||
result = backup_file_printf(XTRABACKUP_SLAVE_INFO,
|
|
||||||
"SET GLOBAL gtid_slave_pos = '%s';\n"
|
|
||||||
"CHANGE MASTER TO master_use_gtid = slave_pos\n",
|
|
||||||
gtid_slave_pos);
|
|
||||||
ut_a(asprintf(&mysql_slave_position,
|
|
||||||
"master host '%s', gtid_slave_pos %s",
|
|
||||||
master, gtid_slave_pos) != -1);
|
|
||||||
} else {
|
|
||||||
result = backup_file_printf(XTRABACKUP_SLAVE_INFO,
|
|
||||||
"CHANGE MASTER TO MASTER_LOG_FILE='%s', "
|
|
||||||
"MASTER_LOG_POS=%s\n", filename, position);
|
|
||||||
ut_a(asprintf(&mysql_slave_position,
|
|
||||||
"master host '%s', filename '%s', position '%s'",
|
|
||||||
master, filename, position) != -1);
|
|
||||||
}
|
|
||||||
|
|
||||||
cleanup:
|
|
||||||
free_mysql_variables(status);
|
|
||||||
free_mysql_variables(variables);
|
|
||||||
|
|
||||||
return(result);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -5616,11 +5616,23 @@ static ibool prepare_handle_new_files(const char *data_home_dir,
|
||||||
const char *file_name, void *arg)
|
const char *file_name, void *arg)
|
||||||
{
|
{
|
||||||
const char *dest_dir = static_cast<const char *>(arg);
|
const char *dest_dir = static_cast<const char *>(arg);
|
||||||
std::string src_path = std::string(data_home_dir) + '/' + std::string(db_name) + '/' + file_name;
|
std::string src_path = std::string(data_home_dir) + '/' + std::string(db_name) + '/';
|
||||||
/* Copy "*.new" files from incremental to base dir for incremental backup */
|
/* Copy "*.new" files from incremental to base dir for incremental backup */
|
||||||
std::string dest_path=
|
std::string dest_path=
|
||||||
dest_dir ? std::string(dest_dir) + '/' + std::string(db_name) +
|
dest_dir ? std::string(dest_dir) + '/' + std::string(db_name) +
|
||||||
'/' + file_name : src_path;
|
'/' : src_path;
|
||||||
|
|
||||||
|
/*
|
||||||
|
A CREATE DATABASE could have happened during the base mariabackup run.
|
||||||
|
In case if the current table file (e.g. `t1.new`) is from such
|
||||||
|
a new database, the database directory may not exist yet in
|
||||||
|
the base backup directory. Let's make sure to check if the directory
|
||||||
|
exists (and create if needed).
|
||||||
|
*/
|
||||||
|
if (!directory_exists(dest_path.c_str(), true/*create if not exists*/))
|
||||||
|
return FALSE;
|
||||||
|
src_path+= file_name;
|
||||||
|
dest_path+= file_name;
|
||||||
|
|
||||||
size_t index = dest_path.find(".new");
|
size_t index = dest_path.find(".new");
|
||||||
DBUG_ASSERT(index != std::string::npos);
|
DBUG_ASSERT(index != std::string::npos);
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit f6c3d9fd2af5d17db64cc996574aa312efd70fcf
|
Subproject commit ab7a81e79e4be4324a2d09d19d4f5249801ef665
|
|
@ -41,6 +41,7 @@ can be invoked several ways:
|
||||||
shell> \fBmysql_tzinfo_to_sql \fR\fB\fItz_dir\fR\fR
|
shell> \fBmysql_tzinfo_to_sql \fR\fB\fItz_dir\fR\fR
|
||||||
shell> \fBmysql_tzinfo_to_sql \fR\fB\fItz_file tz_name\fR\fR
|
shell> \fBmysql_tzinfo_to_sql \fR\fB\fItz_file tz_name\fR\fR
|
||||||
shell> \fBmysql_tzinfo_to_sql \-\-leap \fR\fB\fItz_file\fR\fR
|
shell> \fBmysql_tzinfo_to_sql \-\-leap \fR\fB\fItz_file\fR\fR
|
||||||
|
shell> \fBmysql_tzinfo_to_sql \-\-skip\-write\-binlog \fR\fB\fItz_dir\fR\fR
|
||||||
.fi
|
.fi
|
||||||
.if n \{\
|
.if n \{\
|
||||||
.RE
|
.RE
|
||||||
|
@ -100,6 +101,9 @@ shell> \fBmysql_tzinfo_to_sql \-\-leap \fR\fB\fItz_file\fR\fR\fB | mysql \-u roo
|
||||||
.RE
|
.RE
|
||||||
.\}
|
.\}
|
||||||
.PP
|
.PP
|
||||||
|
Using the \-\-skip\-write\-binlog option prevents writing of changes to the binary log or to other Galera
|
||||||
|
cluster members. This can be used with any form of running \fBmysql_tzinfo_to_sql\fR.
|
||||||
|
.PP
|
||||||
After running
|
After running
|
||||||
\fBmysql_tzinfo_to_sql\fR, it is best to restart the server so that it does not continue to use any previously cached time zone data\&.
|
\fBmysql_tzinfo_to_sql\fR, it is best to restart the server so that it does not continue to use any previously cached time zone data\&.
|
||||||
.SH "COPYRIGHT"
|
.SH "COPYRIGHT"
|
||||||
|
|
16
mysql-test/include/grep.inc
Normal file
16
mysql-test/include/grep.inc
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
# Grep file for regular expression and output to STDOUT
|
||||||
|
#
|
||||||
|
# Usage:
|
||||||
|
# --let $grep_file= /path/to/your/file
|
||||||
|
# --let $grep_regex= your_regex_string
|
||||||
|
# --source include/grep.inc
|
||||||
|
|
||||||
|
--perl
|
||||||
|
open (my $fh, "<", "$ENV{grep_file}") or die $!;
|
||||||
|
while (<$fh>)
|
||||||
|
{
|
||||||
|
/$ENV{grep_regex}/ &&
|
||||||
|
print;
|
||||||
|
}
|
||||||
|
close $fh;
|
||||||
|
EOF
|
|
@ -78,7 +78,10 @@ sub _gdb {
|
||||||
my ($tmp, $tmp_name) = tempfile();
|
my ($tmp, $tmp_name) = tempfile();
|
||||||
print $tmp
|
print $tmp
|
||||||
"bt\n",
|
"bt\n",
|
||||||
"thread apply all bt\n",
|
"set print sevenbit on\n",
|
||||||
|
"set print static-members off\n",
|
||||||
|
"set print frame-arguments all\n",
|
||||||
|
"thread apply all bt full\n",
|
||||||
"quit\n";
|
"quit\n";
|
||||||
close $tmp or die "Error closing $tmp_name: $!";
|
close $tmp or die "Error closing $tmp_name: $!";
|
||||||
|
|
||||||
|
|
|
@ -236,6 +236,66 @@ insert t1 (b) values (1);
|
||||||
ERROR 23000: CONSTRAINT `CONSTRAINT_1` failed for `test`.`t1`
|
ERROR 23000: CONSTRAINT `CONSTRAINT_1` failed for `test`.`t1`
|
||||||
drop table t1;
|
drop table t1;
|
||||||
#
|
#
|
||||||
|
# MDEV-25638 Assertion `!result' failed in convert_const_to_int
|
||||||
|
#
|
||||||
|
create table t1 (v1 bigint check (v1 not in ('x' , 'x111'))) ;
|
||||||
|
Warnings:
|
||||||
|
Warning 1292 Truncated incorrect DOUBLE value: 'x'
|
||||||
|
Warning 1292 Truncated incorrect DOUBLE value: 'x111'
|
||||||
|
select * from t1;
|
||||||
|
v1
|
||||||
|
Warnings:
|
||||||
|
Warning 1292 Truncated incorrect DOUBLE value: 'x'
|
||||||
|
Warning 1292 Truncated incorrect DOUBLE value: 'x111'
|
||||||
|
select v1 from t1;
|
||||||
|
v1
|
||||||
|
select * from t1;
|
||||||
|
v1
|
||||||
|
prepare stmt from "select * from t1";
|
||||||
|
execute stmt;
|
||||||
|
v1
|
||||||
|
execute stmt;
|
||||||
|
v1
|
||||||
|
flush tables;
|
||||||
|
select * from t1;
|
||||||
|
v1
|
||||||
|
Warnings:
|
||||||
|
Warning 1292 Truncated incorrect DOUBLE value: 'x'
|
||||||
|
Warning 1292 Truncated incorrect DOUBLE value: 'x111'
|
||||||
|
select * from t1;
|
||||||
|
v1
|
||||||
|
deallocate prepare stmt;
|
||||||
|
drop table t1;
|
||||||
|
#
|
||||||
|
# MDEV-26061 MariaDB server crash at Field::set_default
|
||||||
|
#
|
||||||
|
create table t1 (v2 date check (v1 like default (v1)), v1 date default (from_days ('x')));
|
||||||
|
Warnings:
|
||||||
|
Warning 1292 Truncated incorrect INTEGER value: 'x'
|
||||||
|
insert ignore into t1 values ( 'x' , 'x' ) ;
|
||||||
|
Warnings:
|
||||||
|
Warning 1265 Data truncated for column 'v2' at row 1
|
||||||
|
Warning 1265 Data truncated for column 'v1' at row 1
|
||||||
|
Warning 1292 Truncated incorrect INTEGER value: 'x'
|
||||||
|
drop table t1;
|
||||||
|
#
|
||||||
|
# End of 10.2 tests
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# MDEV-26061 MariaDB server crash at Field::set_default
|
||||||
|
#
|
||||||
|
create table t1 (d timestamp check (default (d) is true)) as select 1;
|
||||||
|
show create table t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`d` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() CHECK (default(`d`) is true),
|
||||||
|
`1` int(1) NOT NULL
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
drop table t1;
|
||||||
|
#
|
||||||
|
# End of 10.3 tests
|
||||||
|
#
|
||||||
|
#
|
||||||
# MDEV-24274 ALTER TABLE with CHECK CONSTRAINTS gives "Out of Memory" error
|
# MDEV-24274 ALTER TABLE with CHECK CONSTRAINTS gives "Out of Memory" error
|
||||||
#
|
#
|
||||||
create table t1 (id varchar(2), constraint id check (id regexp '[a-z]'));
|
create table t1 (id varchar(2), constraint id check (id regexp '[a-z]'));
|
||||||
|
@ -247,3 +307,6 @@ t1 CREATE TABLE `t1` (
|
||||||
CONSTRAINT `id` CHECK (`id` regexp '[a-z]')
|
CONSTRAINT `id` CHECK (`id` regexp '[a-z]')
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
#
|
||||||
|
# End of 10.4 tests
|
||||||
|
#
|
||||||
|
|
|
@ -177,6 +177,49 @@ select * from t1 where a is null;
|
||||||
insert t1 (b) values (1);
|
insert t1 (b) values (1);
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-25638 Assertion `!result' failed in convert_const_to_int
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
--enable_prepare_warnings
|
||||||
|
create table t1 (v1 bigint check (v1 not in ('x' , 'x111'))) ;
|
||||||
|
select * from t1;
|
||||||
|
select v1 from t1;
|
||||||
|
select * from t1;
|
||||||
|
prepare stmt from "select * from t1";
|
||||||
|
execute stmt;
|
||||||
|
execute stmt;
|
||||||
|
flush tables;
|
||||||
|
select * from t1;
|
||||||
|
select * from t1;
|
||||||
|
deallocate prepare stmt;
|
||||||
|
drop table t1;
|
||||||
|
--disable_prepare_warnings
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-26061 MariaDB server crash at Field::set_default
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
create table t1 (v2 date check (v1 like default (v1)), v1 date default (from_days ('x')));
|
||||||
|
insert ignore into t1 values ( 'x' , 'x' ) ;
|
||||||
|
drop table t1;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # End of 10.2 tests
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-26061 MariaDB server crash at Field::set_default
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
create table t1 (d timestamp check (default (d) is true)) as select 1;
|
||||||
|
show create table t1;
|
||||||
|
drop table t1;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # End of 10.3 tests
|
||||||
|
--echo #
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # MDEV-24274 ALTER TABLE with CHECK CONSTRAINTS gives "Out of Memory" error
|
--echo # MDEV-24274 ALTER TABLE with CHECK CONSTRAINTS gives "Out of Memory" error
|
||||||
--echo #
|
--echo #
|
||||||
|
@ -184,3 +227,7 @@ create table t1 (id varchar(2), constraint id check (id regexp '[a-z]'));
|
||||||
alter table t1 force;
|
alter table t1 force;
|
||||||
show create table t1;
|
show create table t1;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # End of 10.4 tests
|
||||||
|
--echo #
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
drop table if exists t1, t2;
|
CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
|
||||||
|
#
|
||||||
|
# Testcase for BUG#4551
|
||||||
|
#
|
||||||
CREATE TABLE t1 ( a int );
|
CREATE TABLE t1 ( a int );
|
||||||
INSERT INTO t1 VALUES (1),(2),(1);
|
INSERT INTO t1 VALUES (1),(2),(1);
|
||||||
CREATE TABLE t2 ( PRIMARY KEY (a) ) ENGINE=INNODB SELECT a FROM t1;
|
CREATE TABLE t2 ( PRIMARY KEY (a) ) ENGINE=INNODB SELECT a FROM t1;
|
||||||
|
@ -18,6 +21,20 @@ ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
|
||||||
select * from t2;
|
select * from t2;
|
||||||
ERROR 42S02: Table 'test.t2' doesn't exist
|
ERROR 42S02: Table 'test.t2' doesn't exist
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
#
|
||||||
|
# End of 4.1 tests
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# MDEV-28393 Server crashes in TABLE::mark_default_fields_for_write
|
||||||
|
#
|
||||||
|
create table t1 (a int, b text not null default '');
|
||||||
|
alter table t1 character set = utf8;
|
||||||
|
create table t2 select * from t1;
|
||||||
|
insert into t1 values (1,'');
|
||||||
|
drop table t1, t2;
|
||||||
|
#
|
||||||
|
# End of 10.2 tests
|
||||||
|
#
|
||||||
set sql_mode='ignore_bad_table_options';
|
set sql_mode='ignore_bad_table_options';
|
||||||
create table t1 (
|
create table t1 (
|
||||||
f1 int invisible,
|
f1 int invisible,
|
||||||
|
@ -39,3 +56,6 @@ t1 CREATE TABLE `t1` (
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
|
||||||
drop table t1;
|
drop table t1;
|
||||||
set sql_mode=default;
|
set sql_mode=default;
|
||||||
|
#
|
||||||
|
# End of 10.4 tests
|
||||||
|
#
|
|
@ -1,42 +1,55 @@
|
||||||
# Testcase for BUG#4551
|
# This does not work for RBR yet.
|
||||||
|
--source include/have_innodb.inc
|
||||||
|
--source include/have_binlog_format_mixed_or_statement.inc
|
||||||
|
|
||||||
|
CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Testcase for BUG#4551
|
||||||
|
--echo #
|
||||||
|
|
||||||
# The bug was that when the table was TEMPORARY, it was not deleted if
|
# The bug was that when the table was TEMPORARY, it was not deleted if
|
||||||
# the CREATE SELECT failed (the code intended too, but it actually
|
# the CREATE SELECT failed (the code intended too, but it actually
|
||||||
# didn't). And as the CREATE TEMPORARY TABLE was not written to the
|
# didn't). And as the CREATE TEMPORARY TABLE was not written to the
|
||||||
# binlog if it was a transactional table, it resulted in an
|
# binlog if it was a transactional table, it resulted in an
|
||||||
# inconsistency between binlog and the internal list of temp tables.
|
# inconsistency between binlog and the internal list of temp tables.
|
||||||
|
|
||||||
# This does not work for RBR yet.
|
|
||||||
--source include/have_binlog_format_mixed_or_statement.inc
|
|
||||||
|
|
||||||
--disable_query_log
|
|
||||||
CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
|
|
||||||
--enable_query_log
|
|
||||||
|
|
||||||
-- source include/have_innodb.inc
|
|
||||||
--disable_warnings
|
|
||||||
drop table if exists t1, t2;
|
|
||||||
--enable_warnings
|
|
||||||
CREATE TABLE t1 ( a int );
|
CREATE TABLE t1 ( a int );
|
||||||
INSERT INTO t1 VALUES (1),(2),(1);
|
INSERT INTO t1 VALUES (1),(2),(1);
|
||||||
--error ER_DUP_ENTRY
|
--error ER_DUP_ENTRY
|
||||||
CREATE TABLE t2 ( PRIMARY KEY (a) ) ENGINE=INNODB SELECT a FROM t1;
|
CREATE TABLE t2 ( PRIMARY KEY (a) ) ENGINE=INNODB SELECT a FROM t1;
|
||||||
--error 1146
|
--error ER_NO_SUCH_TABLE
|
||||||
select * from t2;
|
select * from t2;
|
||||||
--error ER_DUP_ENTRY
|
--error ER_DUP_ENTRY
|
||||||
CREATE TEMPORARY TABLE t2 ( PRIMARY KEY (a) ) ENGINE=INNODB SELECT a FROM t1;
|
CREATE TEMPORARY TABLE t2 ( PRIMARY KEY (a) ) ENGINE=INNODB SELECT a FROM t1;
|
||||||
--error 1146
|
--error ER_NO_SUCH_TABLE
|
||||||
select * from t2;
|
select * from t2;
|
||||||
--error ER_DUP_ENTRY
|
--error ER_DUP_ENTRY
|
||||||
CREATE TABLE t2 ( PRIMARY KEY (a) ) ENGINE=MYISAM SELECT a FROM t1;
|
CREATE TABLE t2 ( PRIMARY KEY (a) ) ENGINE=MYISAM SELECT a FROM t1;
|
||||||
--error 1146
|
--error ER_NO_SUCH_TABLE
|
||||||
select * from t2;
|
select * from t2;
|
||||||
--error ER_DUP_ENTRY
|
--error ER_DUP_ENTRY
|
||||||
CREATE TEMPORARY TABLE t2 ( PRIMARY KEY (a) ) ENGINE=MYISAM SELECT a FROM t1;
|
CREATE TEMPORARY TABLE t2 ( PRIMARY KEY (a) ) ENGINE=MYISAM SELECT a FROM t1;
|
||||||
--error 1146
|
--error ER_NO_SUCH_TABLE
|
||||||
select * from t2;
|
select * from t2;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
# End of 4.1 tests
|
--echo #
|
||||||
|
--echo # End of 4.1 tests
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-28393 Server crashes in TABLE::mark_default_fields_for_write
|
||||||
|
--echo #
|
||||||
|
create table t1 (a int, b text not null default '');
|
||||||
|
alter table t1 character set = utf8;
|
||||||
|
create table t2 select * from t1;
|
||||||
|
insert into t1 values (1,'');
|
||||||
|
drop table t1, t2;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # End of 10.2 tests
|
||||||
|
--echo #
|
||||||
|
|
||||||
set sql_mode='ignore_bad_table_options';
|
set sql_mode='ignore_bad_table_options';
|
||||||
create table t1 (
|
create table t1 (
|
||||||
|
@ -50,4 +63,6 @@ show create table t1;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
set sql_mode=default;
|
set sql_mode=default;
|
||||||
|
|
||||||
# End of 10.4 tests
|
--echo #
|
||||||
|
--echo # End of 10.4 tests
|
||||||
|
--echo #
|
|
@ -723,6 +723,8 @@ utf8_general_ci utf8_general_ci
|
||||||
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest1` /*!40100 DEFAULT CHARACTER SET cp866 */;
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest1` /*!40100 DEFAULT CHARACTER SET cp866 */;
|
||||||
|
|
||||||
USE `mysqltest1`;
|
USE `mysqltest1`;
|
||||||
|
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
||||||
|
/*!50003 SET sql_mode = '' */ ;
|
||||||
ALTER DATABASE `mysqltest1` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
|
ALTER DATABASE `mysqltest1` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
|
||||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||||
|
@ -730,8 +732,6 @@ ALTER DATABASE `mysqltest1` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
|
||||||
/*!50003 SET character_set_client = koi8r */ ;
|
/*!50003 SET character_set_client = koi8r */ ;
|
||||||
/*!50003 SET character_set_results = koi8r */ ;
|
/*!50003 SET character_set_results = koi8r */ ;
|
||||||
/*!50003 SET collation_connection = koi8r_general_ci */ ;
|
/*!50003 SET collation_connection = koi8r_general_ci */ ;
|
||||||
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
|
||||||
/*!50003 SET sql_mode = '' */ ;
|
|
||||||
DELIMITER ;;
|
DELIMITER ;;
|
||||||
CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`(
|
CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`(
|
||||||
INOUT ÐÁÒÁÍ1 CHAR(10),
|
INOUT ÐÁÒÁÍ1 CHAR(10),
|
||||||
|
@ -757,6 +757,8 @@ DELIMITER ;
|
||||||
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
||||||
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
||||||
ALTER DATABASE `mysqltest1` CHARACTER SET cp866 COLLATE cp866_general_ci ;
|
ALTER DATABASE `mysqltest1` CHARACTER SET cp866 COLLATE cp866_general_ci ;
|
||||||
|
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
||||||
|
/*!50003 SET sql_mode = '' */ ;
|
||||||
ALTER DATABASE `mysqltest1` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
|
ALTER DATABASE `mysqltest1` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
|
||||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||||
|
@ -764,8 +766,6 @@ ALTER DATABASE `mysqltest1` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
|
||||||
/*!50003 SET character_set_client = koi8r */ ;
|
/*!50003 SET character_set_client = koi8r */ ;
|
||||||
/*!50003 SET character_set_results = koi8r */ ;
|
/*!50003 SET character_set_results = koi8r */ ;
|
||||||
/*!50003 SET collation_connection = koi8r_general_ci */ ;
|
/*!50003 SET collation_connection = koi8r_general_ci */ ;
|
||||||
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
|
||||||
/*!50003 SET sql_mode = '' */ ;
|
|
||||||
DELIMITER ;;
|
DELIMITER ;;
|
||||||
CREATE DEFINER=`root`@`localhost` PROCEDURE `p2`(
|
CREATE DEFINER=`root`@`localhost` PROCEDURE `p2`(
|
||||||
INOUT ÐÁÒÁÍ1 CHAR(10) CHARACTER SET utf8,
|
INOUT ÐÁÒÁÍ1 CHAR(10) CHARACTER SET utf8,
|
||||||
|
@ -799,6 +799,8 @@ ALTER DATABASE `mysqltest1` CHARACTER SET cp866 COLLATE cp866_general_ci ;
|
||||||
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest2` /*!40100 DEFAULT CHARACTER SET cp866 */;
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest2` /*!40100 DEFAULT CHARACTER SET cp866 */;
|
||||||
|
|
||||||
USE `mysqltest2`;
|
USE `mysqltest2`;
|
||||||
|
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
||||||
|
/*!50003 SET sql_mode = '' */ ;
|
||||||
ALTER DATABASE `mysqltest2` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
|
ALTER DATABASE `mysqltest2` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
|
||||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||||
|
@ -806,8 +808,6 @@ ALTER DATABASE `mysqltest2` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
|
||||||
/*!50003 SET character_set_client = koi8r */ ;
|
/*!50003 SET character_set_client = koi8r */ ;
|
||||||
/*!50003 SET character_set_results = koi8r */ ;
|
/*!50003 SET character_set_results = koi8r */ ;
|
||||||
/*!50003 SET collation_connection = koi8r_general_ci */ ;
|
/*!50003 SET collation_connection = koi8r_general_ci */ ;
|
||||||
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
|
||||||
/*!50003 SET sql_mode = '' */ ;
|
|
||||||
DELIMITER ;;
|
DELIMITER ;;
|
||||||
CREATE DEFINER=`root`@`localhost` PROCEDURE `p3`(
|
CREATE DEFINER=`root`@`localhost` PROCEDURE `p3`(
|
||||||
INOUT ÐÁÒÁÍ1 CHAR(10),
|
INOUT ÐÁÒÁÍ1 CHAR(10),
|
||||||
|
@ -833,6 +833,8 @@ DELIMITER ;
|
||||||
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
||||||
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
||||||
ALTER DATABASE `mysqltest2` CHARACTER SET cp866 COLLATE cp866_general_ci ;
|
ALTER DATABASE `mysqltest2` CHARACTER SET cp866 COLLATE cp866_general_ci ;
|
||||||
|
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
||||||
|
/*!50003 SET sql_mode = '' */ ;
|
||||||
ALTER DATABASE `mysqltest2` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
|
ALTER DATABASE `mysqltest2` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
|
||||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||||
|
@ -840,8 +842,6 @@ ALTER DATABASE `mysqltest2` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
|
||||||
/*!50003 SET character_set_client = koi8r */ ;
|
/*!50003 SET character_set_client = koi8r */ ;
|
||||||
/*!50003 SET character_set_results = koi8r */ ;
|
/*!50003 SET character_set_results = koi8r */ ;
|
||||||
/*!50003 SET collation_connection = koi8r_general_ci */ ;
|
/*!50003 SET collation_connection = koi8r_general_ci */ ;
|
||||||
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
|
||||||
/*!50003 SET sql_mode = '' */ ;
|
|
||||||
DELIMITER ;;
|
DELIMITER ;;
|
||||||
CREATE DEFINER=`root`@`localhost` PROCEDURE `p4`(
|
CREATE DEFINER=`root`@`localhost` PROCEDURE `p4`(
|
||||||
INOUT ÐÁÒÁÍ1 CHAR(10) CHARACTER SET utf8,
|
INOUT ÐÁÒÁÍ1 CHAR(10) CHARACTER SET utf8,
|
||||||
|
|
|
@ -723,6 +723,8 @@ utf8_general_ci utf8_general_ci
|
||||||
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest1` /*!40100 DEFAULT CHARACTER SET cp866 */;
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest1` /*!40100 DEFAULT CHARACTER SET cp866 */;
|
||||||
|
|
||||||
USE `mysqltest1`;
|
USE `mysqltest1`;
|
||||||
|
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
||||||
|
/*!50003 SET sql_mode = '' */ ;
|
||||||
ALTER DATABASE `mysqltest1` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
|
ALTER DATABASE `mysqltest1` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
|
||||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||||
|
@ -730,8 +732,6 @@ ALTER DATABASE `mysqltest1` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
|
||||||
/*!50003 SET character_set_client = utf8 */ ;
|
/*!50003 SET character_set_client = utf8 */ ;
|
||||||
/*!50003 SET character_set_results = utf8 */ ;
|
/*!50003 SET character_set_results = utf8 */ ;
|
||||||
/*!50003 SET collation_connection = utf8_general_ci */ ;
|
/*!50003 SET collation_connection = utf8_general_ci */ ;
|
||||||
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
|
||||||
/*!50003 SET sql_mode = '' */ ;
|
|
||||||
DELIMITER ;;
|
DELIMITER ;;
|
||||||
CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`(
|
CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`(
|
||||||
INOUT парам1 CHAR(10),
|
INOUT парам1 CHAR(10),
|
||||||
|
@ -757,6 +757,8 @@ DELIMITER ;
|
||||||
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
||||||
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
||||||
ALTER DATABASE `mysqltest1` CHARACTER SET cp866 COLLATE cp866_general_ci ;
|
ALTER DATABASE `mysqltest1` CHARACTER SET cp866 COLLATE cp866_general_ci ;
|
||||||
|
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
||||||
|
/*!50003 SET sql_mode = '' */ ;
|
||||||
ALTER DATABASE `mysqltest1` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
|
ALTER DATABASE `mysqltest1` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
|
||||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||||
|
@ -764,8 +766,6 @@ ALTER DATABASE `mysqltest1` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
|
||||||
/*!50003 SET character_set_client = utf8 */ ;
|
/*!50003 SET character_set_client = utf8 */ ;
|
||||||
/*!50003 SET character_set_results = utf8 */ ;
|
/*!50003 SET character_set_results = utf8 */ ;
|
||||||
/*!50003 SET collation_connection = utf8_general_ci */ ;
|
/*!50003 SET collation_connection = utf8_general_ci */ ;
|
||||||
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
|
||||||
/*!50003 SET sql_mode = '' */ ;
|
|
||||||
DELIMITER ;;
|
DELIMITER ;;
|
||||||
CREATE DEFINER=`root`@`localhost` PROCEDURE `p2`(
|
CREATE DEFINER=`root`@`localhost` PROCEDURE `p2`(
|
||||||
INOUT парам1 CHAR(10) CHARACTER SET utf8,
|
INOUT парам1 CHAR(10) CHARACTER SET utf8,
|
||||||
|
@ -799,6 +799,8 @@ ALTER DATABASE `mysqltest1` CHARACTER SET cp866 COLLATE cp866_general_ci ;
|
||||||
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest2` /*!40100 DEFAULT CHARACTER SET cp866 */;
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest2` /*!40100 DEFAULT CHARACTER SET cp866 */;
|
||||||
|
|
||||||
USE `mysqltest2`;
|
USE `mysqltest2`;
|
||||||
|
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
||||||
|
/*!50003 SET sql_mode = '' */ ;
|
||||||
ALTER DATABASE `mysqltest2` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
|
ALTER DATABASE `mysqltest2` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
|
||||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||||
|
@ -806,8 +808,6 @@ ALTER DATABASE `mysqltest2` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
|
||||||
/*!50003 SET character_set_client = utf8 */ ;
|
/*!50003 SET character_set_client = utf8 */ ;
|
||||||
/*!50003 SET character_set_results = utf8 */ ;
|
/*!50003 SET character_set_results = utf8 */ ;
|
||||||
/*!50003 SET collation_connection = utf8_general_ci */ ;
|
/*!50003 SET collation_connection = utf8_general_ci */ ;
|
||||||
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
|
||||||
/*!50003 SET sql_mode = '' */ ;
|
|
||||||
DELIMITER ;;
|
DELIMITER ;;
|
||||||
CREATE DEFINER=`root`@`localhost` PROCEDURE `p3`(
|
CREATE DEFINER=`root`@`localhost` PROCEDURE `p3`(
|
||||||
INOUT парам1 CHAR(10),
|
INOUT парам1 CHAR(10),
|
||||||
|
@ -833,6 +833,8 @@ DELIMITER ;
|
||||||
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
||||||
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
||||||
ALTER DATABASE `mysqltest2` CHARACTER SET cp866 COLLATE cp866_general_ci ;
|
ALTER DATABASE `mysqltest2` CHARACTER SET cp866 COLLATE cp866_general_ci ;
|
||||||
|
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
||||||
|
/*!50003 SET sql_mode = '' */ ;
|
||||||
ALTER DATABASE `mysqltest2` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
|
ALTER DATABASE `mysqltest2` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
|
||||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||||
|
@ -840,8 +842,6 @@ ALTER DATABASE `mysqltest2` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
|
||||||
/*!50003 SET character_set_client = utf8 */ ;
|
/*!50003 SET character_set_client = utf8 */ ;
|
||||||
/*!50003 SET character_set_results = utf8 */ ;
|
/*!50003 SET character_set_results = utf8 */ ;
|
||||||
/*!50003 SET collation_connection = utf8_general_ci */ ;
|
/*!50003 SET collation_connection = utf8_general_ci */ ;
|
||||||
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
|
||||||
/*!50003 SET sql_mode = '' */ ;
|
|
||||||
DELIMITER ;;
|
DELIMITER ;;
|
||||||
CREATE DEFINER=`root`@`localhost` PROCEDURE `p4`(
|
CREATE DEFINER=`root`@`localhost` PROCEDURE `p4`(
|
||||||
INOUT парам1 CHAR(10) CHARACTER SET utf8,
|
INOUT парам1 CHAR(10) CHARACTER SET utf8,
|
||||||
|
|
|
@ -3395,6 +3395,33 @@ ERROR 01000: Expression for field `a` is referring to uninitialized field `a`
|
||||||
show warnings;
|
show warnings;
|
||||||
Level Code Message
|
Level Code Message
|
||||||
Error 4029 Expression for field `a` is referring to uninitialized field `a`
|
Error 4029 Expression for field `a` is referring to uninitialized field `a`
|
||||||
|
#
|
||||||
|
# MDEV-26423: MariaDB server crash in Create_tmp_table::finalize
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (pk varchar(36) DEFAULT uuid());
|
||||||
|
INSERT INTO t1 VALUES (),();
|
||||||
|
SELECT 1 FROM t1 GROUP BY DEFAULT(pk);
|
||||||
|
1
|
||||||
|
1
|
||||||
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
|
# MDEV-28402: ASAN heap-use-after-free in create_tmp_table,
|
||||||
|
# Assertion `l_offset >= 0 && table->s->rec_buff_length - l_offset > 0'
|
||||||
|
#
|
||||||
|
CREATE TABLE t (a INT, KEY (a));
|
||||||
|
INSERT INTO t VALUES (1),(2);
|
||||||
|
SELECT DISTINCT DEFAULT(a), CASE a WHEN 0 THEN 1 ELSE 2 END FROM t GROUP BY a WITH ROLLUP;
|
||||||
|
DEFAULT(a) CASE a WHEN 0 THEN 1 ELSE 2 END
|
||||||
|
NULL 2
|
||||||
|
DROP TABLE t;
|
||||||
|
CREATE TABLE t (a INT, KEY (a));
|
||||||
|
INSERT INTO t VALUES (1),(2);
|
||||||
|
CREATE ALGORITHM=TEMPTABLE VIEW v AS SELECT * FROM t;
|
||||||
|
SELECT DISTINCT DEFAULT(a), CASE a WHEN 0 THEN 1 ELSE 2 END FROM v GROUP BY a WITH ROLLUP;
|
||||||
|
DEFAULT(a) CASE a WHEN 0 THEN 1 ELSE 2 END
|
||||||
|
NULL 2
|
||||||
|
DROP TABLE t;
|
||||||
|
DROP VIEW v;
|
||||||
# end of 10.2 test
|
# end of 10.2 test
|
||||||
#
|
#
|
||||||
# MDEV-22703 DEFAULT() on a BLOB column can overwrite the default
|
# MDEV-22703 DEFAULT() on a BLOB column can overwrite the default
|
||||||
|
|
|
@ -2116,6 +2116,32 @@ DROP TABLE t1;
|
||||||
create table t1 (a int as (a));
|
create table t1 (a int as (a));
|
||||||
show warnings;
|
show warnings;
|
||||||
|
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-26423: MariaDB server crash in Create_tmp_table::finalize
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
CREATE TABLE t1 (pk varchar(36) DEFAULT uuid());
|
||||||
|
INSERT INTO t1 VALUES (),();
|
||||||
|
SELECT 1 FROM t1 GROUP BY DEFAULT(pk);
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-28402: ASAN heap-use-after-free in create_tmp_table,
|
||||||
|
--echo # Assertion `l_offset >= 0 && table->s->rec_buff_length - l_offset > 0'
|
||||||
|
--echo #
|
||||||
|
CREATE TABLE t (a INT, KEY (a));
|
||||||
|
INSERT INTO t VALUES (1),(2);
|
||||||
|
SELECT DISTINCT DEFAULT(a), CASE a WHEN 0 THEN 1 ELSE 2 END FROM t GROUP BY a WITH ROLLUP;
|
||||||
|
DROP TABLE t;
|
||||||
|
|
||||||
|
CREATE TABLE t (a INT, KEY (a));
|
||||||
|
INSERT INTO t VALUES (1),(2);
|
||||||
|
CREATE ALGORITHM=TEMPTABLE VIEW v AS SELECT * FROM t;
|
||||||
|
SELECT DISTINCT DEFAULT(a), CASE a WHEN 0 THEN 1 ELSE 2 END FROM v GROUP BY a WITH ROLLUP;
|
||||||
|
DROP TABLE t;
|
||||||
|
DROP VIEW v;
|
||||||
--echo # end of 10.2 test
|
--echo # end of 10.2 test
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
|
|
18
mysql-test/main/default_innodb.result
Normal file
18
mysql-test/main/default_innodb.result
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
#
|
||||||
|
# MDEV-26423: MariaDB server crash in Create_tmp_table::finalize
|
||||||
|
#
|
||||||
|
CREATE TABLE v0 (
|
||||||
|
v2 DATE DEFAULT ( v1 MOD 68321183.000000 ) ,
|
||||||
|
v1 DATETIME NULL ) engine=innodb;
|
||||||
|
SHOW DATABASES LIKE 'x';
|
||||||
|
Database (x)
|
||||||
|
SELECT DISTINCT v2 , v1 , DEFAULT ( v2 ) FROM v0;
|
||||||
|
v2 v1 DEFAULT ( v2 )
|
||||||
|
DROP TABLE v0;
|
||||||
|
CREATE TABLE t1 (v1 DATE, v2 DATE DEFAULT(v1)) engine=innodb;
|
||||||
|
SELECT DISTINCT DEFAULT(v2) FROM t1 ;
|
||||||
|
DEFAULT(v2)
|
||||||
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
|
# End of 10.2 tests
|
||||||
|
#
|
22
mysql-test/main/default_innodb.test
Normal file
22
mysql-test/main/default_innodb.test
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
|
||||||
|
--source include/have_innodb.inc
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-26423: MariaDB server crash in Create_tmp_table::finalize
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
CREATE TABLE v0 (
|
||||||
|
v2 DATE DEFAULT ( v1 MOD 68321183.000000 ) ,
|
||||||
|
v1 DATETIME NULL ) engine=innodb;
|
||||||
|
SHOW DATABASES LIKE 'x';
|
||||||
|
SELECT DISTINCT v2 , v1 , DEFAULT ( v2 ) FROM v0;
|
||||||
|
DROP TABLE v0;
|
||||||
|
|
||||||
|
CREATE TABLE t1 (v1 DATE, v2 DATE DEFAULT(v1)) engine=innodb;
|
||||||
|
SELECT DISTINCT DEFAULT(v2) FROM t1 ;
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # End of 10.2 tests
|
||||||
|
--echo #
|
|
@ -3630,4 +3630,64 @@ f2 f3
|
||||||
DROP PROCEDURE p1;
|
DROP PROCEDURE p1;
|
||||||
DROP VIEW v1,v2,v3;
|
DROP VIEW v1,v2,v3;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
|
# MDEV-27212: 2-nd execution of PS for select with embedded derived tables
|
||||||
|
# and correlated subquery in select list of outer derived
|
||||||
|
#
|
||||||
|
create table t1 ( id int, id2 int ) engine=myisam;
|
||||||
|
create table t2 ( x3 int , x1 int , x2 int, a1 int) engine=myisam;
|
||||||
|
insert into t1 values (3, 2), (4, 2), (3, 4);
|
||||||
|
insert into t2 values (1, 2, 2, 1), (1, 3, 3, 2), (2, 3, 3, 1);
|
||||||
|
prepare stmt from "select id from t1
|
||||||
|
join
|
||||||
|
( select dt2.x1,
|
||||||
|
( select sum(a1) from t2 where t2.x1 = dt2.x1 ) m
|
||||||
|
from ( select x1 from t2 u where x3 = 1 ) dt2
|
||||||
|
) dt
|
||||||
|
on t1.id = dt.x1
|
||||||
|
where t1.id2 < dt.m";
|
||||||
|
execute stmt;
|
||||||
|
id
|
||||||
|
3
|
||||||
|
execute stmt;
|
||||||
|
id
|
||||||
|
3
|
||||||
|
deallocate prepare stmt;
|
||||||
|
create procedure sp1() select id from t1
|
||||||
|
join
|
||||||
|
( select dt2.x1,
|
||||||
|
( select sum(a1) from t2 where t2.x1 = dt2.x1 ) m
|
||||||
|
from ( select x1 from t2 u where x3 = 1 ) dt2
|
||||||
|
) dt
|
||||||
|
on t1.id = dt.x1
|
||||||
|
where t1.id2 < dt.m;
|
||||||
|
call sp1();
|
||||||
|
id
|
||||||
|
3
|
||||||
|
call sp1();
|
||||||
|
id
|
||||||
|
3
|
||||||
|
create view v2 as select x1 from t2 u where x3 = 1;
|
||||||
|
create view v as
|
||||||
|
select v2.x1,
|
||||||
|
( select sum(a1) from t2 where t2.x1 = v2.x1 ) m from v2;
|
||||||
|
prepare stmt from "select id from t1 join v on t1.id = v.x1 where t1.id2 < v.m";
|
||||||
|
execute stmt;
|
||||||
|
id
|
||||||
|
3
|
||||||
|
execute stmt;
|
||||||
|
id
|
||||||
|
3
|
||||||
|
deallocate prepare stmt;
|
||||||
|
create procedure sp2() select id from t1 join v on t1.id = v.x1 where t1.id2 < v.m;
|
||||||
|
call sp2();
|
||||||
|
id
|
||||||
|
3
|
||||||
|
call sp2();
|
||||||
|
id
|
||||||
|
3
|
||||||
|
drop procedure sp1;
|
||||||
|
drop procedure sp2;
|
||||||
|
drop view v, v2;
|
||||||
|
drop table t1,t2;
|
||||||
# End of 10.2 tests
|
# End of 10.2 tests
|
||||||
|
|
|
@ -2400,4 +2400,56 @@ DROP PROCEDURE p1;
|
||||||
DROP VIEW v1,v2,v3;
|
DROP VIEW v1,v2,v3;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-27212: 2-nd execution of PS for select with embedded derived tables
|
||||||
|
--echo # and correlated subquery in select list of outer derived
|
||||||
|
--echo #
|
||||||
|
create table t1 ( id int, id2 int ) engine=myisam;
|
||||||
|
create table t2 ( x3 int , x1 int , x2 int, a1 int) engine=myisam;
|
||||||
|
insert into t1 values (3, 2), (4, 2), (3, 4);
|
||||||
|
insert into t2 values (1, 2, 2, 1), (1, 3, 3, 2), (2, 3, 3, 1);
|
||||||
|
|
||||||
|
let $q=
|
||||||
|
select id from t1
|
||||||
|
join
|
||||||
|
( select dt2.x1,
|
||||||
|
( select sum(a1) from t2 where t2.x1 = dt2.x1 ) m
|
||||||
|
from ( select x1 from t2 u where x3 = 1 ) dt2
|
||||||
|
) dt
|
||||||
|
on t1.id = dt.x1
|
||||||
|
where t1.id2 < dt.m;
|
||||||
|
|
||||||
|
eval prepare stmt from "$q";
|
||||||
|
execute stmt;
|
||||||
|
execute stmt;
|
||||||
|
deallocate prepare stmt;
|
||||||
|
|
||||||
|
eval create procedure sp1() $q;
|
||||||
|
call sp1();
|
||||||
|
call sp1();
|
||||||
|
|
||||||
|
create view v2 as select x1 from t2 u where x3 = 1;
|
||||||
|
create view v as
|
||||||
|
select v2.x1,
|
||||||
|
( select sum(a1) from t2 where t2.x1 = v2.x1 ) m from v2;
|
||||||
|
|
||||||
|
let $q=
|
||||||
|
select id from t1 join v on t1.id = v.x1 where t1.id2 < v.m;
|
||||||
|
|
||||||
|
eval prepare stmt from "$q";
|
||||||
|
execute stmt;
|
||||||
|
execute stmt;
|
||||||
|
deallocate prepare stmt;
|
||||||
|
|
||||||
|
eval create procedure sp2() $q;
|
||||||
|
call sp2();
|
||||||
|
call sp2();
|
||||||
|
|
||||||
|
drop procedure sp1;
|
||||||
|
drop procedure sp2;
|
||||||
|
|
||||||
|
drop view v, v2;
|
||||||
|
|
||||||
|
drop table t1,t2;
|
||||||
|
|
||||||
--echo # End of 10.2 tests
|
--echo # End of 10.2 tests
|
||||||
|
|
|
@ -159,5 +159,57 @@ a
|
||||||
10
|
10
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
#
|
#
|
||||||
|
# MDEV-21028 Server crashes in Query_arena::set_query_arena upon SELECT from view
|
||||||
|
#
|
||||||
|
create table t1 (a datetime default current_timestamp);
|
||||||
|
insert into t1 () values (),();
|
||||||
|
create algorithm=temptable view v1 as select * from t1;
|
||||||
|
create algorithm=merge view v2 as select * from t1;
|
||||||
|
select default(a) = now() from v1;
|
||||||
|
default(a) = now()
|
||||||
|
1
|
||||||
|
1
|
||||||
|
select default(a) = now() from v2;
|
||||||
|
default(a) = now()
|
||||||
|
1
|
||||||
|
1
|
||||||
|
drop view v1, v2;
|
||||||
|
drop table t1;
|
||||||
|
create table t1 (v1 timestamp) select 'x';
|
||||||
|
show create table t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`v1` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
|
||||||
|
`x` varchar(1) NOT NULL
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
select default(v1) from (select v1 from t1) dt;
|
||||||
|
default(v1)
|
||||||
|
2001-01-01 10:20:30
|
||||||
|
select default(v1) from (select v1 from t1 group by v1) dt;
|
||||||
|
default(v1)
|
||||||
|
2001-01-01 10:20:30
|
||||||
|
drop table t1;
|
||||||
|
create table t1 (a text default '');
|
||||||
|
create algorithm=temptable view v1 as select * from t1;
|
||||||
|
insert into t1 values ('a');
|
||||||
|
select default(a) from v1;
|
||||||
|
default(a)
|
||||||
|
|
||||||
|
drop view v1;
|
||||||
|
drop table t1;
|
||||||
|
#
|
||||||
|
# MDEV-28403 ASAN heap-use-after-free in String::copy / get_field_default_value
|
||||||
|
#
|
||||||
|
create table t (a blob default 'x');
|
||||||
|
create view v as select * from t;
|
||||||
|
insert into t () values ();
|
||||||
|
update t set a = default;
|
||||||
|
select table_name,column_name,column_default from information_schema.columns where table_name = 'v';
|
||||||
|
table_name v
|
||||||
|
column_name a
|
||||||
|
column_default 'x'
|
||||||
|
drop view v;
|
||||||
|
drop table t;
|
||||||
|
#
|
||||||
# End of 10.2 tests
|
# End of 10.2 tests
|
||||||
#
|
#
|
||||||
|
|
|
@ -139,6 +139,42 @@ FROM t1;
|
||||||
SELECT a FROM t1 WHERE CASE WHEN a THEN DEFAULT(a) END IS FALSE;
|
SELECT a FROM t1 WHERE CASE WHEN a THEN DEFAULT(a) END IS FALSE;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-21028 Server crashes in Query_arena::set_query_arena upon SELECT from view
|
||||||
|
--echo #
|
||||||
|
create table t1 (a datetime default current_timestamp);
|
||||||
|
insert into t1 () values (),();
|
||||||
|
create algorithm=temptable view v1 as select * from t1;
|
||||||
|
create algorithm=merge view v2 as select * from t1;
|
||||||
|
select default(a) = now() from v1;
|
||||||
|
select default(a) = now() from v2;
|
||||||
|
drop view v1, v2;
|
||||||
|
drop table t1;
|
||||||
|
|
||||||
|
create table t1 (v1 timestamp) select 'x';
|
||||||
|
show create table t1;
|
||||||
|
select default(v1) from (select v1 from t1) dt;
|
||||||
|
select default(v1) from (select v1 from t1 group by v1) dt;
|
||||||
|
drop table t1;
|
||||||
|
|
||||||
|
create table t1 (a text default '');
|
||||||
|
create algorithm=temptable view v1 as select * from t1;
|
||||||
|
insert into t1 values ('a');
|
||||||
|
select default(a) from v1;
|
||||||
|
drop view v1;
|
||||||
|
drop table t1;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-28403 ASAN heap-use-after-free in String::copy / get_field_default_value
|
||||||
|
--echo #
|
||||||
|
create table t (a blob default 'x');
|
||||||
|
create view v as select * from t;
|
||||||
|
insert into t () values ();
|
||||||
|
update t set a = default;
|
||||||
|
query_vertical select table_name,column_name,column_default from information_schema.columns where table_name = 'v';
|
||||||
|
drop view v;
|
||||||
|
drop table t;
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # End of 10.2 tests
|
--echo # End of 10.2 tests
|
||||||
--echo #
|
--echo #
|
||||||
|
|
|
@ -991,6 +991,12 @@ ADDTIME('916:40:00', '416:40:00')
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 1292 Truncated incorrect time value: '916:40:00'
|
Warning 1292 Truncated incorrect time value: '916:40:00'
|
||||||
Warning 1292 Truncated incorrect time value: '1255:39:59.999999'
|
Warning 1292 Truncated incorrect time value: '1255:39:59.999999'
|
||||||
|
SELECT ADDTIME(20010101,1e0), ADDTIME(20010101,1.1e0);
|
||||||
|
ADDTIME(20010101,1e0) ADDTIME(20010101,1.1e0)
|
||||||
|
2001-01-01 00:00:01.000000 2001-01-01 00:00:01.100000
|
||||||
|
SELECT ADDTIME(ADDTIME(20010101,1e0), 0);
|
||||||
|
ADDTIME(ADDTIME(20010101,1e0), 0)
|
||||||
|
2001-01-01 00:00:01.000000
|
||||||
SELECT SUBTIME('916:40:00', '416:40:00');
|
SELECT SUBTIME('916:40:00', '416:40:00');
|
||||||
SUBTIME('916:40:00', '416:40:00')
|
SUBTIME('916:40:00', '416:40:00')
|
||||||
422:19:59.999999
|
422:19:59.999999
|
||||||
|
|
|
@ -513,6 +513,10 @@ SELECT TIME_TO_SEC('916:40:00');
|
||||||
SELECT ADDTIME('500:00:00', '416:40:00');
|
SELECT ADDTIME('500:00:00', '416:40:00');
|
||||||
SELECT ADDTIME('916:40:00', '416:40:00');
|
SELECT ADDTIME('916:40:00', '416:40:00');
|
||||||
|
|
||||||
|
# check if ADDTIME() handles NOT_FIXED_DEC correctly
|
||||||
|
SELECT ADDTIME(20010101,1e0), ADDTIME(20010101,1.1e0);
|
||||||
|
SELECT ADDTIME(ADDTIME(20010101,1e0), 0);
|
||||||
|
|
||||||
# check if SUBTIME() handles out-of-range values correctly
|
# check if SUBTIME() handles out-of-range values correctly
|
||||||
SELECT SUBTIME('916:40:00', '416:40:00');
|
SELECT SUBTIME('916:40:00', '416:40:00');
|
||||||
SELECT SUBTIME('-916:40:00', '416:40:00');
|
SELECT SUBTIME('-916:40:00', '416:40:00');
|
||||||
|
|
|
@ -3,8 +3,6 @@ set LOCAL sql_mode="";
|
||||||
SET @old_log_bin_trust_function_creators= @@global.log_bin_trust_function_creators;
|
SET @old_log_bin_trust_function_creators= @@global.log_bin_trust_function_creators;
|
||||||
SET GLOBAL log_bin_trust_function_creators = 1;
|
SET GLOBAL log_bin_trust_function_creators = 1;
|
||||||
select priv into @root_priv from mysql.global_priv where user='root' and host='localhost';
|
select priv into @root_priv from mysql.global_priv where user='root' and host='localhost';
|
||||||
drop table if exists t1;
|
|
||||||
drop database if exists mysqltest;
|
|
||||||
connect master,localhost,root,,;
|
connect master,localhost,root,,;
|
||||||
connection master;
|
connection master;
|
||||||
SET NAMES binary;
|
SET NAMES binary;
|
||||||
|
@ -2784,6 +2782,14 @@ DROP USER foo;
|
||||||
DROP TABLE db.t;
|
DROP TABLE db.t;
|
||||||
DROP DATABASE db;
|
DROP DATABASE db;
|
||||||
#
|
#
|
||||||
|
# Bug#33578113: DROP privilege on performance_schema.* can't be revoked
|
||||||
|
#
|
||||||
|
connection default;
|
||||||
|
CREATE USER bug33578113;
|
||||||
|
GRANT DROP ON performance_schema.* TO bug33578113;
|
||||||
|
REVOKE DROP ON performance_schema.* FROM bug33578113;
|
||||||
|
DROP USER bug33578113;
|
||||||
|
#
|
||||||
# End of 10.2 tests
|
# End of 10.2 tests
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Test of GRANT commands
|
# Test of GRANT commands
|
||||||
|
|
||||||
# Grant tests not performed with embedded server
|
# Grant tests not performed with embedded server
|
||||||
-- source include/not_embedded.inc
|
--source include/not_embedded.inc
|
||||||
|
|
||||||
# Save the initial number of concurrent sessions
|
# Save the initial number of concurrent sessions
|
||||||
--source include/count_sessions.inc
|
--source include/count_sessions.inc
|
||||||
|
@ -12,12 +12,6 @@ SET @old_log_bin_trust_function_creators= @@global.log_bin_trust_function_creato
|
||||||
SET GLOBAL log_bin_trust_function_creators = 1;
|
SET GLOBAL log_bin_trust_function_creators = 1;
|
||||||
select priv into @root_priv from mysql.global_priv where user='root' and host='localhost';
|
select priv into @root_priv from mysql.global_priv where user='root' and host='localhost';
|
||||||
|
|
||||||
# Cleanup
|
|
||||||
--disable_warnings
|
|
||||||
drop table if exists t1;
|
|
||||||
drop database if exists mysqltest;
|
|
||||||
--enable_warnings
|
|
||||||
|
|
||||||
connect (master,localhost,root,,);
|
connect (master,localhost,root,,);
|
||||||
connection master;
|
connection master;
|
||||||
SET NAMES binary;
|
SET NAMES binary;
|
||||||
|
@ -2284,6 +2278,16 @@ DROP USER foo;
|
||||||
DROP TABLE db.t;
|
DROP TABLE db.t;
|
||||||
DROP DATABASE db;
|
DROP DATABASE db;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Bug#33578113: DROP privilege on performance_schema.* can't be revoked
|
||||||
|
--echo #
|
||||||
|
connection default;
|
||||||
|
CREATE USER bug33578113;
|
||||||
|
GRANT DROP ON performance_schema.* TO bug33578113;
|
||||||
|
REVOKE DROP ON performance_schema.* FROM bug33578113;
|
||||||
|
DROP USER bug33578113;
|
||||||
|
--source include/wait_until_count_sessions.inc
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # End of 10.2 tests
|
--echo # End of 10.2 tests
|
||||||
--echo #
|
--echo #
|
||||||
|
|
47
mysql-test/main/information_schema_columns.result
Normal file
47
mysql-test/main/information_schema_columns.result
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
#
|
||||||
|
# Start of 10.2 tests
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# MDEV-25243 ASAN heap-use-after-free in Item_func_sp::execute_impl upon concurrent view DDL and I_S query with view and function
|
||||||
|
#
|
||||||
|
CREATE FUNCTION f1() RETURNS INT RETURN 1;
|
||||||
|
CREATE VIEW v01 AS SELECT f1();
|
||||||
|
CREATE VIEW v02 AS SELECT f1();
|
||||||
|
connect con1,localhost,root,,;
|
||||||
|
SELECT GET_LOCK('v01',30);
|
||||||
|
GET_LOCK('v01',30)
|
||||||
|
1
|
||||||
|
SELECT GET_LOCK('v02',30);
|
||||||
|
GET_LOCK('v02',30)
|
||||||
|
1
|
||||||
|
connection default;
|
||||||
|
SELECT * FROM INFORMATION_SCHEMA.COLUMNS
|
||||||
|
WHERE TABLE_SCHEMA='test'
|
||||||
|
AND TABLE_NAME LIKE 'v0%'
|
||||||
|
AND GET_LOCK(TABLE_NAME,30)
|
||||||
|
AND RELEASE_LOCK(TABLE_NAME)
|
||||||
|
AND f1()=1
|
||||||
|
ORDER BY TABLE_NAME;
|
||||||
|
connection con1;
|
||||||
|
connection con1;
|
||||||
|
SELECT RELEASE_LOCK('v01') /* Let the first row evaluate f1 */;
|
||||||
|
RELEASE_LOCK('v01')
|
||||||
|
1
|
||||||
|
CREATE FUNCTION f2() RETURNS INT RETURN 1 /* Invalidate SP cache*/;
|
||||||
|
SELECT RELEASE_LOCK('v02') /* Let the second row evaluate f1() */;
|
||||||
|
RELEASE_LOCK('v02')
|
||||||
|
1
|
||||||
|
DROP FUNCTION f2;
|
||||||
|
disconnect con1;
|
||||||
|
connection default;
|
||||||
|
SELECT RELEASE_LOCK('v01');
|
||||||
|
RELEASE_LOCK('v01')
|
||||||
|
NULL
|
||||||
|
SELECT RELEASE_LOCK('v02');
|
||||||
|
RELEASE_LOCK('v02')
|
||||||
|
NULL
|
||||||
|
DROP VIEW v01, v02;
|
||||||
|
DROP FUNCTION f1;
|
||||||
|
#
|
||||||
|
# End of 10.2 tests
|
||||||
|
#
|
48
mysql-test/main/information_schema_columns.test
Normal file
48
mysql-test/main/information_schema_columns.test
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
--echo #
|
||||||
|
--echo # Start of 10.2 tests
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-25243 ASAN heap-use-after-free in Item_func_sp::execute_impl upon concurrent view DDL and I_S query with view and function
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
|
||||||
|
CREATE FUNCTION f1() RETURNS INT RETURN 1;
|
||||||
|
CREATE VIEW v01 AS SELECT f1();
|
||||||
|
CREATE VIEW v02 AS SELECT f1();
|
||||||
|
|
||||||
|
--connect(con1,localhost,root,,)
|
||||||
|
SELECT GET_LOCK('v01',30);
|
||||||
|
SELECT GET_LOCK('v02',30);
|
||||||
|
--connection default
|
||||||
|
|
||||||
|
--send
|
||||||
|
SELECT * FROM INFORMATION_SCHEMA.COLUMNS
|
||||||
|
WHERE TABLE_SCHEMA='test'
|
||||||
|
AND TABLE_NAME LIKE 'v0%'
|
||||||
|
AND GET_LOCK(TABLE_NAME,30)
|
||||||
|
AND RELEASE_LOCK(TABLE_NAME)
|
||||||
|
AND f1()=1
|
||||||
|
ORDER BY TABLE_NAME;
|
||||||
|
|
||||||
|
--connection con1
|
||||||
|
--connection con1
|
||||||
|
SELECT RELEASE_LOCK('v01') /* Let the first row evaluate f1 */;
|
||||||
|
CREATE FUNCTION f2() RETURNS INT RETURN 1 /* Invalidate SP cache*/;
|
||||||
|
SELECT RELEASE_LOCK('v02') /* Let the second row evaluate f1() */;
|
||||||
|
DROP FUNCTION f2;
|
||||||
|
--disconnect con1
|
||||||
|
|
||||||
|
--connection default
|
||||||
|
--disable_result_log
|
||||||
|
--reap
|
||||||
|
--enable_result_log
|
||||||
|
SELECT RELEASE_LOCK('v01');
|
||||||
|
SELECT RELEASE_LOCK('v02');
|
||||||
|
|
||||||
|
DROP VIEW v01, v02;
|
||||||
|
DROP FUNCTION f1;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # End of 10.2 tests
|
||||||
|
--echo #
|
77
mysql-test/main/information_schema_tables.result
Normal file
77
mysql-test/main/information_schema_tables.result
Normal file
|
@ -0,0 +1,77 @@
|
||||||
|
#
|
||||||
|
# Start of 10.2 tests
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# MDEV-25243 ASAN heap-use-after-free in Item_func_sp::execute_impl upon concurrent view DDL and I_S query with view and function
|
||||||
|
#
|
||||||
|
# The originally reported non-deterministic test.
|
||||||
|
# It did not fail reliably on every run.
|
||||||
|
CREATE TABLE t (a INT);
|
||||||
|
INSERT INTO t VALUES (1),(2);
|
||||||
|
CREATE FUNCTION f(b INT) RETURNS INT RETURN 1;
|
||||||
|
CREATE VIEW v AS SELECT f(SUM(a)) FROM t;
|
||||||
|
connect con1,localhost,root,,test;
|
||||||
|
LOOP
|
||||||
|
CREATE OR REPLACE VIEW vv AS SELECT 1;
|
||||||
|
END LOOP $
|
||||||
|
connection default;
|
||||||
|
SELECT v.* FROM v JOIN INFORMATION_SCHEMA.TABLES WHERE DATA_LENGTH = -1;
|
||||||
|
f(SUM(a))
|
||||||
|
KILL CONID;
|
||||||
|
disconnect con1;
|
||||||
|
connection default;
|
||||||
|
DROP VIEW IF EXISTS vv;
|
||||||
|
DROP VIEW v;
|
||||||
|
DROP FUNCTION f;
|
||||||
|
DROP TABLE t;
|
||||||
|
# The second test version from the MDEV.
|
||||||
|
# It failed more reliably, but still was not deterministic.
|
||||||
|
CREATE FUNCTION f() RETURNS INT RETURN 1;
|
||||||
|
CREATE VIEW v AS SELECT f() FROM seq_1_to_10;
|
||||||
|
SELECT * FROM INFORMATION_SCHEMA.TABLES, v;;
|
||||||
|
connect con1,localhost,root,,;
|
||||||
|
CREATE VIEW v2 AS SELECT 1;
|
||||||
|
connection default;
|
||||||
|
disconnect con1;
|
||||||
|
DROP VIEW v;
|
||||||
|
DROP VIEW v2;
|
||||||
|
DROP FUNCTION f;
|
||||||
|
# The third test version from the MDEV.
|
||||||
|
# It failed reliably, and should be deterninistic.
|
||||||
|
CREATE FUNCTION f1() RETURNS INT RETURN 1;
|
||||||
|
CREATE VIEW v01 AS SELECT f1();
|
||||||
|
CREATE VIEW v02 AS SELECT f1();
|
||||||
|
connect con1,localhost,root,,;
|
||||||
|
SELECT GET_LOCK('v01',30);
|
||||||
|
GET_LOCK('v01',30)
|
||||||
|
1
|
||||||
|
SELECT GET_LOCK('v02',30);
|
||||||
|
GET_LOCK('v02',30)
|
||||||
|
1
|
||||||
|
connection default;
|
||||||
|
SELECT * FROM INFORMATION_SCHEMA.TABLES
|
||||||
|
WHERE TABLE_SCHEMA='test'
|
||||||
|
AND TABLE_NAME LIKE 'v0%'
|
||||||
|
AND GET_LOCK(TABLE_NAME,30)
|
||||||
|
AND RELEASE_LOCK(TABLE_NAME)
|
||||||
|
AND f1()=1
|
||||||
|
ORDER BY TABLE_NAME;
|
||||||
|
connection con1;
|
||||||
|
SELECT RELEASE_LOCK('v01') /* Let the first row evaluate f1 */;
|
||||||
|
RELEASE_LOCK('v01')
|
||||||
|
1
|
||||||
|
CREATE FUNCTION f2() RETURNS INT RETURN 1 /* Invalidate SP cache*/;
|
||||||
|
SELECT RELEASE_LOCK('v02') /* Let the second row evaluate f1() */;
|
||||||
|
RELEASE_LOCK('v02')
|
||||||
|
1
|
||||||
|
DROP FUNCTION f2;
|
||||||
|
disconnect con1;
|
||||||
|
connection default;
|
||||||
|
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT MAX_INDEX_LENGTH TEMPORARY
|
||||||
|
def test v01 VIEW NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL VIEW NULL NULL
|
||||||
|
def test v02 VIEW NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL VIEW NULL NULL
|
||||||
|
DROP VIEW v01, v02;
|
||||||
|
DROP FUNCTION f1;
|
||||||
|
#
|
||||||
|
# End of 10.2 tests
|
||||||
|
#
|
100
mysql-test/main/information_schema_tables.test
Normal file
100
mysql-test/main/information_schema_tables.test
Normal file
|
@ -0,0 +1,100 @@
|
||||||
|
--source include/have_sequence.inc
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Start of 10.2 tests
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-25243 ASAN heap-use-after-free in Item_func_sp::execute_impl upon concurrent view DDL and I_S query with view and function
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
--echo # The originally reported non-deterministic test.
|
||||||
|
--echo # It did not fail reliably on every run.
|
||||||
|
|
||||||
|
CREATE TABLE t (a INT);
|
||||||
|
INSERT INTO t VALUES (1),(2);
|
||||||
|
CREATE FUNCTION f(b INT) RETURNS INT RETURN 1;
|
||||||
|
CREATE VIEW v AS SELECT f(SUM(a)) FROM t;
|
||||||
|
--connect (con1,localhost,root,,test)
|
||||||
|
--let $conid= `SELECT CONNECTION_ID()`
|
||||||
|
--delimiter $
|
||||||
|
--send
|
||||||
|
LOOP
|
||||||
|
CREATE OR REPLACE VIEW vv AS SELECT 1;
|
||||||
|
END LOOP $
|
||||||
|
--delimiter ;
|
||||||
|
--connection default
|
||||||
|
# Avoid "Prepared statement needs to be re-prepared"
|
||||||
|
# Note, the code could probably eventually fixed to avoid forcing re-pepare if
|
||||||
|
# the *temporary* instance of Sp_caches (not the permanent one) was invalidated.
|
||||||
|
--disable_ps_protocol
|
||||||
|
--disable_warnings
|
||||||
|
SELECT v.* FROM v JOIN INFORMATION_SCHEMA.TABLES WHERE DATA_LENGTH = -1;
|
||||||
|
--enable_warnings
|
||||||
|
--enable_ps_protocol
|
||||||
|
# Cleanup
|
||||||
|
--replace_result $conid CONID
|
||||||
|
--eval KILL $conid
|
||||||
|
--disconnect con1
|
||||||
|
--connection default
|
||||||
|
DROP VIEW IF EXISTS vv;
|
||||||
|
DROP VIEW v;
|
||||||
|
DROP FUNCTION f;
|
||||||
|
DROP TABLE t;
|
||||||
|
|
||||||
|
|
||||||
|
--echo # The second test version from the MDEV.
|
||||||
|
--echo # It failed more reliably, but still was not deterministic.
|
||||||
|
|
||||||
|
|
||||||
|
CREATE FUNCTION f() RETURNS INT RETURN 1;
|
||||||
|
CREATE VIEW v AS SELECT f() FROM seq_1_to_10;
|
||||||
|
--send SELECT * FROM INFORMATION_SCHEMA.TABLES, v;
|
||||||
|
--connect(con1,localhost,root,,)
|
||||||
|
CREATE VIEW v2 AS SELECT 1;
|
||||||
|
--connection default
|
||||||
|
--disable_result_log
|
||||||
|
--reap
|
||||||
|
--enable_result_log
|
||||||
|
--disconnect con1
|
||||||
|
DROP VIEW v;
|
||||||
|
DROP VIEW v2;
|
||||||
|
DROP FUNCTION f;
|
||||||
|
|
||||||
|
--echo # The third test version from the MDEV.
|
||||||
|
--echo # It failed reliably, and should be deterninistic.
|
||||||
|
|
||||||
|
CREATE FUNCTION f1() RETURNS INT RETURN 1;
|
||||||
|
CREATE VIEW v01 AS SELECT f1();
|
||||||
|
CREATE VIEW v02 AS SELECT f1();
|
||||||
|
|
||||||
|
--connect(con1,localhost,root,,)
|
||||||
|
SELECT GET_LOCK('v01',30);
|
||||||
|
SELECT GET_LOCK('v02',30);
|
||||||
|
--connection default
|
||||||
|
|
||||||
|
--send
|
||||||
|
SELECT * FROM INFORMATION_SCHEMA.TABLES
|
||||||
|
WHERE TABLE_SCHEMA='test'
|
||||||
|
AND TABLE_NAME LIKE 'v0%'
|
||||||
|
AND GET_LOCK(TABLE_NAME,30)
|
||||||
|
AND RELEASE_LOCK(TABLE_NAME)
|
||||||
|
AND f1()=1
|
||||||
|
ORDER BY TABLE_NAME;
|
||||||
|
|
||||||
|
--connection con1
|
||||||
|
SELECT RELEASE_LOCK('v01') /* Let the first row evaluate f1 */;
|
||||||
|
CREATE FUNCTION f2() RETURNS INT RETURN 1 /* Invalidate SP cache*/;
|
||||||
|
SELECT RELEASE_LOCK('v02') /* Let the second row evaluate f1() */;
|
||||||
|
DROP FUNCTION f2;
|
||||||
|
--disconnect con1
|
||||||
|
--connection default
|
||||||
|
--reap
|
||||||
|
|
||||||
|
|
||||||
|
DROP VIEW v01, v02;
|
||||||
|
DROP FUNCTION f1;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # End of 10.2 tests
|
||||||
|
--echo #
|
|
@ -1,7 +1,8 @@
|
||||||
# run mysql_client_test with performance schema
|
# run mysql_client_test with performance schema
|
||||||
|
|
||||||
# No need to run this with embedded server
|
# No need to run this with embedded server
|
||||||
-- source include/not_embedded.inc
|
--source include/not_embedded.inc
|
||||||
|
--source include/check_ipv6.inc
|
||||||
|
|
||||||
# need to have the dynamic loading turned on for the client plugin tests
|
# need to have the dynamic loading turned on for the client plugin tests
|
||||||
--source include/have_plugin_auth.inc
|
--source include/have_plugin_auth.inc
|
||||||
|
|
|
@ -2,7 +2,8 @@
|
||||||
# This runs the mysql_client_test using the non-blocking API.
|
# This runs the mysql_client_test using the non-blocking API.
|
||||||
|
|
||||||
# The non-blocking API is not supported in the embedded server.
|
# The non-blocking API is not supported in the embedded server.
|
||||||
-- source include/not_embedded.inc
|
--source include/not_embedded.inc
|
||||||
|
--source include/check_ipv6.inc
|
||||||
# This test is slow on buildbot.
|
# This test is slow on buildbot.
|
||||||
--source include/big_test.inc
|
--source include/big_test.inc
|
||||||
|
|
||||||
|
|
|
@ -142,9 +142,9 @@ COUNT(*)
|
||||||
#
|
#
|
||||||
# Run on zoneinfo directory --skip-write-binlog
|
# Run on zoneinfo directory --skip-write-binlog
|
||||||
#
|
#
|
||||||
set @prep1=if((select count(*) from information_schema.global_variables where variable_name='wsrep_on' and variable_value='ON'), 'SET SESSION SQL_LOG_BIN=?, WSREP_ON=OFF;', 'do ?');
|
set @prep1=if((select count(*) from information_schema.global_variables where variable_name='wsrep_on' and variable_value='ON'), 'SET SESSION WSREP_ON=OFF', 'do 0');
|
||||||
prepare set_wsrep_write_binlog from @prep1;
|
SET SESSION SQL_LOG_BIN=0;
|
||||||
set @toggle=0; execute set_wsrep_write_binlog using @toggle;
|
execute immediate @prep1;
|
||||||
TRUNCATE TABLE time_zone;
|
TRUNCATE TABLE time_zone;
|
||||||
TRUNCATE TABLE time_zone_name;
|
TRUNCATE TABLE time_zone_name;
|
||||||
TRUNCATE TABLE time_zone_transition;
|
TRUNCATE TABLE time_zone_transition;
|
||||||
|
@ -250,9 +250,9 @@ TRUNCATE TABLE time_zone_leap_second;
|
||||||
#
|
#
|
||||||
# Testing with explicit timezonefile --skip-write-binlog
|
# Testing with explicit timezonefile --skip-write-binlog
|
||||||
#
|
#
|
||||||
set @prep1=if((select count(*) from information_schema.global_variables where variable_name='wsrep_on' and variable_value='ON'), 'SET SESSION SQL_LOG_BIN=?, WSREP_ON=OFF;', 'do ?');
|
set @prep1=if((select count(*) from information_schema.global_variables where variable_name='wsrep_on' and variable_value='ON'), 'SET SESSION WSREP_ON=OFF', 'do 0');
|
||||||
prepare set_wsrep_write_binlog from @prep1;
|
SET SESSION SQL_LOG_BIN=0;
|
||||||
set @toggle=0; execute set_wsrep_write_binlog using @toggle;
|
execute immediate @prep1;
|
||||||
SELECT 'skip truncate tables';
|
SELECT 'skip truncate tables';
|
||||||
LOCK TABLES time_zone WRITE,
|
LOCK TABLES time_zone WRITE,
|
||||||
time_zone_leap_second WRITE,
|
time_zone_leap_second WRITE,
|
||||||
|
@ -353,9 +353,9 @@ TRUNCATE TABLE time_zone_leap_second;
|
||||||
#
|
#
|
||||||
# Testing --skip-write-binlog --leap
|
# Testing --skip-write-binlog --leap
|
||||||
#
|
#
|
||||||
set @prep1=if((select count(*) from information_schema.global_variables where variable_name='wsrep_on' and variable_value='ON'), 'SET SESSION SQL_LOG_BIN=?, WSREP_ON=OFF;', 'do ?');
|
set @prep1=if((select count(*) from information_schema.global_variables where variable_name='wsrep_on' and variable_value='ON'), 'SET SESSION WSREP_ON=OFF', 'do 0');
|
||||||
prepare set_wsrep_write_binlog from @prep1;
|
SET SESSION SQL_LOG_BIN=0;
|
||||||
set @toggle=0; execute set_wsrep_write_binlog using @toggle;
|
execute immediate @prep1;
|
||||||
SELECT 'skip truncate tables';
|
SELECT 'skip truncate tables';
|
||||||
LOCK TABLES time_zone WRITE,
|
LOCK TABLES time_zone WRITE,
|
||||||
time_zone_leap_second WRITE,
|
time_zone_leap_second WRITE,
|
||||||
|
@ -384,6 +384,45 @@ SELECT COUNT(*) FROM time_zone_leap_second;
|
||||||
COUNT(*)
|
COUNT(*)
|
||||||
0
|
0
|
||||||
#
|
#
|
||||||
|
# MDEV-28263: mariadb-tzinfo-to-sql improve wsrep and binlog cases
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# Testing --skip-write-binlog
|
||||||
|
#
|
||||||
|
set @prep1=if((select count(*) from information_schema.global_variables where variable_name='wsrep_on' and variable_value='ON'), 'SET SESSION WSREP_ON=OFF', 'do 0');
|
||||||
|
SET SESSION SQL_LOG_BIN=0;
|
||||||
|
execute immediate @prep1;
|
||||||
|
SELECT 'skip truncate tables';
|
||||||
|
LOCK TABLES time_zone WRITE,
|
||||||
|
time_zone_leap_second WRITE,
|
||||||
|
time_zone_name WRITE,
|
||||||
|
time_zone_transition WRITE,
|
||||||
|
time_zone_transition_type WRITE;
|
||||||
|
INSERT INTO time_zone (Use_leap_seconds) VALUES ('N');
|
||||||
|
SET @time_zone_id= LAST_INSERT_ID();
|
||||||
|
INSERT INTO time_zone_name (Name, Time_zone_id) VALUES ('XXX', @time_zone_id);
|
||||||
|
INSERT INTO time_zone_transition_type (Time_zone_id, Transition_type_id, Offset, Is_DST, Abbreviation) VALUES
|
||||||
|
(@time_zone_id, 0, 0, 0, 'GMT')
|
||||||
|
;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
COMMIT;
|
||||||
|
set @prep1=if((select count(*) from information_schema.global_variables where variable_name='wsrep_on' and variable_value='ON'), 'SET SESSION WSREP_ON=OFF', 'do 0');
|
||||||
|
SET SESSION SQL_LOG_BIN=0;
|
||||||
|
execute immediate @prep1;
|
||||||
|
SELECT 'skip truncate tables';
|
||||||
|
LOCK TABLES time_zone WRITE,
|
||||||
|
time_zone_leap_second WRITE,
|
||||||
|
time_zone_name WRITE,
|
||||||
|
time_zone_transition WRITE,
|
||||||
|
time_zone_transition_type WRITE;
|
||||||
|
TRUNCATE TABLE time_zone_leap_second;
|
||||||
|
ALTER TABLE time_zone_leap_second ORDER BY Transition_time;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
COMMIT;
|
||||||
|
#
|
||||||
|
# End of 10.2 tests
|
||||||
|
#
|
||||||
|
#
|
||||||
# MDEV-6236 - [PATCH] mysql_tzinfo_to_sql may produce invalid SQL
|
# MDEV-6236 - [PATCH] mysql_tzinfo_to_sql may produce invalid SQL
|
||||||
#
|
#
|
||||||
\d |
|
\d |
|
||||||
|
|
|
@ -130,7 +130,23 @@ SELECT COUNT(*) FROM time_zone_transition;
|
||||||
SELECT COUNT(*) FROM time_zone_transition_type;
|
SELECT COUNT(*) FROM time_zone_transition_type;
|
||||||
SELECT COUNT(*) FROM time_zone_leap_second;
|
SELECT COUNT(*) FROM time_zone_leap_second;
|
||||||
|
|
||||||
#
|
--echo #
|
||||||
|
--echo # MDEV-28263: mariadb-tzinfo-to-sql improve wsrep and binlog cases
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Testing --skip-write-binlog
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||||
|
--exec $MYSQL_TZINFO_TO_SQL --skip-write-binlog $MYSQLTEST_VARDIR/zoneinfo/GMT XXX 2>&1
|
||||||
|
|
||||||
|
--exec $MYSQL_TZINFO_TO_SQL --skip-write-binlog --leap $MYSQLTEST_VARDIR/zoneinfo/GMT 2>&1
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # End of 10.2 tests
|
||||||
|
--echo #
|
||||||
|
|
||||||
#
|
#
|
||||||
# Cleanup
|
# Cleanup
|
||||||
#
|
#
|
||||||
|
|
|
@ -77,6 +77,8 @@ $$
|
||||||
--
|
--
|
||||||
-- Dumping routines for database 'db1_mdev17429'
|
-- Dumping routines for database 'db1_mdev17429'
|
||||||
--
|
--
|
||||||
|
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
||||||
|
/*!50003 SET sql_mode = 'PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ORACLE,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,NO_AUTO_CREATE_USER,SIMULTANEOUS_ASSIGNMENT' */ ;
|
||||||
/*!50003 DROP PROCEDURE IF EXISTS `p1` */;
|
/*!50003 DROP PROCEDURE IF EXISTS `p1` */;
|
||||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||||
|
@ -84,8 +86,6 @@ $$
|
||||||
/*!50003 SET character_set_client = latin1 */ ;
|
/*!50003 SET character_set_client = latin1 */ ;
|
||||||
/*!50003 SET character_set_results = latin1 */ ;
|
/*!50003 SET character_set_results = latin1 */ ;
|
||||||
/*!50003 SET collation_connection = latin1_swedish_ci */ ;
|
/*!50003 SET collation_connection = latin1_swedish_ci */ ;
|
||||||
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
|
||||||
/*!50003 SET sql_mode = 'PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ORACLE,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,NO_AUTO_CREATE_USER,SIMULTANEOUS_ASSIGNMENT' */ ;
|
|
||||||
DELIMITER ;;
|
DELIMITER ;;
|
||||||
CREATE DEFINER="root"@"localhost" PROCEDURE "p1"(a INT)
|
CREATE DEFINER="root"@"localhost" PROCEDURE "p1"(a INT)
|
||||||
AS BEGIN
|
AS BEGIN
|
||||||
|
|
|
@ -64,14 +64,14 @@ SET character_set_client = @saved_cs_client;
|
||||||
-- Dumping routines for database 'mysqltest1
|
-- Dumping routines for database 'mysqltest1
|
||||||
-- 1tsetlqsym'
|
-- 1tsetlqsym'
|
||||||
--
|
--
|
||||||
|
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
||||||
|
/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
|
||||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||||
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
|
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
|
||||||
/*!50003 SET character_set_client = latin1 */ ;
|
/*!50003 SET character_set_client = latin1 */ ;
|
||||||
/*!50003 SET character_set_results = latin1 */ ;
|
/*!50003 SET character_set_results = latin1 */ ;
|
||||||
/*!50003 SET collation_connection = latin1_swedish_ci */ ;
|
/*!50003 SET collation_connection = latin1_swedish_ci */ ;
|
||||||
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
|
||||||
/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
|
|
||||||
DELIMITER ;;
|
DELIMITER ;;
|
||||||
CREATE DEFINER=`root`@`localhost` PROCEDURE `sp`()
|
CREATE DEFINER=`root`@`localhost` PROCEDURE `sp`()
|
||||||
select * from `v1
|
select * from `v1
|
||||||
|
|
|
@ -2779,6 +2779,8 @@ LOCK TABLES `t1` WRITE;
|
||||||
INSERT INTO `t1` VALUES (1),(2),(3),(4),(5);
|
INSERT INTO `t1` VALUES (1),(2),(3),(4),(5);
|
||||||
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
||||||
|
/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
|
||||||
/*!50003 DROP FUNCTION IF EXISTS `bug9056_func1` */;
|
/*!50003 DROP FUNCTION IF EXISTS `bug9056_func1` */;
|
||||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||||
|
@ -2786,8 +2788,6 @@ UNLOCK TABLES;
|
||||||
/*!50003 SET character_set_client = latin1 */ ;
|
/*!50003 SET character_set_client = latin1 */ ;
|
||||||
/*!50003 SET character_set_results = latin1 */ ;
|
/*!50003 SET character_set_results = latin1 */ ;
|
||||||
/*!50003 SET collation_connection = latin1_swedish_ci */ ;
|
/*!50003 SET collation_connection = latin1_swedish_ci */ ;
|
||||||
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
|
||||||
/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
|
|
||||||
DELIMITER ;;
|
DELIMITER ;;
|
||||||
CREATE DEFINER=`root`@`localhost` FUNCTION `bug9056_func1`(a INT, b INT) RETURNS int(11)
|
CREATE DEFINER=`root`@`localhost` FUNCTION `bug9056_func1`(a INT, b INT) RETURNS int(11)
|
||||||
RETURN a+b ;;
|
RETURN a+b ;;
|
||||||
|
@ -2796,6 +2796,8 @@ DELIMITER ;
|
||||||
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
||||||
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
||||||
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
||||||
|
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
||||||
|
/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
|
||||||
/*!50003 DROP FUNCTION IF EXISTS `bug9056_func2` */;
|
/*!50003 DROP FUNCTION IF EXISTS `bug9056_func2` */;
|
||||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||||
|
@ -2803,8 +2805,6 @@ DELIMITER ;
|
||||||
/*!50003 SET character_set_client = latin1 */ ;
|
/*!50003 SET character_set_client = latin1 */ ;
|
||||||
/*!50003 SET character_set_results = latin1 */ ;
|
/*!50003 SET character_set_results = latin1 */ ;
|
||||||
/*!50003 SET collation_connection = latin1_swedish_ci */ ;
|
/*!50003 SET collation_connection = latin1_swedish_ci */ ;
|
||||||
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
|
||||||
/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
|
|
||||||
DELIMITER ;;
|
DELIMITER ;;
|
||||||
CREATE DEFINER=`root`@`localhost` FUNCTION `bug9056_func2`(f1 char binary) RETURNS char(1) CHARSET latin1
|
CREATE DEFINER=`root`@`localhost` FUNCTION `bug9056_func2`(f1 char binary) RETURNS char(1) CHARSET latin1
|
||||||
begin
|
begin
|
||||||
|
@ -2816,6 +2816,8 @@ DELIMITER ;
|
||||||
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
||||||
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
||||||
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
||||||
|
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
||||||
|
/*!50003 SET sql_mode = 'REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ANSI' */ ;
|
||||||
/*!50003 DROP PROCEDURE IF EXISTS `a'b` */;
|
/*!50003 DROP PROCEDURE IF EXISTS `a'b` */;
|
||||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||||
|
@ -2823,8 +2825,6 @@ DELIMITER ;
|
||||||
/*!50003 SET character_set_client = latin1 */ ;
|
/*!50003 SET character_set_client = latin1 */ ;
|
||||||
/*!50003 SET character_set_results = latin1 */ ;
|
/*!50003 SET character_set_results = latin1 */ ;
|
||||||
/*!50003 SET collation_connection = latin1_swedish_ci */ ;
|
/*!50003 SET collation_connection = latin1_swedish_ci */ ;
|
||||||
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
|
||||||
/*!50003 SET sql_mode = 'REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ANSI' */ ;
|
|
||||||
DELIMITER ;;
|
DELIMITER ;;
|
||||||
CREATE DEFINER="root"@"localhost" PROCEDURE "a'b"()
|
CREATE DEFINER="root"@"localhost" PROCEDURE "a'b"()
|
||||||
select 1 ;;
|
select 1 ;;
|
||||||
|
@ -2833,6 +2833,8 @@ DELIMITER ;
|
||||||
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
||||||
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
||||||
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
||||||
|
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
||||||
|
/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
|
||||||
/*!50003 DROP PROCEDURE IF EXISTS `bug9056_proc1` */;
|
/*!50003 DROP PROCEDURE IF EXISTS `bug9056_proc1` */;
|
||||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||||
|
@ -2840,8 +2842,6 @@ DELIMITER ;
|
||||||
/*!50003 SET character_set_client = latin1 */ ;
|
/*!50003 SET character_set_client = latin1 */ ;
|
||||||
/*!50003 SET character_set_results = latin1 */ ;
|
/*!50003 SET character_set_results = latin1 */ ;
|
||||||
/*!50003 SET collation_connection = latin1_swedish_ci */ ;
|
/*!50003 SET collation_connection = latin1_swedish_ci */ ;
|
||||||
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
|
||||||
/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
|
|
||||||
DELIMITER ;;
|
DELIMITER ;;
|
||||||
CREATE DEFINER=`root`@`localhost` PROCEDURE `bug9056_proc1`(IN a INT, IN b INT, OUT c INT)
|
CREATE DEFINER=`root`@`localhost` PROCEDURE `bug9056_proc1`(IN a INT, IN b INT, OUT c INT)
|
||||||
BEGIN SELECT a+b INTO c; end ;;
|
BEGIN SELECT a+b INTO c; end ;;
|
||||||
|
@ -2850,6 +2850,8 @@ DELIMITER ;
|
||||||
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
||||||
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
||||||
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
||||||
|
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
||||||
|
/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
|
||||||
/*!50003 DROP PROCEDURE IF EXISTS `bug9056_proc2` */;
|
/*!50003 DROP PROCEDURE IF EXISTS `bug9056_proc2` */;
|
||||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||||
|
@ -2857,8 +2859,6 @@ DELIMITER ;
|
||||||
/*!50003 SET character_set_client = latin1 */ ;
|
/*!50003 SET character_set_client = latin1 */ ;
|
||||||
/*!50003 SET character_set_results = latin1 */ ;
|
/*!50003 SET character_set_results = latin1 */ ;
|
||||||
/*!50003 SET collation_connection = latin1_swedish_ci */ ;
|
/*!50003 SET collation_connection = latin1_swedish_ci */ ;
|
||||||
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
|
||||||
/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
|
|
||||||
DELIMITER ;;
|
DELIMITER ;;
|
||||||
CREATE DEFINER=`root`@`localhost` PROCEDURE `bug9056_proc2`(OUT a INT)
|
CREATE DEFINER=`root`@`localhost` PROCEDURE `bug9056_proc2`(OUT a INT)
|
||||||
BEGIN
|
BEGIN
|
||||||
|
@ -3854,14 +3854,14 @@ create procedure mysqldump_test_db.sp1() select 'hello';
|
||||||
-- insufficient privileges to SHOW CREATE PROCEDURE `sp1`
|
-- insufficient privileges to SHOW CREATE PROCEDURE `sp1`
|
||||||
-- does user2 have permissions on mysql.proc?
|
-- does user2 have permissions on mysql.proc?
|
||||||
|
|
||||||
|
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
||||||
|
/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
|
||||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||||
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
|
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
|
||||||
/*!50003 SET character_set_client = latin1 */ ;
|
/*!50003 SET character_set_client = latin1 */ ;
|
||||||
/*!50003 SET character_set_results = latin1 */ ;
|
/*!50003 SET character_set_results = latin1 */ ;
|
||||||
/*!50003 SET collation_connection = latin1_swedish_ci */ ;
|
/*!50003 SET collation_connection = latin1_swedish_ci */ ;
|
||||||
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
|
||||||
/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
|
|
||||||
DELIMITER ;;
|
DELIMITER ;;
|
||||||
CREATE DEFINER=`user1`@`%` PROCEDURE `sp1`()
|
CREATE DEFINER=`user1`@`%` PROCEDURE `sp1`()
|
||||||
select 'hello' ;;
|
select 'hello' ;;
|
||||||
|
@ -5429,6 +5429,8 @@ CREATE DATABASE `a\"'``b`;
|
||||||
USE `a\"'``b`;
|
USE `a\"'``b`;
|
||||||
CREATE PROCEDURE p1() BEGIN END;
|
CREATE PROCEDURE p1() BEGIN END;
|
||||||
ALTER DATABASE `a\"'``b` COLLATE utf8_general_ci;
|
ALTER DATABASE `a\"'``b` COLLATE utf8_general_ci;
|
||||||
|
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
||||||
|
/*!50003 SET sql_mode = '' */ ;
|
||||||
ALTER DATABASE `a\"'``b` CHARACTER SET latin1 COLLATE latin1_swedish_ci ;
|
ALTER DATABASE `a\"'``b` CHARACTER SET latin1 COLLATE latin1_swedish_ci ;
|
||||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||||
|
@ -5436,8 +5438,6 @@ ALTER DATABASE `a\"'``b` CHARACTER SET latin1 COLLATE latin1_swedish_ci ;
|
||||||
/*!50003 SET character_set_client = utf8 */ ;
|
/*!50003 SET character_set_client = utf8 */ ;
|
||||||
/*!50003 SET character_set_results = utf8 */ ;
|
/*!50003 SET character_set_results = utf8 */ ;
|
||||||
/*!50003 SET collation_connection = utf8_general_ci */ ;
|
/*!50003 SET collation_connection = utf8_general_ci */ ;
|
||||||
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
|
||||||
/*!50003 SET sql_mode = '' */ ;
|
|
||||||
DELIMITER ;;
|
DELIMITER ;;
|
||||||
CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`()
|
CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`()
|
||||||
BEGIN END ;;
|
BEGIN END ;;
|
||||||
|
@ -5740,34 +5740,6 @@ DROP TABLE t1;
|
||||||
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
||||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||||
DROP TABLE IF EXISTS `innodb_index_stats`;
|
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
||||||
/*!40101 SET character_set_client = utf8 */;
|
|
||||||
CREATE TABLE `innodb_index_stats` (
|
|
||||||
`database_name` varchar(64) COLLATE utf8_bin NOT NULL,
|
|
||||||
`table_name` varchar(199) COLLATE utf8_bin NOT NULL,
|
|
||||||
`index_name` varchar(64) COLLATE utf8_bin NOT NULL,
|
|
||||||
`last_update` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
|
|
||||||
`stat_name` varchar(64) COLLATE utf8_bin NOT NULL,
|
|
||||||
`stat_value` bigint(20) unsigned NOT NULL,
|
|
||||||
`sample_size` bigint(20) unsigned DEFAULT NULL,
|
|
||||||
`stat_description` varchar(1024) COLLATE utf8_bin NOT NULL,
|
|
||||||
PRIMARY KEY (`database_name`,`table_name`,`index_name`,`stat_name`)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0;
|
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
||||||
DROP TABLE IF EXISTS `innodb_table_stats`;
|
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
||||||
/*!40101 SET character_set_client = utf8 */;
|
|
||||||
CREATE TABLE `innodb_table_stats` (
|
|
||||||
`database_name` varchar(64) COLLATE utf8_bin NOT NULL,
|
|
||||||
`table_name` varchar(199) COLLATE utf8_bin NOT NULL,
|
|
||||||
`last_update` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
|
|
||||||
`n_rows` bigint(20) unsigned NOT NULL,
|
|
||||||
`clustered_index_size` bigint(20) unsigned NOT NULL,
|
|
||||||
`sum_of_other_index_sizes` bigint(20) unsigned NOT NULL,
|
|
||||||
PRIMARY KEY (`database_name`,`table_name`)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0;
|
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||||
/*!40101 SET character_set_client = utf8 */;
|
/*!40101 SET character_set_client = utf8 */;
|
||||||
CREATE TABLE IF NOT EXISTS `general_log` (
|
CREATE TABLE IF NOT EXISTS `general_log` (
|
||||||
|
@ -5797,6 +5769,34 @@ CREATE TABLE IF NOT EXISTS `slow_log` (
|
||||||
`rows_affected` int(11) NOT NULL
|
`rows_affected` int(11) NOT NULL
|
||||||
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log';
|
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log';
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
|
DROP TABLE IF EXISTS `innodb_index_stats`;
|
||||||
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||||
|
/*!40101 SET character_set_client = utf8 */;
|
||||||
|
CREATE TABLE `innodb_index_stats` (
|
||||||
|
`database_name` varchar(64) COLLATE utf8_bin NOT NULL,
|
||||||
|
`table_name` varchar(199) COLLATE utf8_bin NOT NULL,
|
||||||
|
`index_name` varchar(64) COLLATE utf8_bin NOT NULL,
|
||||||
|
`last_update` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
|
||||||
|
`stat_name` varchar(64) COLLATE utf8_bin NOT NULL,
|
||||||
|
`stat_value` bigint(20) unsigned NOT NULL,
|
||||||
|
`sample_size` bigint(20) unsigned DEFAULT NULL,
|
||||||
|
`stat_description` varchar(1024) COLLATE utf8_bin NOT NULL,
|
||||||
|
PRIMARY KEY (`database_name`,`table_name`,`index_name`,`stat_name`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0;
|
||||||
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
|
DROP TABLE IF EXISTS `innodb_table_stats`;
|
||||||
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||||
|
/*!40101 SET character_set_client = utf8 */;
|
||||||
|
CREATE TABLE `innodb_table_stats` (
|
||||||
|
`database_name` varchar(64) COLLATE utf8_bin NOT NULL,
|
||||||
|
`table_name` varchar(199) COLLATE utf8_bin NOT NULL,
|
||||||
|
`last_update` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
|
||||||
|
`n_rows` bigint(20) unsigned NOT NULL,
|
||||||
|
`clustered_index_size` bigint(20) unsigned NOT NULL,
|
||||||
|
`sum_of_other_index_sizes` bigint(20) unsigned NOT NULL,
|
||||||
|
PRIMARY KEY (`database_name`,`table_name`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0;
|
||||||
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||||
/*!40101 SET character_set_client = utf8 */;
|
/*!40101 SET character_set_client = utf8 */;
|
||||||
CREATE TABLE IF NOT EXISTS `transaction_registry` (
|
CREATE TABLE IF NOT EXISTS `transaction_registry` (
|
||||||
|
@ -5835,6 +5835,35 @@ CREATE TABLE IF NOT EXISTS `transaction_registry` (
|
||||||
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
||||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||||
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||||
|
/*!40101 SET character_set_client = utf8 */;
|
||||||
|
CREATE TABLE IF NOT EXISTS `general_log` (
|
||||||
|
`event_time` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
|
||||||
|
`user_host` mediumtext NOT NULL,
|
||||||
|
`thread_id` bigint(21) unsigned NOT NULL,
|
||||||
|
`server_id` int(10) unsigned NOT NULL,
|
||||||
|
`command_type` varchar(64) NOT NULL,
|
||||||
|
`argument` mediumtext NOT NULL
|
||||||
|
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='General log';
|
||||||
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||||
|
/*!40101 SET character_set_client = utf8 */;
|
||||||
|
CREATE TABLE IF NOT EXISTS `slow_log` (
|
||||||
|
`start_time` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
|
||||||
|
`user_host` mediumtext NOT NULL,
|
||||||
|
`query_time` time(6) NOT NULL,
|
||||||
|
`lock_time` time(6) NOT NULL,
|
||||||
|
`rows_sent` int(11) NOT NULL,
|
||||||
|
`rows_examined` int(11) NOT NULL,
|
||||||
|
`db` varchar(512) NOT NULL,
|
||||||
|
`last_insert_id` int(11) NOT NULL,
|
||||||
|
`insert_id` int(11) NOT NULL,
|
||||||
|
`server_id` int(10) unsigned NOT NULL,
|
||||||
|
`sql_text` mediumtext NOT NULL,
|
||||||
|
`thread_id` bigint(21) unsigned NOT NULL,
|
||||||
|
`rows_affected` int(11) NOT NULL
|
||||||
|
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log';
|
||||||
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
DROP TABLE IF EXISTS `innodb_index_stats`;
|
DROP TABLE IF EXISTS `innodb_index_stats`;
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||||
/*!40101 SET character_set_client = utf8 */;
|
/*!40101 SET character_set_client = utf8 */;
|
||||||
|
@ -5875,35 +5904,6 @@ LOCK TABLES `innodb_table_stats` WRITE;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||||
/*!40101 SET character_set_client = utf8 */;
|
/*!40101 SET character_set_client = utf8 */;
|
||||||
CREATE TABLE IF NOT EXISTS `general_log` (
|
|
||||||
`event_time` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
|
|
||||||
`user_host` mediumtext NOT NULL,
|
|
||||||
`thread_id` bigint(21) unsigned NOT NULL,
|
|
||||||
`server_id` int(10) unsigned NOT NULL,
|
|
||||||
`command_type` varchar(64) NOT NULL,
|
|
||||||
`argument` mediumtext NOT NULL
|
|
||||||
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='General log';
|
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
||||||
/*!40101 SET character_set_client = utf8 */;
|
|
||||||
CREATE TABLE IF NOT EXISTS `slow_log` (
|
|
||||||
`start_time` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
|
|
||||||
`user_host` mediumtext NOT NULL,
|
|
||||||
`query_time` time(6) NOT NULL,
|
|
||||||
`lock_time` time(6) NOT NULL,
|
|
||||||
`rows_sent` int(11) NOT NULL,
|
|
||||||
`rows_examined` int(11) NOT NULL,
|
|
||||||
`db` varchar(512) NOT NULL,
|
|
||||||
`last_insert_id` int(11) NOT NULL,
|
|
||||||
`insert_id` int(11) NOT NULL,
|
|
||||||
`server_id` int(10) unsigned NOT NULL,
|
|
||||||
`sql_text` mediumtext NOT NULL,
|
|
||||||
`thread_id` bigint(21) unsigned NOT NULL,
|
|
||||||
`rows_affected` int(11) NOT NULL
|
|
||||||
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log';
|
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
||||||
/*!40101 SET character_set_client = utf8 */;
|
|
||||||
CREATE TABLE IF NOT EXISTS `transaction_registry` (
|
CREATE TABLE IF NOT EXISTS `transaction_registry` (
|
||||||
`transaction_id` bigint(20) unsigned NOT NULL,
|
`transaction_id` bigint(20) unsigned NOT NULL,
|
||||||
`commit_id` bigint(20) unsigned NOT NULL,
|
`commit_id` bigint(20) unsigned NOT NULL,
|
||||||
|
@ -5940,6 +5940,35 @@ CREATE TABLE IF NOT EXISTS `transaction_registry` (
|
||||||
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
||||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||||
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||||
|
/*!40101 SET character_set_client = utf8 */;
|
||||||
|
CREATE TABLE IF NOT EXISTS `general_log` (
|
||||||
|
`event_time` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
|
||||||
|
`user_host` mediumtext NOT NULL,
|
||||||
|
`thread_id` bigint(21) unsigned NOT NULL,
|
||||||
|
`server_id` int(10) unsigned NOT NULL,
|
||||||
|
`command_type` varchar(64) NOT NULL,
|
||||||
|
`argument` mediumtext NOT NULL
|
||||||
|
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='General log';
|
||||||
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||||
|
/*!40101 SET character_set_client = utf8 */;
|
||||||
|
CREATE TABLE IF NOT EXISTS `slow_log` (
|
||||||
|
`start_time` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
|
||||||
|
`user_host` mediumtext NOT NULL,
|
||||||
|
`query_time` time(6) NOT NULL,
|
||||||
|
`lock_time` time(6) NOT NULL,
|
||||||
|
`rows_sent` int(11) NOT NULL,
|
||||||
|
`rows_examined` int(11) NOT NULL,
|
||||||
|
`db` varchar(512) NOT NULL,
|
||||||
|
`last_insert_id` int(11) NOT NULL,
|
||||||
|
`insert_id` int(11) NOT NULL,
|
||||||
|
`server_id` int(10) unsigned NOT NULL,
|
||||||
|
`sql_text` mediumtext NOT NULL,
|
||||||
|
`thread_id` bigint(21) unsigned NOT NULL,
|
||||||
|
`rows_affected` int(11) NOT NULL
|
||||||
|
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log';
|
||||||
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
DROP TABLE IF EXISTS `innodb_index_stats`;
|
DROP TABLE IF EXISTS `innodb_index_stats`;
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||||
/*!40101 SET character_set_client = utf8 */;
|
/*!40101 SET character_set_client = utf8 */;
|
||||||
|
@ -5980,35 +6009,6 @@ LOCK TABLES `innodb_table_stats` WRITE;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||||
/*!40101 SET character_set_client = utf8 */;
|
/*!40101 SET character_set_client = utf8 */;
|
||||||
CREATE TABLE IF NOT EXISTS `general_log` (
|
|
||||||
`event_time` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
|
|
||||||
`user_host` mediumtext NOT NULL,
|
|
||||||
`thread_id` bigint(21) unsigned NOT NULL,
|
|
||||||
`server_id` int(10) unsigned NOT NULL,
|
|
||||||
`command_type` varchar(64) NOT NULL,
|
|
||||||
`argument` mediumtext NOT NULL
|
|
||||||
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='General log';
|
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
||||||
/*!40101 SET character_set_client = utf8 */;
|
|
||||||
CREATE TABLE IF NOT EXISTS `slow_log` (
|
|
||||||
`start_time` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
|
|
||||||
`user_host` mediumtext NOT NULL,
|
|
||||||
`query_time` time(6) NOT NULL,
|
|
||||||
`lock_time` time(6) NOT NULL,
|
|
||||||
`rows_sent` int(11) NOT NULL,
|
|
||||||
`rows_examined` int(11) NOT NULL,
|
|
||||||
`db` varchar(512) NOT NULL,
|
|
||||||
`last_insert_id` int(11) NOT NULL,
|
|
||||||
`insert_id` int(11) NOT NULL,
|
|
||||||
`server_id` int(10) unsigned NOT NULL,
|
|
||||||
`sql_text` mediumtext NOT NULL,
|
|
||||||
`thread_id` bigint(21) unsigned NOT NULL,
|
|
||||||
`rows_affected` int(11) NOT NULL
|
|
||||||
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log';
|
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
||||||
/*!40101 SET character_set_client = utf8 */;
|
|
||||||
CREATE TABLE IF NOT EXISTS `transaction_registry` (
|
CREATE TABLE IF NOT EXISTS `transaction_registry` (
|
||||||
`transaction_id` bigint(20) unsigned NOT NULL,
|
`transaction_id` bigint(20) unsigned NOT NULL,
|
||||||
`commit_id` bigint(20) unsigned NOT NULL,
|
`commit_id` bigint(20) unsigned NOT NULL,
|
||||||
|
@ -6330,4 +6330,119 @@ SETVAL(`seq_t_i`, 1, 0)
|
||||||
1
|
1
|
||||||
DROP DATABASE IF EXISTS test1;
|
DROP DATABASE IF EXISTS test1;
|
||||||
DROP DATABASE IF EXISTS test2;
|
DROP DATABASE IF EXISTS test2;
|
||||||
|
#
|
||||||
|
# MDEV-27186 Server fails to load a dump, taken on the same version
|
||||||
|
# Oracle mode with packages
|
||||||
|
#
|
||||||
|
CREATE DATABASE test1;
|
||||||
|
CREATE DATABASE test2;
|
||||||
|
USE test1;
|
||||||
|
SET @save_sql_mode=@@sql_mode;
|
||||||
|
SET sql_mode=ORACLE;
|
||||||
|
CREATE OR REPLACE PACKAGE pkg AS
|
||||||
|
END;
|
||||||
|
$$
|
||||||
|
# Dump database 1
|
||||||
|
# Restore from database 1 to database 2
|
||||||
|
use test2;
|
||||||
|
SHOW CREATE PACKAGE pkg;
|
||||||
|
Package sql_mode Create Package character_set_client collation_connection Database Collation
|
||||||
|
pkg PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ORACLE,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,NO_AUTO_CREATE_USER,SIMULTANEOUS_ASSIGNMENT CREATE DEFINER="root"@"localhost" PACKAGE "pkg" AS
|
||||||
|
END utf8 utf8_general_ci latin1_swedish_ci
|
||||||
|
DROP DATABASE test1;
|
||||||
|
DROP DATABASE test2;
|
||||||
|
SET sql_mode=@save_sql_mode;
|
||||||
|
#
|
||||||
|
# MDEV-4875 Can't restore a mysqldump if --add-drop-database meets general_log
|
||||||
|
#
|
||||||
|
CREATE DATABASE test1;
|
||||||
|
# Dump mysql database
|
||||||
|
DROP VIEW IF EXISTS mysql.user;
|
||||||
|
DROP TABLE IF EXISTS mysql.global_priv;
|
||||||
|
DROP TABLE IF EXISTS mysql.user;
|
||||||
|
DROP TABLE IF EXISTS mysql.time_zone_transition_type;
|
||||||
|
DROP TABLE IF EXISTS mysql.time_zone_transition;
|
||||||
|
DROP TABLE IF EXISTS mysql.time_zone_name;
|
||||||
|
DROP TABLE IF EXISTS mysql.time_zone_leap_second;
|
||||||
|
DROP TABLE IF EXISTS mysql.time_zone;
|
||||||
|
DROP TABLE IF EXISTS mysql.tables_priv;
|
||||||
|
DROP TABLE IF EXISTS mysql.table_stats;
|
||||||
|
DROP TABLE IF EXISTS mysql.servers;
|
||||||
|
DROP TABLE IF EXISTS mysql.roles_mapping;
|
||||||
|
DROP TABLE IF EXISTS mysql.proxies_priv;
|
||||||
|
DROP TABLE IF EXISTS mysql.procs_priv;
|
||||||
|
DROP TABLE IF EXISTS mysql.proc;
|
||||||
|
DROP TABLE IF EXISTS mysql.plugin;
|
||||||
|
DROP TABLE IF EXISTS mysql.innodb_table_stats;
|
||||||
|
DROP TABLE IF EXISTS mysql.innodb_index_stats;
|
||||||
|
DROP TABLE IF EXISTS mysql.index_stats;
|
||||||
|
DROP TABLE IF EXISTS mysql.help_topic;
|
||||||
|
DROP TABLE IF EXISTS mysql.help_relation;
|
||||||
|
DROP TABLE IF EXISTS mysql.help_keyword;
|
||||||
|
DROP TABLE IF EXISTS mysql.help_category;
|
||||||
|
DROP TABLE IF EXISTS mysql.gtid_slave_pos;
|
||||||
|
DROP TABLE IF EXISTS mysql.func;
|
||||||
|
DROP TABLE IF EXISTS mysql.event;
|
||||||
|
DROP TABLE IF EXISTS mysql.db;
|
||||||
|
DROP TABLE IF EXISTS mysql.columns_priv;
|
||||||
|
DROP TABLE IF EXISTS mysql.column_stats;
|
||||||
|
# Abbreviated contents
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<mysqldump xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<database name="mysql">
|
||||||
|
<table_structure name="general_log">
|
||||||
|
<field Field="event_time" Type="timestamp(6)" Null="NO" Key="" Default="current_timestamp(6)" Extra="on update current_timestamp(6)" Comment="" />
|
||||||
|
<field Field="user_host" Type="mediumtext" Null="NO" Key="" Extra="" Comment="" />
|
||||||
|
<field Field="thread_id" Type="bigint(21) unsigned" Null="NO" Key="" Extra="" Comment="" />
|
||||||
|
<field Field="server_id" Type="int(10) unsigned" Null="NO" Key="" Extra="" Comment="" />
|
||||||
|
<field Field="command_type" Type="varchar(64)" Null="NO" Key="" Extra="" Comment="" />
|
||||||
|
<field Field="argument" Type="mediumtext" Null="NO" Key="" Extra="" Comment="" />
|
||||||
|
<options Name="general_log" Engine="CSV" Version="10" Row_format="Dynamic" Rows="2" Avg_row_length="0" Data_length="0" Max_data_length="0" Index_length="0" Data_free="0" Collation="utf8_general_ci" Create_options="" Comment="General log" Max_index_length="0" Temporary="N" />
|
||||||
|
</table_structure>
|
||||||
|
<table_structure name="slow_log">
|
||||||
|
<field Field="start_time" Type="timestamp(6)" Null="NO" Key="" Default="current_timestamp(6)" Extra="on update current_timestamp(6)" Comment="" />
|
||||||
|
<field Field="user_host" Type="mediumtext" Null="NO" Key="" Extra="" Comment="" />
|
||||||
|
<field Field="query_time" Type="time(6)" Null="NO" Key="" Extra="" Comment="" />
|
||||||
|
<field Field="lock_time" Type="time(6)" Null="NO" Key="" Extra="" Comment="" />
|
||||||
|
<field Field="rows_sent" Type="int(11)" Null="NO" Key="" Extra="" Comment="" />
|
||||||
|
<field Field="rows_examined" Type="int(11)" Null="NO" Key="" Extra="" Comment="" />
|
||||||
|
<field Field="db" Type="varchar(512)" Null="NO" Key="" Extra="" Comment="" />
|
||||||
|
<field Field="last_insert_id" Type="int(11)" Null="NO" Key="" Extra="" Comment="" />
|
||||||
|
<field Field="insert_id" Type="int(11)" Null="NO" Key="" Extra="" Comment="" />
|
||||||
|
<field Field="server_id" Type="int(10) unsigned" Null="NO" Key="" Extra="" Comment="" />
|
||||||
|
<field Field="sql_text" Type="mediumtext" Null="NO" Key="" Extra="" Comment="" />
|
||||||
|
<field Field="thread_id" Type="bigint(21) unsigned" Null="NO" Key="" Extra="" Comment="" />
|
||||||
|
<field Field="rows_affected" Type="int(11)" Null="NO" Key="" Extra="" Comment="" />
|
||||||
|
<options Name="slow_log" Engine="CSV" Version="10" Row_format="Dynamic" Rows="2" Avg_row_length="0" Data_length="0" Max_data_length="0" Index_length="0" Data_free="0" Collation="utf8_general_ci" Create_options="" Comment="Slow log" Max_index_length="0" Temporary="N" />
|
||||||
|
</table_structure>
|
||||||
|
|
||||||
|
/*!50106 SET GLOBAL LOG_OUTPUT=@save_log_output*/;
|
||||||
|
|
||||||
|
<table_structure name="transaction_registry">
|
||||||
|
<field Field="transaction_id" Type="bigint(20) unsigned" Null="NO" Key="PRI" Extra="" Comment="" />
|
||||||
|
<field Field="commit_id" Type="bigint(20) unsigned" Null="NO" Key="UNI" Extra="" Comment="" />
|
||||||
|
<field Field="begin_timestamp" Type="timestamp(6)" Null="NO" Key="MUL" Default="'0000-00-00 00:00:00.000000'" Extra="" Comment="" />
|
||||||
|
<field Field="commit_timestamp" Type="timestamp(6)" Null="NO" Key="MUL" Default="'0000-00-00 00:00:00.000000'" Extra="" Comment="" />
|
||||||
|
<field Field="isolation_level" Type="enum('READ-UNCOMMITTED','READ-COMMITTED','REPEATABLE-READ','SERIALIZABLE')" Null="NO" Key="" Extra="" Comment="" />
|
||||||
|
<key Table="transaction_registry" Non_unique="0" Key_name="PRIMARY" Seq_in_index="1" Column_name="transaction_id" Collation="A" Cardinality="0" Null="" Index_type="BTREE" Comment="" Index_comment="" />
|
||||||
|
<key Table="transaction_registry" Non_unique="0" Key_name="commit_id" Seq_in_index="1" Column_name="commit_id" Collation="A" Cardinality="0" Null="" Index_type="BTREE" Comment="" Index_comment="" />
|
||||||
|
<key Table="transaction_registry" Non_unique="1" Key_name="begin_timestamp" Seq_in_index="1" Column_name="begin_timestamp" Collation="A" Cardinality="0" Null="" Index_type="BTREE" Comment="" Index_comment="" />
|
||||||
|
<key Table="transaction_registry" Non_unique="1" Key_name="commit_timestamp" Seq_in_index="1" Column_name="commit_timestamp" Collation="A" Cardinality="0" Null="" Index_type="BTREE" Comment="" Index_comment="" />
|
||||||
|
<key Table="transaction_registry" Non_unique="1" Key_name="commit_timestamp" Seq_in_index="2" Column_name="transaction_id" Collation="A" Cardinality="0" Null="" Index_type="BTREE" Comment="" Index_comment="" />
|
||||||
|
<options Name="transaction_registry" Engine="InnoDB" Version="10" Row_format="Dynamic" Rows="0" Avg_row_length="0" Data_length="16384" Max_data_length="0" Index_length="49152" Data_free="0" Create_time="TIMESTAMP" Collation="utf8_bin" Create_options="stats_persistent=0" Comment="" Max_index_length="0" Temporary="N" />
|
||||||
|
</table_structure>
|
||||||
|
</database>
|
||||||
|
<database name="test1">
|
||||||
|
</database>
|
||||||
|
</mysqldump>
|
||||||
|
SET @save_general_log=@@GENERAL_LOG;
|
||||||
|
SET GLOBAL LOG_OUTPUT='TABLE', GLOBAL GENERAL_LOG=1;
|
||||||
|
# Restore mysql database while general log is active
|
||||||
|
# No failure at this stage is the object of the test
|
||||||
|
SELECT @@GLOBAL.LOG_OUTPUT, @@GLOBAL.GENERAL_LOG;
|
||||||
|
@@GLOBAL.LOG_OUTPUT @@GLOBAL.GENERAL_LOG
|
||||||
|
TABLE 1
|
||||||
|
SET GLOBAL LOG_OUTPUT=DEFAULT, GLOBAL GENERAL_LOG=@save_general_log;
|
||||||
|
TRUNCATE TABLE mysql.general_log;
|
||||||
|
DROP DATABASE test1;
|
||||||
# End of 10.3 tests
|
# End of 10.3 tests
|
||||||
|
|
|
@ -2885,4 +2885,94 @@ INSERT INTO t VALUES (1,1),(2,2),(3,3),(4,4);
|
||||||
DROP DATABASE IF EXISTS test1;
|
DROP DATABASE IF EXISTS test1;
|
||||||
DROP DATABASE IF EXISTS test2;
|
DROP DATABASE IF EXISTS test2;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-27186 Server fails to load a dump, taken on the same version
|
||||||
|
--echo # Oracle mode with packages
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
CREATE DATABASE test1;
|
||||||
|
CREATE DATABASE test2;
|
||||||
|
USE test1;
|
||||||
|
SET @save_sql_mode=@@sql_mode;
|
||||||
|
SET sql_mode=ORACLE;
|
||||||
|
|
||||||
|
DELIMITER $$;
|
||||||
|
CREATE OR REPLACE PACKAGE pkg AS
|
||||||
|
END;
|
||||||
|
$$
|
||||||
|
|
||||||
|
DELIMITER ;$$
|
||||||
|
|
||||||
|
--echo # Dump database 1
|
||||||
|
--exec $MYSQL_DUMP --routines test1 > $MYSQLTEST_VARDIR/tmp/dumptest1.sql
|
||||||
|
--echo # Restore from database 1 to database 2
|
||||||
|
|
||||||
|
--exec $MYSQL test2 < $MYSQLTEST_VARDIR/tmp/dumptest1.sql
|
||||||
|
use test2;
|
||||||
|
SHOW CREATE PACKAGE pkg;
|
||||||
|
|
||||||
|
DROP DATABASE test1;
|
||||||
|
DROP DATABASE test2;
|
||||||
|
SET sql_mode=@save_sql_mode;
|
||||||
|
--remove_file $MYSQLTEST_VARDIR/tmp/dumptest1.sql
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-4875 Can't restore a mysqldump if --add-drop-database meets general_log
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
CREATE DATABASE test1;
|
||||||
|
--echo # Dump mysql database
|
||||||
|
--exec $MYSQL_DUMP --add-drop-database --databases mysql test1 > $MYSQLTEST_VARDIR/tmp/dumptest1.sql
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
|
DROP VIEW IF EXISTS mysql.user;
|
||||||
|
DROP TABLE IF EXISTS mysql.global_priv;
|
||||||
|
DROP TABLE IF EXISTS mysql.user;
|
||||||
|
--enable_warnings
|
||||||
|
#DROP TABLE IF EXISTS mysql.transaction_registry;
|
||||||
|
#DROP TABLE IF EXISTS mysql.slow_log;
|
||||||
|
#DROP TABLE IF EXISTS mysql.general_log;
|
||||||
|
DROP TABLE IF EXISTS mysql.time_zone_transition_type;
|
||||||
|
DROP TABLE IF EXISTS mysql.time_zone_transition;
|
||||||
|
DROP TABLE IF EXISTS mysql.time_zone_name;
|
||||||
|
DROP TABLE IF EXISTS mysql.time_zone_leap_second;
|
||||||
|
DROP TABLE IF EXISTS mysql.time_zone;
|
||||||
|
DROP TABLE IF EXISTS mysql.tables_priv;
|
||||||
|
DROP TABLE IF EXISTS mysql.table_stats;
|
||||||
|
DROP TABLE IF EXISTS mysql.servers;
|
||||||
|
DROP TABLE IF EXISTS mysql.roles_mapping;
|
||||||
|
DROP TABLE IF EXISTS mysql.proxies_priv;
|
||||||
|
DROP TABLE IF EXISTS mysql.procs_priv;
|
||||||
|
DROP TABLE IF EXISTS mysql.proc;
|
||||||
|
DROP TABLE IF EXISTS mysql.plugin;
|
||||||
|
DROP TABLE IF EXISTS mysql.innodb_table_stats;
|
||||||
|
DROP TABLE IF EXISTS mysql.innodb_index_stats;
|
||||||
|
DROP TABLE IF EXISTS mysql.index_stats;
|
||||||
|
DROP TABLE IF EXISTS mysql.help_topic;
|
||||||
|
DROP TABLE IF EXISTS mysql.help_relation;
|
||||||
|
DROP TABLE IF EXISTS mysql.help_keyword;
|
||||||
|
DROP TABLE IF EXISTS mysql.help_category;
|
||||||
|
DROP TABLE IF EXISTS mysql.gtid_slave_pos;
|
||||||
|
DROP TABLE IF EXISTS mysql.func;
|
||||||
|
DROP TABLE IF EXISTS mysql.event;
|
||||||
|
DROP TABLE IF EXISTS mysql.db;
|
||||||
|
DROP TABLE IF EXISTS mysql.columns_priv;
|
||||||
|
DROP TABLE IF EXISTS mysql.column_stats;
|
||||||
|
|
||||||
|
--echo # Abbreviated contents
|
||||||
|
--replace_regex /Create_time="[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}"/Create_time="TIMESTAMP"/
|
||||||
|
--exec $MYSQL_DUMP --xml --skip-comments --no-data --add-drop-database --databases mysql test1
|
||||||
|
|
||||||
|
SET @save_general_log=@@GENERAL_LOG;
|
||||||
|
SET GLOBAL LOG_OUTPUT='TABLE', GLOBAL GENERAL_LOG=1;
|
||||||
|
|
||||||
|
--echo # Restore mysql database while general log is active
|
||||||
|
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/dumptest1.sql
|
||||||
|
--echo # No failure at this stage is the object of the test
|
||||||
|
SELECT @@GLOBAL.LOG_OUTPUT, @@GLOBAL.GENERAL_LOG;
|
||||||
|
SET GLOBAL LOG_OUTPUT=DEFAULT, GLOBAL GENERAL_LOG=@save_general_log;
|
||||||
|
TRUNCATE TABLE mysql.general_log;
|
||||||
|
DROP DATABASE test1;
|
||||||
|
--remove_file $MYSQLTEST_VARDIR/tmp/dumptest1.sql
|
||||||
|
|
||||||
--echo # End of 10.3 tests
|
--echo # End of 10.3 tests
|
||||||
|
|
|
@ -3584,6 +3584,26 @@ DELETE FROM t1 ORDER BY c;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
SET @@SESSION.max_sort_length=DEFAULT;
|
SET @@SESSION.max_sort_length=DEFAULT;
|
||||||
SET sql_mode=DEFAULT;
|
SET sql_mode=DEFAULT;
|
||||||
|
#
|
||||||
|
# MDEV-25994 Crash with union of my_decimal type in ORDER BY clause
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (v1 INTEGER) ;
|
||||||
|
INSERT INTO t1 (v1) VALUES (8);
|
||||||
|
UPDATE t1 SET v1 = 1 ORDER BY (SELECT 1.1 UNION SELECT -1);
|
||||||
|
ERROR 21000: Subquery returns more than 1 row
|
||||||
|
# This one must be successful
|
||||||
|
UPDATE t1 SET v1 = 2 ORDER BY (SELECT 1 UNION SELECT 1);
|
||||||
|
UPDATE t1 SET v1 = 3 ORDER BY (SELECT 'a' UNION SELECT 'b');
|
||||||
|
ERROR 21000: Subquery returns more than 1 row
|
||||||
|
# Insert some more data
|
||||||
|
INSERT INTO t1 (v1) VALUES (8),(9),(100),(-234),(46584),(0);
|
||||||
|
UPDATE t1 SET v1 = v1+1 ORDER BY (SELECT 100.122 UNION SELECT -189.2);
|
||||||
|
ERROR 21000: Subquery returns more than 1 row
|
||||||
|
# This one must be successful
|
||||||
|
UPDATE t1 SET v1 = v1-200 ORDER BY (SELECT 1 UNION SELECT 1);
|
||||||
|
UPDATE t1 SET v1 = v1 ORDER BY (SELECT 'abc' UNION SELECT 'bbb');
|
||||||
|
ERROR 21000: Subquery returns more than 1 row
|
||||||
|
DROP TABLE t1;
|
||||||
# End of 10.2 tests
|
# End of 10.2 tests
|
||||||
#
|
#
|
||||||
# MDEV-16214: Incorrect plan taken by the optimizer , uses INDEX instead of ref access with ORDER BY
|
# MDEV-16214: Incorrect plan taken by the optimizer , uses INDEX instead of ref access with ORDER BY
|
||||||
|
|
|
@ -2332,6 +2332,31 @@ DROP TABLE t1;
|
||||||
SET @@SESSION.max_sort_length=DEFAULT;
|
SET @@SESSION.max_sort_length=DEFAULT;
|
||||||
SET sql_mode=DEFAULT;
|
SET sql_mode=DEFAULT;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-25994 Crash with union of my_decimal type in ORDER BY clause
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
CREATE TABLE t1 (v1 INTEGER) ;
|
||||||
|
INSERT INTO t1 (v1) VALUES (8);
|
||||||
|
--error ER_SUBQUERY_NO_1_ROW
|
||||||
|
UPDATE t1 SET v1 = 1 ORDER BY (SELECT 1.1 UNION SELECT -1);
|
||||||
|
--echo # This one must be successful
|
||||||
|
UPDATE t1 SET v1 = 2 ORDER BY (SELECT 1 UNION SELECT 1);
|
||||||
|
--error ER_SUBQUERY_NO_1_ROW
|
||||||
|
UPDATE t1 SET v1 = 3 ORDER BY (SELECT 'a' UNION SELECT 'b');
|
||||||
|
|
||||||
|
-- echo # Insert some more data
|
||||||
|
INSERT INTO t1 (v1) VALUES (8),(9),(100),(-234),(46584),(0);
|
||||||
|
--error ER_SUBQUERY_NO_1_ROW
|
||||||
|
UPDATE t1 SET v1 = v1+1 ORDER BY (SELECT 100.122 UNION SELECT -189.2);
|
||||||
|
--echo # This one must be successful
|
||||||
|
UPDATE t1 SET v1 = v1-200 ORDER BY (SELECT 1 UNION SELECT 1);
|
||||||
|
--error ER_SUBQUERY_NO_1_ROW
|
||||||
|
UPDATE t1 SET v1 = v1 ORDER BY (SELECT 'abc' UNION SELECT 'bbb');
|
||||||
|
|
||||||
|
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
|
||||||
--echo # End of 10.2 tests
|
--echo # End of 10.2 tests
|
||||||
|
|
||||||
|
|
|
@ -1364,6 +1364,48 @@ SELECT tmp 1.e.test FROM scientific_notation AS tmp;
|
||||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '1.e.test FROM scientific_notation AS tmp' at line 1
|
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '1.e.test FROM scientific_notation AS tmp' at line 1
|
||||||
DROP TABLE scientific_notation;
|
DROP TABLE scientific_notation;
|
||||||
#
|
#
|
||||||
|
# MDEV-6899 extra semicolon in show create event syntax
|
||||||
|
#
|
||||||
|
set timestamp=unix_timestamp('2020-10-10 5:5:5');
|
||||||
|
create table t1 (a int);
|
||||||
|
create trigger a before insert on t1 for each row set @a:=1;select 2$
|
||||||
|
2
|
||||||
|
2
|
||||||
|
show create trigger a;
|
||||||
|
Trigger a
|
||||||
|
sql_mode STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
|
||||||
|
SQL Original Statement CREATE DEFINER=`root`@`localhost` trigger a before insert on t1 for each row set @a:=1
|
||||||
|
character_set_client latin1
|
||||||
|
collation_connection latin1_swedish_ci
|
||||||
|
Database Collation latin1_swedish_ci
|
||||||
|
Created 2020-10-10 05:05:05.00
|
||||||
|
drop table t1;
|
||||||
|
create procedure a() select 1;select 2$
|
||||||
|
2
|
||||||
|
2
|
||||||
|
show create procedure a;
|
||||||
|
Procedure a
|
||||||
|
sql_mode STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
|
||||||
|
Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `a`()
|
||||||
|
select 1
|
||||||
|
character_set_client latin1
|
||||||
|
collation_connection latin1_swedish_ci
|
||||||
|
Database Collation latin1_swedish_ci
|
||||||
|
drop procedure a;
|
||||||
|
create function a() returns int return 1;select 2$
|
||||||
|
2
|
||||||
|
2
|
||||||
|
show create function a;
|
||||||
|
Function a
|
||||||
|
sql_mode STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
|
||||||
|
Create Function CREATE DEFINER=`root`@`localhost` FUNCTION `a`() RETURNS int(11)
|
||||||
|
return 1
|
||||||
|
character_set_client latin1
|
||||||
|
collation_connection latin1_swedish_ci
|
||||||
|
Database Collation latin1_swedish_ci
|
||||||
|
drop function a;
|
||||||
|
set timestamp=default;
|
||||||
|
#
|
||||||
# End of 10.2 tests
|
# End of 10.2 tests
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
|
@ -1402,6 +1402,30 @@ SELECT tmp 1.e.test FROM scientific_notation AS tmp;
|
||||||
|
|
||||||
DROP TABLE scientific_notation;
|
DROP TABLE scientific_notation;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-6899 extra semicolon in show create event syntax
|
||||||
|
--echo #
|
||||||
|
set timestamp=unix_timestamp('2020-10-10 5:5:5');
|
||||||
|
create table t1 (a int);
|
||||||
|
delimiter $;
|
||||||
|
create trigger a before insert on t1 for each row set @a:=1;select 2$
|
||||||
|
delimiter ;$
|
||||||
|
query_vertical show create trigger a;
|
||||||
|
drop table t1;
|
||||||
|
|
||||||
|
delimiter $;
|
||||||
|
create procedure a() select 1;select 2$
|
||||||
|
delimiter ;$
|
||||||
|
query_vertical show create procedure a;
|
||||||
|
drop procedure a;
|
||||||
|
|
||||||
|
delimiter $;
|
||||||
|
create function a() returns int return 1;select 2$
|
||||||
|
delimiter ;$
|
||||||
|
query_vertical show create function a;
|
||||||
|
drop function a;
|
||||||
|
set timestamp=default;
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # End of 10.2 tests
|
--echo # End of 10.2 tests
|
||||||
--echo #
|
--echo #
|
||||||
|
|
|
@ -102,3 +102,23 @@ ROLLBACK AND NO CHAIN NO RELEASE;
|
||||||
#
|
#
|
||||||
# End of 5.5 tests
|
# End of 5.5 tests
|
||||||
#
|
#
|
||||||
|
#
|
||||||
|
# MDEV-6899 extra semicolon in show create event syntax
|
||||||
|
#
|
||||||
|
set timestamp=unix_timestamp('2020-10-10 5:5:5');
|
||||||
|
create event a on schedule every 1 day do set @a:=1;select 2$
|
||||||
|
2
|
||||||
|
2
|
||||||
|
show create event a;
|
||||||
|
Event a
|
||||||
|
sql_mode STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
|
||||||
|
time_zone SYSTEM
|
||||||
|
Create Event CREATE DEFINER=`root`@`localhost` EVENT `a` ON SCHEDULE EVERY 1 DAY STARTS '2020-10-10 05:05:05' ON COMPLETION NOT PRESERVE ENABLE DO set @a:=1
|
||||||
|
character_set_client latin1
|
||||||
|
collation_connection latin1_swedish_ci
|
||||||
|
Database Collation latin1_swedish_ci
|
||||||
|
drop event a;
|
||||||
|
set timestamp=default;
|
||||||
|
#
|
||||||
|
# End of 10.2 tests
|
||||||
|
#
|
||||||
|
|
|
@ -99,3 +99,18 @@ ROLLBACK AND NO CHAIN NO RELEASE;
|
||||||
--echo #
|
--echo #
|
||||||
--echo # End of 5.5 tests
|
--echo # End of 5.5 tests
|
||||||
--echo #
|
--echo #
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-6899 extra semicolon in show create event syntax
|
||||||
|
--echo #
|
||||||
|
set timestamp=unix_timestamp('2020-10-10 5:5:5');
|
||||||
|
delimiter $;
|
||||||
|
create event a on schedule every 1 day do set @a:=1;select 2$
|
||||||
|
delimiter ;$
|
||||||
|
query_vertical show create event a;
|
||||||
|
drop event a;
|
||||||
|
set timestamp=default;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # End of 10.2 tests
|
||||||
|
--echo #
|
||||||
|
|
|
@ -357,6 +357,15 @@ select * from mysql.plugin WHERE name='unexisting_plugin';
|
||||||
name dl
|
name dl
|
||||||
UNINSTALL PLUGIN unexisting_plugin;
|
UNINSTALL PLUGIN unexisting_plugin;
|
||||||
ERROR 42000: PLUGIN unexisting_plugin does not exist
|
ERROR 42000: PLUGIN unexisting_plugin does not exist
|
||||||
|
#
|
||||||
|
# MDEV-26323 use-after-poison issue of MariaDB server
|
||||||
|
#
|
||||||
|
INSTALL PLUGIN DEALLOCATE SONAME '';
|
||||||
|
ERROR HY000: Can't open shared library '.so'
|
||||||
|
INSTALL PLUGIN DEALLOCATE SONAME 'x';
|
||||||
|
ERROR HY000: Can't open shared library 'x.so'
|
||||||
|
INSTALL PLUGIN DEALLOCATE SONAME 'xx';
|
||||||
|
ERROR HY000: Can't open shared library 'xx.so'
|
||||||
# End of 10.2 tests
|
# End of 10.2 tests
|
||||||
#
|
#
|
||||||
# MDEV-16294: INSTALL PLUGIN IF NOT EXISTS / UNINSTALL PLUGIN IF EXISTS
|
# MDEV-16294: INSTALL PLUGIN IF NOT EXISTS / UNINSTALL PLUGIN IF EXISTS
|
||||||
|
|
|
@ -296,6 +296,23 @@ select * from mysql.plugin WHERE name='unexisting_plugin';
|
||||||
--error ER_SP_DOES_NOT_EXIST
|
--error ER_SP_DOES_NOT_EXIST
|
||||||
UNINSTALL PLUGIN unexisting_plugin;
|
UNINSTALL PLUGIN unexisting_plugin;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-26323 use-after-poison issue of MariaDB server
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
--replace_regex /library '.*[\\/].(dll|so)' [(].*[)]/library '.so'/
|
||||||
|
--error ER_CANT_OPEN_LIBRARY
|
||||||
|
INSTALL PLUGIN DEALLOCATE SONAME '';
|
||||||
|
|
||||||
|
--replace_regex /library '.*[\\/]x.(dll|so)' [(].*[)]/library 'x.so'/
|
||||||
|
--error ER_CANT_OPEN_LIBRARY
|
||||||
|
INSTALL PLUGIN DEALLOCATE SONAME 'x';
|
||||||
|
|
||||||
|
--replace_regex /library '.*[\\/]xx.(dll|so)' [(].*[)]/library 'xx.so'/
|
||||||
|
--error ER_CANT_OPEN_LIBRARY
|
||||||
|
INSTALL PLUGIN DEALLOCATE SONAME 'xx';
|
||||||
|
|
||||||
|
|
||||||
--echo # End of 10.2 tests
|
--echo # End of 10.2 tests
|
||||||
|
|
||||||
--source include/install_plugin_if_exists.inc
|
--source include/install_plugin_if_exists.inc
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
create table t1 (a int) engine=myisam data directory='MYSQL_TMP_DIR';
|
create table t1 (a int) engine=myisam data directory='MYSQL_TMP_DIR';
|
||||||
insert t1 values (1);
|
insert t1 values (1);
|
||||||
# Some systems fail with errcode 40, or 90 (MIPS) when doing openat,
|
# Some systems fail with errcode 31 (FreeBSD), 40, or 90 (MIPS) when doing openat,
|
||||||
# while others don't have openat and fail with errcode 20.
|
# while others don't have openat and fail with errcode 20.
|
||||||
repair table t1;
|
repair table t1;
|
||||||
Table Op Msg_type Msg_text
|
Table Op Msg_type Msg_text
|
||||||
|
|
|
@ -9,9 +9,9 @@
|
||||||
eval create table t1 (a int) engine=myisam data directory='$MYSQL_TMP_DIR';
|
eval create table t1 (a int) engine=myisam data directory='$MYSQL_TMP_DIR';
|
||||||
insert t1 values (1);
|
insert t1 values (1);
|
||||||
--system ln -s $MYSQL_TMP_DIR/foobar5543 $MYSQL_TMP_DIR/t1.TMD
|
--system ln -s $MYSQL_TMP_DIR/foobar5543 $MYSQL_TMP_DIR/t1.TMD
|
||||||
--echo # Some systems fail with errcode 40, or 90 (MIPS) when doing openat,
|
--echo # Some systems fail with errcode 31 (FreeBSD), 40, or 90 (MIPS) when doing openat,
|
||||||
--echo # while others don't have openat and fail with errcode 20.
|
--echo # while others don't have openat and fail with errcode 20.
|
||||||
--replace_regex / '.*\/t1/ 'MYSQL_TMP_DIR\/t1/ /[49]0/20/ /".*"/"<errmsg>"/
|
--replace_regex / '.*\/t1/ 'MYSQL_TMP_DIR\/t1/ /[49]0|31/20/ /".*"/"<errmsg>"/
|
||||||
repair table t1;
|
repair table t1;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ drop table t1;
|
||||||
eval create table t2 (a int) engine=aria data directory='$MYSQL_TMP_DIR';
|
eval create table t2 (a int) engine=aria data directory='$MYSQL_TMP_DIR';
|
||||||
insert t2 values (1);
|
insert t2 values (1);
|
||||||
--system ln -s $MYSQL_TMP_DIR/foobar5543 $MYSQL_TMP_DIR/t2.TMD
|
--system ln -s $MYSQL_TMP_DIR/foobar5543 $MYSQL_TMP_DIR/t2.TMD
|
||||||
--replace_regex / '.*\/t2/ 'MYSQL_TMP_DIR\/t2/ /[49]0/20/ /".*"/"<errmsg>"/
|
--replace_regex / '.*\/t2/ 'MYSQL_TMP_DIR\/t2/ /[49]0|31/20/ /".*"/"<errmsg>"/
|
||||||
repair table t2;
|
repair table t2;
|
||||||
drop table t2;
|
drop table t2;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
drop table if exists t1;
|
|
||||||
create table t1 (a int null, v varchar(100)) engine=myisam checksum=0;
|
create table t1 (a int null, v varchar(100)) engine=myisam checksum=0;
|
||||||
insert into t1 values(null, null), (1, "hello");
|
insert into t1 values(null, null), (1, "hello");
|
||||||
checksum table t1;
|
checksum table t1;
|
||||||
|
@ -98,4 +97,48 @@ CHECKSUM TABLE t1 EXTENDED;
|
||||||
Table Checksum
|
Table Checksum
|
||||||
test.t1 2326430205
|
test.t1 2326430205
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
#
|
||||||
# End of 5.5 tests
|
# End of 5.5 tests
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# MDEV-28020 CHECKSUM TABLE calculates different checksums
|
||||||
|
#
|
||||||
|
create table t1 ( a int, b int as (a) virtual, c text) engine=myisam checksum=1;
|
||||||
|
insert ignore t1 values (1,2,'foo'),(2,3,'bar');
|
||||||
|
Warnings:
|
||||||
|
Warning 1906 The value specified for generated column 'b' in table 't1' has been ignored
|
||||||
|
Warning 1906 The value specified for generated column 'b' in table 't1' has been ignored
|
||||||
|
checksum table t1 extended;
|
||||||
|
Table Checksum
|
||||||
|
test.t1 4101438232
|
||||||
|
checksum table t1;
|
||||||
|
Table Checksum
|
||||||
|
test.t1 4101438232
|
||||||
|
drop table t1;
|
||||||
|
create table t1 ( a int, b int as (a) virtual, c text, key(b)) engine=myisam checksum=1;
|
||||||
|
insert ignore t1 values (1,2,'foo'),(2,3,'bar');
|
||||||
|
Warnings:
|
||||||
|
Warning 1906 The value specified for generated column 'b' in table 't1' has been ignored
|
||||||
|
Warning 1906 The value specified for generated column 'b' in table 't1' has been ignored
|
||||||
|
checksum table t1 extended;
|
||||||
|
Table Checksum
|
||||||
|
test.t1 4101438232
|
||||||
|
checksum table t1;
|
||||||
|
Table Checksum
|
||||||
|
test.t1 4101438232
|
||||||
|
drop table t1;
|
||||||
|
create table t1 ( a int, b int as (a) stored, c text) engine=myisam checksum=1;
|
||||||
|
insert ignore t1 values (1,2,'foo'),(2,3,'bar');
|
||||||
|
Warnings:
|
||||||
|
Warning 1906 The value specified for generated column 'b' in table 't1' has been ignored
|
||||||
|
Warning 1906 The value specified for generated column 'b' in table 't1' has been ignored
|
||||||
|
checksum table t1 extended;
|
||||||
|
Table Checksum
|
||||||
|
test.t1 2897795735
|
||||||
|
checksum table t1;
|
||||||
|
Table Checksum
|
||||||
|
test.t1 2897795735
|
||||||
|
drop table t1;
|
||||||
|
#
|
||||||
|
# End of 10.2 tests
|
||||||
|
#
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
drop table if exists t1;
|
|
||||||
create table t1 (a int null, v varchar(100)) engine=myisam checksum=0;
|
create table t1 (a int null, v varchar(100)) engine=myisam checksum=0;
|
||||||
insert into t1 values(null, null), (1, "hello");
|
insert into t1 values(null, null), (1, "hello");
|
||||||
checksum table t1;
|
checksum table t1;
|
||||||
|
@ -98,4 +97,48 @@ CHECKSUM TABLE t1 EXTENDED;
|
||||||
Table Checksum
|
Table Checksum
|
||||||
test.t1 2326430205
|
test.t1 2326430205
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
#
|
||||||
# End of 5.5 tests
|
# End of 5.5 tests
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# MDEV-28020 CHECKSUM TABLE calculates different checksums
|
||||||
|
#
|
||||||
|
create table t1 ( a int, b int as (a) virtual, c text) engine=myisam checksum=1;
|
||||||
|
insert ignore t1 values (1,2,'foo'),(2,3,'bar');
|
||||||
|
Warnings:
|
||||||
|
Warning 1906 The value specified for generated column 'b' in table 't1' has been ignored
|
||||||
|
Warning 1906 The value specified for generated column 'b' in table 't1' has been ignored
|
||||||
|
checksum table t1 extended;
|
||||||
|
Table Checksum
|
||||||
|
test.t1 4101438232
|
||||||
|
checksum table t1;
|
||||||
|
Table Checksum
|
||||||
|
test.t1 4101438232
|
||||||
|
drop table t1;
|
||||||
|
create table t1 ( a int, b int as (a) virtual, c text, key(b)) engine=myisam checksum=1;
|
||||||
|
insert ignore t1 values (1,2,'foo'),(2,3,'bar');
|
||||||
|
Warnings:
|
||||||
|
Warning 1906 The value specified for generated column 'b' in table 't1' has been ignored
|
||||||
|
Warning 1906 The value specified for generated column 'b' in table 't1' has been ignored
|
||||||
|
checksum table t1 extended;
|
||||||
|
Table Checksum
|
||||||
|
test.t1 4101438232
|
||||||
|
checksum table t1;
|
||||||
|
Table Checksum
|
||||||
|
test.t1 4101438232
|
||||||
|
drop table t1;
|
||||||
|
create table t1 ( a int, b int as (a) stored, c text) engine=myisam checksum=1;
|
||||||
|
insert ignore t1 values (1,2,'foo'),(2,3,'bar');
|
||||||
|
Warnings:
|
||||||
|
Warning 1906 The value specified for generated column 'b' in table 't1' has been ignored
|
||||||
|
Warning 1906 The value specified for generated column 'b' in table 't1' has been ignored
|
||||||
|
checksum table t1 extended;
|
||||||
|
Table Checksum
|
||||||
|
test.t1 2897795735
|
||||||
|
checksum table t1;
|
||||||
|
Table Checksum
|
||||||
|
test.t1 2897795735
|
||||||
|
drop table t1;
|
||||||
|
#
|
||||||
|
# End of 10.2 tests
|
||||||
|
#
|
||||||
|
|
|
@ -2,12 +2,8 @@
|
||||||
# Test checksum
|
# Test checksum
|
||||||
#
|
#
|
||||||
|
|
||||||
-- source include/have_innodb.inc
|
--source include/have_innodb.inc
|
||||||
-- source include/have_maria.inc
|
--source include/have_maria.inc
|
||||||
|
|
||||||
--disable_warnings
|
|
||||||
drop table if exists t1;
|
|
||||||
--enable_warnings
|
|
||||||
|
|
||||||
create table t1 (a int null, v varchar(100)) engine=myisam checksum=0;
|
create table t1 (a int null, v varchar(100)) engine=myisam checksum=0;
|
||||||
insert into t1 values(null, null), (1, "hello");
|
insert into t1 values(null, null), (1, "hello");
|
||||||
|
@ -76,4 +72,31 @@ CHECKSUM TABLE t1 EXTENDED;
|
||||||
|
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
|
--echo #
|
||||||
--echo # End of 5.5 tests
|
--echo # End of 5.5 tests
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-28020 CHECKSUM TABLE calculates different checksums
|
||||||
|
--echo #
|
||||||
|
create table t1 ( a int, b int as (a) virtual, c text) engine=myisam checksum=1;
|
||||||
|
insert ignore t1 values (1,2,'foo'),(2,3,'bar');
|
||||||
|
checksum table t1 extended;
|
||||||
|
checksum table t1;
|
||||||
|
drop table t1;
|
||||||
|
|
||||||
|
create table t1 ( a int, b int as (a) virtual, c text, key(b)) engine=myisam checksum=1;
|
||||||
|
insert ignore t1 values (1,2,'foo'),(2,3,'bar');
|
||||||
|
checksum table t1 extended;
|
||||||
|
checksum table t1;
|
||||||
|
drop table t1;
|
||||||
|
|
||||||
|
create table t1 ( a int, b int as (a) stored, c text) engine=myisam checksum=1;
|
||||||
|
insert ignore t1 values (1,2,'foo'),(2,3,'bar');
|
||||||
|
checksum table t1 extended;
|
||||||
|
checksum table t1;
|
||||||
|
drop table t1;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # End of 10.2 tests
|
||||||
|
--echo #
|
||||||
|
|
|
@ -1261,7 +1261,7 @@ a
|
||||||
SHOW CREATE TABLE t1;
|
SHOW CREATE TABLE t1;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
t1 CREATE TABLE `t1` (
|
t1 CREATE TABLE `t1` (
|
||||||
`a` int(3) NOT NULL
|
`a` int(3) DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
drop table t1;
|
drop table t1;
|
||||||
create table t1 (a int);
|
create table t1 (a int);
|
||||||
|
|
|
@ -2905,6 +2905,81 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||||
2 DEPENDENT SUBQUERY tn eq_ref PRIMARY PRIMARY 32 test.tms.key1 1 Using where
|
2 DEPENDENT SUBQUERY tn eq_ref PRIMARY PRIMARY 32 test.tms.key1 1 Using where
|
||||||
set optimizer_switch=@tmp_os;
|
set optimizer_switch=@tmp_os;
|
||||||
drop table t1, t10, t11;
|
drop table t1, t10, t11;
|
||||||
|
#
|
||||||
|
# MDEV-28268: Server crashes in Expression_cache_tracker::fetch_current_stats
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (a INT, b INT);
|
||||||
|
INSERT INTO t1 VALUES (1,2),(3,4);
|
||||||
|
ANALYZE FORMAT=JSON
|
||||||
|
SELECT DISTINCT
|
||||||
|
(SELECT MIN(a) FROM t1 WHERE b <= ANY (SELECT a FROM t1)) AS f
|
||||||
|
FROM t1;
|
||||||
|
ANALYZE
|
||||||
|
{
|
||||||
|
"query_block": {
|
||||||
|
"select_id": 1,
|
||||||
|
"r_loops": 1,
|
||||||
|
"r_total_time_ms": "REPLACED",
|
||||||
|
"duplicate_removal": {
|
||||||
|
"temporary_table": {
|
||||||
|
"table": {
|
||||||
|
"table_name": "t1",
|
||||||
|
"access_type": "ALL",
|
||||||
|
"r_loops": 1,
|
||||||
|
"rows": 2,
|
||||||
|
"r_rows": 2,
|
||||||
|
"r_total_time_ms": "REPLACED",
|
||||||
|
"filtered": 100,
|
||||||
|
"r_filtered": 100
|
||||||
|
},
|
||||||
|
"subqueries": [
|
||||||
|
{
|
||||||
|
"expression_cache": {
|
||||||
|
"state": "disabled",
|
||||||
|
"r_loops": 0,
|
||||||
|
"query_block": {
|
||||||
|
"select_id": 2,
|
||||||
|
"r_loops": 1,
|
||||||
|
"r_total_time_ms": "REPLACED",
|
||||||
|
"table": {
|
||||||
|
"table_name": "t1",
|
||||||
|
"access_type": "ALL",
|
||||||
|
"r_loops": 1,
|
||||||
|
"rows": 2,
|
||||||
|
"r_rows": 2,
|
||||||
|
"r_total_time_ms": "REPLACED",
|
||||||
|
"filtered": 100,
|
||||||
|
"r_filtered": 50,
|
||||||
|
"attached_condition": "<nop>(<in_optimizer>(t1.b,(subquery#3) >= 4))"
|
||||||
|
},
|
||||||
|
"subqueries": [
|
||||||
|
{
|
||||||
|
"query_block": {
|
||||||
|
"select_id": 3,
|
||||||
|
"r_loops": 1,
|
||||||
|
"r_total_time_ms": "REPLACED",
|
||||||
|
"table": {
|
||||||
|
"table_name": "t1",
|
||||||
|
"access_type": "ALL",
|
||||||
|
"r_loops": 1,
|
||||||
|
"rows": 2,
|
||||||
|
"r_rows": 2,
|
||||||
|
"r_total_time_ms": "REPLACED",
|
||||||
|
"filtered": 100,
|
||||||
|
"r_filtered": 100
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
DROP TABLE t1;
|
||||||
# End of 10.2 tests
|
# End of 10.2 tests
|
||||||
# End of 10.3 tests
|
# End of 10.3 tests
|
||||||
#
|
#
|
||||||
|
|
|
@ -2421,6 +2421,21 @@ set optimizer_switch=@tmp_os;
|
||||||
|
|
||||||
drop table t1, t10, t11;
|
drop table t1, t10, t11;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-28268: Server crashes in Expression_cache_tracker::fetch_current_stats
|
||||||
|
--echo #
|
||||||
|
CREATE TABLE t1 (a INT, b INT);
|
||||||
|
INSERT INTO t1 VALUES (1,2),(3,4);
|
||||||
|
|
||||||
|
--source include/analyze-format.inc
|
||||||
|
ANALYZE FORMAT=JSON
|
||||||
|
SELECT DISTINCT
|
||||||
|
(SELECT MIN(a) FROM t1 WHERE b <= ANY (SELECT a FROM t1)) AS f
|
||||||
|
FROM t1;
|
||||||
|
|
||||||
|
# Cleanup
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
--echo # End of 10.2 tests
|
--echo # End of 10.2 tests
|
||||||
|
|
||||||
--echo # End of 10.3 tests
|
--echo # End of 10.3 tests
|
||||||
|
|
|
@ -581,7 +581,7 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||||
2 DEPENDENT SUBQUERY t2 ref key1 key1 5 test.t1.a # Using where; Using filesort
|
2 DEPENDENT SUBQUERY t2 ref key1 key1 5 test.t1.a # Using where; Using filesort
|
||||||
drop table t1,t2;
|
drop table t1,t2;
|
||||||
#
|
#
|
||||||
# mdev-12931: semi-join in ON expression of STRAIGHT_JOIN
|
# MDEV-12931: semi-join in ON expression of STRAIGHT_JOIN
|
||||||
# joining a base table and a mergeable derived table
|
# joining a base table and a mergeable derived table
|
||||||
#
|
#
|
||||||
CREATE TABLE t1 (f1 int) ENGINE=InnoDB;
|
CREATE TABLE t1 (f1 int) ENGINE=InnoDB;
|
||||||
|
@ -633,6 +633,52 @@ a b
|
||||||
2019-03-10 02:55:05 2019-03-10 02:55:05
|
2019-03-10 02:55:05 2019-03-10 02:55:05
|
||||||
DROP TABLE t1,t2;
|
DROP TABLE t1,t2;
|
||||||
set character_set_connection=@save_character_set_connection;
|
set character_set_connection=@save_character_set_connection;
|
||||||
|
#
|
||||||
|
# MDEV-26047: MariaDB server crash at Item_subselect::init_expr_cache_tracker
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (a int) engine=innodb;
|
||||||
|
SELECT 1 IN (
|
||||||
|
SELECT NULL
|
||||||
|
FROM t1
|
||||||
|
WHERE
|
||||||
|
a IS NOT NULL
|
||||||
|
GROUP BY
|
||||||
|
(SELECT NULL from dual WHERE a = 1)
|
||||||
|
);
|
||||||
|
1 IN (
|
||||||
|
SELECT NULL
|
||||||
|
FROM t1
|
||||||
|
WHERE
|
||||||
|
a IS NOT NULL
|
||||||
|
GROUP BY
|
||||||
|
(SELECT NULL from dual WHERE a = 1)
|
||||||
|
)
|
||||||
|
0
|
||||||
|
drop table t1;
|
||||||
|
# Testcase from MDEV-26164
|
||||||
|
create table t1(a int);
|
||||||
|
# Disable the warning as it includes current time and changes for every test run.
|
||||||
|
select 1 from t1 where not exists
|
||||||
|
(
|
||||||
|
select 1 from t1 where binary current_time()
|
||||||
|
group by (select a),(select 1)
|
||||||
|
);
|
||||||
|
1
|
||||||
|
drop table t1;
|
||||||
|
#
|
||||||
|
# MDEV-28437: Assertion `!eliminated' failed in Item_subselect::exec
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
|
||||||
|
INSERT INTO t1 VALUES (1),(2);
|
||||||
|
CREATE TABLE t2 (b INT PRIMARY KEY) ENGINE=InnoDB;
|
||||||
|
INSERT INTO t1 VALUES (3),(4);
|
||||||
|
SELECT 1 IN (SELECT a FROM t1 LEFT JOIN t2 ON (a = b AND EXISTS (SELECT * FROM t1)));
|
||||||
|
1 IN (SELECT a FROM t1 LEFT JOIN t2 ON (a = b AND EXISTS (SELECT * FROM t1)))
|
||||||
|
1
|
||||||
|
drop table t1,t2;
|
||||||
|
#
|
||||||
|
# End of 10.2 tests
|
||||||
|
#
|
||||||
#
|
#
|
||||||
# MDEV-17362: SIGSEGV in JOIN::optimize_inner or Assertion `fixed == 0'
|
# MDEV-17362: SIGSEGV in JOIN::optimize_inner or Assertion `fixed == 0'
|
||||||
# failed in Item_equal::fix_fields, server crashes after 2nd execution
|
# failed in Item_equal::fix_fields, server crashes after 2nd execution
|
||||||
|
|
|
@ -575,7 +575,7 @@ from
|
||||||
drop table t1,t2;
|
drop table t1,t2;
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # mdev-12931: semi-join in ON expression of STRAIGHT_JOIN
|
--echo # MDEV-12931: semi-join in ON expression of STRAIGHT_JOIN
|
||||||
--echo # joining a base table and a mergeable derived table
|
--echo # joining a base table and a mergeable derived table
|
||||||
--echo #
|
--echo #
|
||||||
|
|
||||||
|
@ -625,6 +625,49 @@ DROP TABLE t1,t2;
|
||||||
|
|
||||||
set character_set_connection=@save_character_set_connection;
|
set character_set_connection=@save_character_set_connection;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-26047: MariaDB server crash at Item_subselect::init_expr_cache_tracker
|
||||||
|
--echo #
|
||||||
|
CREATE TABLE t1 (a int) engine=innodb;
|
||||||
|
|
||||||
|
SELECT 1 IN (
|
||||||
|
SELECT NULL
|
||||||
|
FROM t1
|
||||||
|
WHERE
|
||||||
|
a IS NOT NULL
|
||||||
|
GROUP BY
|
||||||
|
(SELECT NULL from dual WHERE a = 1)
|
||||||
|
);
|
||||||
|
drop table t1;
|
||||||
|
|
||||||
|
--echo # Testcase from MDEV-26164
|
||||||
|
create table t1(a int);
|
||||||
|
--echo # Disable the warning as it includes current time and changes for every test run.
|
||||||
|
--disable_warnings
|
||||||
|
select 1 from t1 where not exists
|
||||||
|
(
|
||||||
|
select 1 from t1 where binary current_time()
|
||||||
|
group by (select a),(select 1)
|
||||||
|
);
|
||||||
|
--enable_warnings
|
||||||
|
drop table t1;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-28437: Assertion `!eliminated' failed in Item_subselect::exec
|
||||||
|
--echo #
|
||||||
|
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
|
||||||
|
INSERT INTO t1 VALUES (1),(2);
|
||||||
|
CREATE TABLE t2 (b INT PRIMARY KEY) ENGINE=InnoDB;
|
||||||
|
INSERT INTO t1 VALUES (3),(4);
|
||||||
|
|
||||||
|
SELECT 1 IN (SELECT a FROM t1 LEFT JOIN t2 ON (a = b AND EXISTS (SELECT * FROM t1)));
|
||||||
|
|
||||||
|
drop table t1,t2;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # End of 10.2 tests
|
||||||
|
--echo #
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # MDEV-17362: SIGSEGV in JOIN::optimize_inner or Assertion `fixed == 0'
|
--echo # MDEV-17362: SIGSEGV in JOIN::optimize_inner or Assertion `fixed == 0'
|
||||||
--echo # failed in Item_equal::fix_fields, server crashes after 2nd execution
|
--echo # failed in Item_equal::fix_fields, server crashes after 2nd execution
|
||||||
|
|
|
@ -1265,7 +1265,7 @@ a
|
||||||
SHOW CREATE TABLE t1;
|
SHOW CREATE TABLE t1;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
t1 CREATE TABLE `t1` (
|
t1 CREATE TABLE `t1` (
|
||||||
`a` int(3) NOT NULL
|
`a` int(3) DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
drop table t1;
|
drop table t1;
|
||||||
create table t1 (a int);
|
create table t1 (a int);
|
||||||
|
|
|
@ -1268,7 +1268,7 @@ a
|
||||||
SHOW CREATE TABLE t1;
|
SHOW CREATE TABLE t1;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
t1 CREATE TABLE `t1` (
|
t1 CREATE TABLE `t1` (
|
||||||
`a` int(3) NOT NULL
|
`a` int(3) DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
drop table t1;
|
drop table t1;
|
||||||
create table t1 (a int);
|
create table t1 (a int);
|
||||||
|
|
|
@ -1264,7 +1264,7 @@ a
|
||||||
SHOW CREATE TABLE t1;
|
SHOW CREATE TABLE t1;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
t1 CREATE TABLE `t1` (
|
t1 CREATE TABLE `t1` (
|
||||||
`a` int(3) NOT NULL
|
`a` int(3) DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
drop table t1;
|
drop table t1;
|
||||||
create table t1 (a int);
|
create table t1 (a int);
|
||||||
|
|
|
@ -1267,7 +1267,7 @@ a
|
||||||
SHOW CREATE TABLE t1;
|
SHOW CREATE TABLE t1;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
t1 CREATE TABLE `t1` (
|
t1 CREATE TABLE `t1` (
|
||||||
`a` int(3) NOT NULL
|
`a` int(3) DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
drop table t1;
|
drop table t1;
|
||||||
create table t1 (a int);
|
create table t1 (a int);
|
||||||
|
|
|
@ -1264,7 +1264,7 @@ a
|
||||||
SHOW CREATE TABLE t1;
|
SHOW CREATE TABLE t1;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
t1 CREATE TABLE `t1` (
|
t1 CREATE TABLE `t1` (
|
||||||
`a` int(3) NOT NULL
|
`a` int(3) DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
drop table t1;
|
drop table t1;
|
||||||
create table t1 (a int);
|
create table t1 (a int);
|
||||||
|
|
|
@ -14,6 +14,7 @@ for (<#sql*.MYI>) {
|
||||||
symlink "$ENV{datadir}/test/d1.MYI", sprintf "#sql$1_$2%x.MYI", hex($3)+1;
|
symlink "$ENV{datadir}/test/d1.MYI", sprintf "#sql$1_$2%x.MYI", hex($3)+1;
|
||||||
symlink "$ENV{datadir}/test/d1.MYI", sprintf "#sql$1_$2%x.MAI", hex($3)+1;
|
symlink "$ENV{datadir}/test/d1.MYI", sprintf "#sql$1_$2%x.MAI", hex($3)+1;
|
||||||
symlink "$ENV{datadir}/test/d1.MYI", sprintf "#sql$1_$2%x.MAI", hex($3)+2;
|
symlink "$ENV{datadir}/test/d1.MYI", sprintf "#sql$1_$2%x.MAI", hex($3)+2;
|
||||||
|
symlink "$ENV{datadir}/test/d1.MYI", sprintf "#sql$1_$2%x.MAI", hex($3)+3;
|
||||||
symlink "$ENV{datadir}/test/d1.MYI", "#sql_$1_0.MAI";
|
symlink "$ENV{datadir}/test/d1.MYI", "#sql_$1_0.MAI";
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
|
|
@ -2456,6 +2456,30 @@ t1 CREATE TABLE `t1` (
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
drop table t1;
|
drop table t1;
|
||||||
#
|
#
|
||||||
|
# MDEV-25317 Assertion `scale <= precision' failed in
|
||||||
|
# decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision'
|
||||||
|
# failed in decimal_bin_size_inline/decimal_bin_size.
|
||||||
|
#
|
||||||
|
SELECT AVG(DISTINCT 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001);
|
||||||
|
AVG(DISTINCT 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0.00000000000000000000000000000000000000
|
||||||
|
CREATE TABLE t1 AS SELECT NULL AS v1;
|
||||||
|
SELECT 1 FROM t1 GROUP BY v1 ORDER BY AVG ( from_unixtime ( '' ) ) ;
|
||||||
|
1
|
||||||
|
1
|
||||||
|
Warnings:
|
||||||
|
Warning 1292 Truncated incorrect DECIMAL value: ''
|
||||||
|
DROP TABLE t1;
|
||||||
|
SELECT SUM(DISTINCT 0.000000000000000000000000000000000000001);
|
||||||
|
SUM(DISTINCT 0.000000000000000000000000000000000000001)
|
||||||
|
0.00000000000000000000000000000000000000
|
||||||
|
CREATE TABLE t1 AS SELECT 1.000000000000000000000000000000000 AS a;
|
||||||
|
ALTER TABLE t1 ADD COLUMN b INT;
|
||||||
|
SELECT ROUND (a,b) AS c FROM t1 ORDER BY c;
|
||||||
|
c
|
||||||
|
NULL
|
||||||
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
# End of 10.2 tests
|
# End of 10.2 tests
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
|
@ -1894,6 +1894,25 @@ show create table t1;
|
||||||
|
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-25317 Assertion `scale <= precision' failed in
|
||||||
|
--echo # decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision'
|
||||||
|
--echo # failed in decimal_bin_size_inline/decimal_bin_size.
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
SELECT AVG(DISTINCT 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001);
|
||||||
|
|
||||||
|
CREATE TABLE t1 AS SELECT NULL AS v1;
|
||||||
|
SELECT 1 FROM t1 GROUP BY v1 ORDER BY AVG ( from_unixtime ( '' ) ) ;
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
SELECT SUM(DISTINCT 0.000000000000000000000000000000000000001);
|
||||||
|
|
||||||
|
CREATE TABLE t1 AS SELECT 1.000000000000000000000000000000000 AS a;
|
||||||
|
ALTER TABLE t1 ADD COLUMN b INT;
|
||||||
|
SELECT ROUND (a,b) AS c FROM t1 ORDER BY c;
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # End of 10.2 tests
|
--echo # End of 10.2 tests
|
||||||
--echo #
|
--echo #
|
||||||
|
|
|
@ -4238,6 +4238,48 @@ SELECT 1 UNION SELECT a FROM t1 ORDER BY (row_number() over ());
|
||||||
ERROR HY000: Expression #1 of ORDER BY contains aggregate function and applies to a UNION
|
ERROR HY000: Expression #1 of ORDER BY contains aggregate function and applies to a UNION
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
#
|
#
|
||||||
|
# MDEV-19398: Assertion `item1->type() == Item::FIELD_ITEM &&
|
||||||
|
# item2->type() == Item::FIELD_ITEM' failed in compare_order_elements
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 ( id varchar(10));
|
||||||
|
INSERT INTO t1 values (1),(2),(3);
|
||||||
|
SELECT
|
||||||
|
dense_rank() over (ORDER BY avg(1)+3),
|
||||||
|
rank() over (ORDER BY avg(1))
|
||||||
|
FROM t1
|
||||||
|
GROUP BY nullif(id, 15532);
|
||||||
|
dense_rank() over (ORDER BY avg(1)+3) rank() over (ORDER BY avg(1))
|
||||||
|
1 1
|
||||||
|
1 1
|
||||||
|
1 1
|
||||||
|
SELECT
|
||||||
|
dense_rank() over (ORDER BY avg(1)),
|
||||||
|
rank() over (ORDER BY avg(1))
|
||||||
|
FROM t1
|
||||||
|
GROUP BY nullif(id, 15532);
|
||||||
|
dense_rank() over (ORDER BY avg(1)) rank() over (ORDER BY avg(1))
|
||||||
|
1 1
|
||||||
|
1 1
|
||||||
|
1 1
|
||||||
|
drop table t1;
|
||||||
|
CREATE TABLE t1 ( a char(25), b text);
|
||||||
|
INSERT INTO t1 VALUES ('foo','bar');
|
||||||
|
SELECT
|
||||||
|
SUM(b) OVER (PARTITION BY a),
|
||||||
|
ROW_NUMBER() OVER (PARTITION BY b)
|
||||||
|
FROM t1
|
||||||
|
GROUP BY
|
||||||
|
LEFT((SYSDATE()), 'foo')
|
||||||
|
WITH ROLLUP;
|
||||||
|
SUM(b) OVER (PARTITION BY a) ROW_NUMBER() OVER (PARTITION BY b)
|
||||||
|
NULL 1
|
||||||
|
NULL 1
|
||||||
|
Warnings:
|
||||||
|
Warning 1292 Truncated incorrect INTEGER value: 'foo'
|
||||||
|
Warning 1292 Truncated incorrect INTEGER value: 'foo'
|
||||||
|
drop table t1;
|
||||||
|
#
|
||||||
|
#
|
||||||
# End of 10.2 tests
|
# End of 10.2 tests
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
|
@ -2740,6 +2740,39 @@ INSERT INTO t1 VALUES (1),(1),(1),(1),(1),(2),(2),(2),(2),(2),(2);
|
||||||
SELECT 1 UNION SELECT a FROM t1 ORDER BY (row_number() over ());
|
SELECT 1 UNION SELECT a FROM t1 ORDER BY (row_number() over ());
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-19398: Assertion `item1->type() == Item::FIELD_ITEM &&
|
||||||
|
--echo # item2->type() == Item::FIELD_ITEM' failed in compare_order_elements
|
||||||
|
--echo #
|
||||||
|
CREATE TABLE t1 ( id varchar(10));
|
||||||
|
INSERT INTO t1 values (1),(2),(3);
|
||||||
|
|
||||||
|
SELECT
|
||||||
|
dense_rank() over (ORDER BY avg(1)+3),
|
||||||
|
rank() over (ORDER BY avg(1))
|
||||||
|
FROM t1
|
||||||
|
GROUP BY nullif(id, 15532);
|
||||||
|
|
||||||
|
SELECT
|
||||||
|
dense_rank() over (ORDER BY avg(1)),
|
||||||
|
rank() over (ORDER BY avg(1))
|
||||||
|
FROM t1
|
||||||
|
GROUP BY nullif(id, 15532);
|
||||||
|
drop table t1;
|
||||||
|
|
||||||
|
CREATE TABLE t1 ( a char(25), b text);
|
||||||
|
INSERT INTO t1 VALUES ('foo','bar');
|
||||||
|
|
||||||
|
SELECT
|
||||||
|
SUM(b) OVER (PARTITION BY a),
|
||||||
|
ROW_NUMBER() OVER (PARTITION BY b)
|
||||||
|
FROM t1
|
||||||
|
GROUP BY
|
||||||
|
LEFT((SYSDATE()), 'foo')
|
||||||
|
WITH ROLLUP;
|
||||||
|
drop table t1;
|
||||||
|
|
||||||
|
--echo #
|
||||||
--echo #
|
--echo #
|
||||||
--echo # End of 10.2 tests
|
--echo # End of 10.2 tests
|
||||||
--echo #
|
--echo #
|
||||||
|
|
|
@ -43,10 +43,7 @@ DROP TABLE t1;
|
||||||
set @@SESSION.SQL_LOG_BIN = 1;
|
set @@SESSION.SQL_LOG_BIN = 1;
|
||||||
|
|
||||||
--echo # Step-3: Execute MYSQL_BINLOG with --stop-never and source it to mysql client.
|
--echo # Step-3: Execute MYSQL_BINLOG with --stop-never and source it to mysql client.
|
||||||
--write_file $MYSQL_TMP_DIR/mysqlbinlog_stop_never.sh
|
--exec ($MYSQL_BINLOG --read-from-remote-server --stop-never --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 | $MYSQL --user=root --protocol=tcp --host=127.0.0.1 --port=$MASTER_MYPORT) < /dev/null > /dev/null 2>&1 &
|
||||||
(`$MYSQL_BINLOG --read-from-remote-server --stop-never --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 | $MYSQL --user=root --protocol=tcp --host=127.0.0.1 --port=$MASTER_MYPORT`) < /dev/null > /dev/null 2>&1 &
|
|
||||||
EOF
|
|
||||||
--exec /bin/bash $MYSQL_TMP_DIR/mysqlbinlog_stop_never.sh
|
|
||||||
|
|
||||||
--echo # Step-4: Wait till dump thread transfer is completed.
|
--echo # Step-4: Wait till dump thread transfer is completed.
|
||||||
let $wait_condition= SELECT id from information_schema.processlist where processlist.command like '%Binlog%' and state like '%Master has sent%';
|
let $wait_condition= SELECT id from information_schema.processlist where processlist.command like '%Binlog%' and state like '%Master has sent%';
|
||||||
|
@ -62,5 +59,3 @@ source include/wait_until_rows_count.inc;
|
||||||
--source include/stop_dump_threads.inc
|
--source include/stop_dump_threads.inc
|
||||||
|
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
--remove_file $MYSQL_TMP_DIR/mysqlbinlog_stop_never.sh
|
|
||||||
|
|
||||||
|
|
|
@ -1379,6 +1379,7 @@ include/stop_slave.inc
|
||||||
SET GLOBAL slave_parallel_threads=1;
|
SET GLOBAL slave_parallel_threads=1;
|
||||||
SET @old_dbug= @@GLOBAL.debug_dbug;
|
SET @old_dbug= @@GLOBAL.debug_dbug;
|
||||||
SET GLOBAL debug_dbug="+d,slave_discard_xid_for_gtid_0_x_1000";
|
SET GLOBAL debug_dbug="+d,slave_discard_xid_for_gtid_0_x_1000";
|
||||||
|
CALL mtr.add_suppression("Unexpected break of being relay-logged GTID");
|
||||||
connection server_1;
|
connection server_1;
|
||||||
INSERT INTO t2 VALUES (101);
|
INSERT INTO t2 VALUES (101);
|
||||||
INSERT INTO t2 VALUES (102);
|
INSERT INTO t2 VALUES (102);
|
||||||
|
|
|
@ -23,6 +23,8 @@ t
|
||||||
Master_SSL_Allowed = 'Yes'
|
Master_SSL_Allowed = 'Yes'
|
||||||
Master_SSL_CA_Path = ''
|
Master_SSL_CA_Path = ''
|
||||||
Master_SSL_CA_File = 'MYSQL_TEST_DIR/std_data/cacert.pem'
|
Master_SSL_CA_File = 'MYSQL_TEST_DIR/std_data/cacert.pem'
|
||||||
|
Master_SSL_Crl = ''
|
||||||
|
Master_SSL_Crlpath = ''
|
||||||
Master_SSL_Cert = 'MYSQL_TEST_DIR/std_data/client-cert.pem'
|
Master_SSL_Cert = 'MYSQL_TEST_DIR/std_data/client-cert.pem'
|
||||||
Master_SSL_Key = 'MYSQL_TEST_DIR/std_data/client-key.pem'
|
Master_SSL_Key = 'MYSQL_TEST_DIR/std_data/client-key.pem'
|
||||||
include/check_slave_is_running.inc
|
include/check_slave_is_running.inc
|
||||||
|
@ -37,6 +39,8 @@ include/wait_for_slave_to_start.inc
|
||||||
Master_SSL_Allowed = 'Yes'
|
Master_SSL_Allowed = 'Yes'
|
||||||
Master_SSL_CA_Path = ''
|
Master_SSL_CA_Path = ''
|
||||||
Master_SSL_CA_File = 'MYSQL_TEST_DIR/std_data/cacert.pem'
|
Master_SSL_CA_File = 'MYSQL_TEST_DIR/std_data/cacert.pem'
|
||||||
|
Master_SSL_Crl = ''
|
||||||
|
Master_SSL_Crlpath = ''
|
||||||
Master_SSL_Cert = 'MYSQL_TEST_DIR/std_data/client-cert.pem'
|
Master_SSL_Cert = 'MYSQL_TEST_DIR/std_data/client-cert.pem'
|
||||||
Master_SSL_Key = 'MYSQL_TEST_DIR/std_data/client-key.pem'
|
Master_SSL_Key = 'MYSQL_TEST_DIR/std_data/client-key.pem'
|
||||||
include/check_slave_is_running.inc
|
include/check_slave_is_running.inc
|
||||||
|
|
|
@ -45,6 +45,8 @@ $$
|
||||||
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
||||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||||
|
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
||||||
|
/*!50003 SET sql_mode = 'PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ORACLE,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,NO_AUTO_CREATE_USER,SIMULTANEOUS_ASSIGNMENT' */ ;
|
||||||
/*!50003 DROP PROCEDURE IF EXISTS `p1` */;
|
/*!50003 DROP PROCEDURE IF EXISTS `p1` */;
|
||||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||||
|
@ -52,8 +54,6 @@ $$
|
||||||
/*!50003 SET character_set_client = latin1 */ ;
|
/*!50003 SET character_set_client = latin1 */ ;
|
||||||
/*!50003 SET character_set_results = latin1 */ ;
|
/*!50003 SET character_set_results = latin1 */ ;
|
||||||
/*!50003 SET collation_connection = latin1_swedish_ci */ ;
|
/*!50003 SET collation_connection = latin1_swedish_ci */ ;
|
||||||
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
|
||||||
/*!50003 SET sql_mode = 'PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ORACLE,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,NO_AUTO_CREATE_USER,SIMULTANEOUS_ASSIGNMENT' */ ;
|
|
||||||
DELIMITER ;;
|
DELIMITER ;;
|
||||||
CREATE DEFINER="root"@"localhost" PROCEDURE "p1"()
|
CREATE DEFINER="root"@"localhost" PROCEDURE "p1"()
|
||||||
AS
|
AS
|
||||||
|
@ -65,6 +65,8 @@ DELIMITER ;
|
||||||
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
||||||
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
||||||
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
||||||
|
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
||||||
|
/*!50003 SET sql_mode = 'PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ORACLE,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,NO_AUTO_CREATE_USER,SIMULTANEOUS_ASSIGNMENT' */ ;
|
||||||
/*!50003 DROP PACKAGE IF EXISTS `pkg1` */;
|
/*!50003 DROP PACKAGE IF EXISTS `pkg1` */;
|
||||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||||
|
@ -72,8 +74,6 @@ DELIMITER ;
|
||||||
/*!50003 SET character_set_client = latin1 */ ;
|
/*!50003 SET character_set_client = latin1 */ ;
|
||||||
/*!50003 SET character_set_results = latin1 */ ;
|
/*!50003 SET character_set_results = latin1 */ ;
|
||||||
/*!50003 SET collation_connection = latin1_swedish_ci */ ;
|
/*!50003 SET collation_connection = latin1_swedish_ci */ ;
|
||||||
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
|
||||||
/*!50003 SET sql_mode = 'PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ORACLE,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,NO_AUTO_CREATE_USER,SIMULTANEOUS_ASSIGNMENT' */ ;
|
|
||||||
DELIMITER ;;
|
DELIMITER ;;
|
||||||
CREATE DEFINER="root"@"localhost" PACKAGE "pkg1" AS
|
CREATE DEFINER="root"@"localhost" PACKAGE "pkg1" AS
|
||||||
PROCEDURE p1;
|
PROCEDURE p1;
|
||||||
|
@ -84,6 +84,8 @@ DELIMITER ;
|
||||||
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
||||||
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
||||||
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
||||||
|
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
||||||
|
/*!50003 SET sql_mode = 'PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ORACLE,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,NO_AUTO_CREATE_USER,SIMULTANEOUS_ASSIGNMENT' */ ;
|
||||||
/*!50003 DROP PACKAGE IF EXISTS `pkg2` */;
|
/*!50003 DROP PACKAGE IF EXISTS `pkg2` */;
|
||||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||||
|
@ -91,8 +93,6 @@ DELIMITER ;
|
||||||
/*!50003 SET character_set_client = latin1 */ ;
|
/*!50003 SET character_set_client = latin1 */ ;
|
||||||
/*!50003 SET character_set_results = latin1 */ ;
|
/*!50003 SET character_set_results = latin1 */ ;
|
||||||
/*!50003 SET collation_connection = latin1_swedish_ci */ ;
|
/*!50003 SET collation_connection = latin1_swedish_ci */ ;
|
||||||
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
|
||||||
/*!50003 SET sql_mode = 'PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ORACLE,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,NO_AUTO_CREATE_USER,SIMULTANEOUS_ASSIGNMENT' */ ;
|
|
||||||
DELIMITER ;;
|
DELIMITER ;;
|
||||||
CREATE DEFINER="root"@"localhost" PACKAGE "pkg2" AS
|
CREATE DEFINER="root"@"localhost" PACKAGE "pkg2" AS
|
||||||
PROCEDURE p1;
|
PROCEDURE p1;
|
||||||
|
@ -103,6 +103,8 @@ DELIMITER ;
|
||||||
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
||||||
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
||||||
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
||||||
|
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
||||||
|
/*!50003 SET sql_mode = 'PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ORACLE,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,NO_AUTO_CREATE_USER,SIMULTANEOUS_ASSIGNMENT' */ ;
|
||||||
/*!50003 DROP PACKAGE BODY IF EXISTS `pkg1` */;
|
/*!50003 DROP PACKAGE BODY IF EXISTS `pkg1` */;
|
||||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||||
|
@ -110,8 +112,6 @@ DELIMITER ;
|
||||||
/*!50003 SET character_set_client = latin1 */ ;
|
/*!50003 SET character_set_client = latin1 */ ;
|
||||||
/*!50003 SET character_set_results = latin1 */ ;
|
/*!50003 SET character_set_results = latin1 */ ;
|
||||||
/*!50003 SET collation_connection = latin1_swedish_ci */ ;
|
/*!50003 SET collation_connection = latin1_swedish_ci */ ;
|
||||||
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
|
||||||
/*!50003 SET sql_mode = 'PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ORACLE,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,NO_AUTO_CREATE_USER,SIMULTANEOUS_ASSIGNMENT' */ ;
|
|
||||||
DELIMITER ;;
|
DELIMITER ;;
|
||||||
CREATE DEFINER="root"@"localhost" PACKAGE BODY "pkg1" AS
|
CREATE DEFINER="root"@"localhost" PACKAGE BODY "pkg1" AS
|
||||||
PROCEDURE p1 AS
|
PROCEDURE p1 AS
|
||||||
|
|
|
@ -4244,6 +4244,48 @@ SELECT 1 UNION SELECT a FROM t1 ORDER BY (row_number() over ());
|
||||||
ERROR HY000: Expression #1 of ORDER BY contains aggregate function and applies to a UNION
|
ERROR HY000: Expression #1 of ORDER BY contains aggregate function and applies to a UNION
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
#
|
#
|
||||||
|
# MDEV-19398: Assertion `item1->type() == Item::FIELD_ITEM &&
|
||||||
|
# item2->type() == Item::FIELD_ITEM' failed in compare_order_elements
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 ( id varchar(10));
|
||||||
|
INSERT INTO t1 values (1),(2),(3);
|
||||||
|
SELECT
|
||||||
|
dense_rank() over (ORDER BY avg(1)+3),
|
||||||
|
rank() over (ORDER BY avg(1))
|
||||||
|
FROM t1
|
||||||
|
GROUP BY nullif(id, 15532);
|
||||||
|
dense_rank() over (ORDER BY avg(1)+3) rank() over (ORDER BY avg(1))
|
||||||
|
1 1
|
||||||
|
1 1
|
||||||
|
1 1
|
||||||
|
SELECT
|
||||||
|
dense_rank() over (ORDER BY avg(1)),
|
||||||
|
rank() over (ORDER BY avg(1))
|
||||||
|
FROM t1
|
||||||
|
GROUP BY nullif(id, 15532);
|
||||||
|
dense_rank() over (ORDER BY avg(1)) rank() over (ORDER BY avg(1))
|
||||||
|
1 1
|
||||||
|
1 1
|
||||||
|
1 1
|
||||||
|
drop table t1;
|
||||||
|
CREATE TABLE t1 ( a char(25), b text);
|
||||||
|
INSERT INTO t1 VALUES ('foo','bar');
|
||||||
|
SELECT
|
||||||
|
SUM(b) OVER (PARTITION BY a),
|
||||||
|
ROW_NUMBER() OVER (PARTITION BY b)
|
||||||
|
FROM t1
|
||||||
|
GROUP BY
|
||||||
|
LEFT((SYSDATE()), 'foo')
|
||||||
|
WITH ROLLUP;
|
||||||
|
SUM(b) OVER (PARTITION BY a) ROW_NUMBER() OVER (PARTITION BY b)
|
||||||
|
NULL 1
|
||||||
|
NULL 1
|
||||||
|
Warnings:
|
||||||
|
Warning 1292 Truncated incorrect INTEGER value: 'foo'
|
||||||
|
Warning 1292 Truncated incorrect INTEGER value: 'foo'
|
||||||
|
drop table t1;
|
||||||
|
#
|
||||||
|
#
|
||||||
# End of 10.2 tests
|
# End of 10.2 tests
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
154
mysql-test/suite/galera/r/mysql_tzinfo_to_sql.result
Normal file
154
mysql-test/suite/galera/r/mysql_tzinfo_to_sql.result
Normal file
|
@ -0,0 +1,154 @@
|
||||||
|
connection node_2;
|
||||||
|
connection node_1;
|
||||||
|
#
|
||||||
|
# MDEV-28263: mariadb-tzinfo-to-sql improve wsrep and binlog cases
|
||||||
|
#
|
||||||
|
|
||||||
|
# On node_1
|
||||||
|
connection node_1;
|
||||||
|
CREATE TABLE time_zone LIKE mysql.time_zone;
|
||||||
|
CREATE TABLE time_zone_name LIKE mysql.time_zone_name;
|
||||||
|
CREATE TABLE time_zone_transition LIKE mysql.time_zone_transition;
|
||||||
|
CREATE TABLE time_zone_transition_type LIKE mysql.time_zone_transition_type;
|
||||||
|
CREATE TABLE time_zone_leap_second LIKE mysql.time_zone_leap_second;
|
||||||
|
#
|
||||||
|
# Run on zoneinfo directory --skip-write-binlog
|
||||||
|
#
|
||||||
|
|
||||||
|
# Apply on node_1
|
||||||
|
|
||||||
|
load timezones
|
||||||
|
'binlog stationary as expected'
|
||||||
|
SELECT COUNT(*) FROM time_zone;
|
||||||
|
COUNT(*)
|
||||||
|
2
|
||||||
|
SELECT COUNT(*) FROM time_zone_name;
|
||||||
|
COUNT(*)
|
||||||
|
2
|
||||||
|
SELECT COUNT(*) FROM time_zone_transition;
|
||||||
|
COUNT(*)
|
||||||
|
0
|
||||||
|
SELECT COUNT(*) FROM time_zone_transition_type;
|
||||||
|
COUNT(*)
|
||||||
|
2
|
||||||
|
SELECT COUNT(*) FROM time_zone_leap_second;
|
||||||
|
COUNT(*)
|
||||||
|
0
|
||||||
|
|
||||||
|
# On node_2 (not replicated)
|
||||||
|
|
||||||
|
connection node_2;
|
||||||
|
SELECT COUNT(*) FROM time_zone;
|
||||||
|
COUNT(*)
|
||||||
|
0
|
||||||
|
SELECT COUNT(*) FROM time_zone_name;
|
||||||
|
COUNT(*)
|
||||||
|
0
|
||||||
|
SELECT COUNT(*) FROM time_zone_transition;
|
||||||
|
COUNT(*)
|
||||||
|
0
|
||||||
|
SELECT COUNT(*) FROM time_zone_transition_type;
|
||||||
|
COUNT(*)
|
||||||
|
0
|
||||||
|
SELECT COUNT(*) FROM time_zone_leap_second;
|
||||||
|
COUNT(*)
|
||||||
|
0
|
||||||
|
#
|
||||||
|
# Run on zoneinfo directory without --skip-write-binlog
|
||||||
|
#
|
||||||
|
|
||||||
|
# Apply on node_1
|
||||||
|
|
||||||
|
connection node_1;
|
||||||
|
load timezones
|
||||||
|
'binlog advanced as expected'
|
||||||
|
SELECT COUNT(*) FROM time_zone;
|
||||||
|
COUNT(*)
|
||||||
|
2
|
||||||
|
SELECT COUNT(*) FROM time_zone_name;
|
||||||
|
COUNT(*)
|
||||||
|
2
|
||||||
|
SELECT COUNT(*) FROM time_zone_transition;
|
||||||
|
COUNT(*)
|
||||||
|
0
|
||||||
|
SELECT COUNT(*) FROM time_zone_transition_type;
|
||||||
|
COUNT(*)
|
||||||
|
2
|
||||||
|
SELECT COUNT(*) FROM time_zone_leap_second;
|
||||||
|
COUNT(*)
|
||||||
|
0
|
||||||
|
|
||||||
|
# On node_2 (replicated via InnoDB)
|
||||||
|
|
||||||
|
connection node_2;
|
||||||
|
SELECT COUNT(*) FROM time_zone;
|
||||||
|
COUNT(*)
|
||||||
|
2
|
||||||
|
SELECT COUNT(*) FROM time_zone_name;
|
||||||
|
COUNT(*)
|
||||||
|
2
|
||||||
|
SELECT COUNT(*) FROM time_zone_transition;
|
||||||
|
COUNT(*)
|
||||||
|
0
|
||||||
|
SELECT COUNT(*) FROM time_zone_transition_type;
|
||||||
|
COUNT(*)
|
||||||
|
2
|
||||||
|
SELECT COUNT(*) FROM time_zone_leap_second;
|
||||||
|
COUNT(*)
|
||||||
|
0
|
||||||
|
TRUNCATE TABLE time_zone;
|
||||||
|
TRUNCATE TABLE time_zone_name;
|
||||||
|
TRUNCATE TABLE time_zone_transition;
|
||||||
|
TRUNCATE TABLE time_zone_transition_type;
|
||||||
|
TRUNCATE TABLE time_zone_leap_second;
|
||||||
|
|
||||||
|
# Apply on node_1 (with wsrep_on=OFF)
|
||||||
|
|
||||||
|
connection node_1;
|
||||||
|
SET GLOBAL WSREP_ON=OFF;
|
||||||
|
load timezones
|
||||||
|
SET GLOBAL WSREP_ON=ON;
|
||||||
|
'binlog advanced as expected'
|
||||||
|
SELECT COUNT(*) FROM time_zone;
|
||||||
|
COUNT(*)
|
||||||
|
2
|
||||||
|
SELECT COUNT(*) FROM time_zone_name;
|
||||||
|
COUNT(*)
|
||||||
|
2
|
||||||
|
SELECT COUNT(*) FROM time_zone_transition;
|
||||||
|
COUNT(*)
|
||||||
|
0
|
||||||
|
SELECT COUNT(*) FROM time_zone_transition_type;
|
||||||
|
COUNT(*)
|
||||||
|
2
|
||||||
|
SELECT COUNT(*) FROM time_zone_leap_second;
|
||||||
|
COUNT(*)
|
||||||
|
0
|
||||||
|
|
||||||
|
# On node_2 (Should not have been replicated)
|
||||||
|
|
||||||
|
connection node_2;
|
||||||
|
SELECT COUNT(*) FROM time_zone;
|
||||||
|
COUNT(*)
|
||||||
|
0
|
||||||
|
SELECT COUNT(*) FROM time_zone_name;
|
||||||
|
COUNT(*)
|
||||||
|
0
|
||||||
|
SELECT COUNT(*) FROM time_zone_transition;
|
||||||
|
COUNT(*)
|
||||||
|
0
|
||||||
|
SELECT COUNT(*) FROM time_zone_transition_type;
|
||||||
|
COUNT(*)
|
||||||
|
0
|
||||||
|
SELECT COUNT(*) FROM time_zone_leap_second;
|
||||||
|
COUNT(*)
|
||||||
|
0
|
||||||
|
connection node_1;
|
||||||
|
DROP TABLE time_zone;
|
||||||
|
DROP TABLE time_zone_name;
|
||||||
|
DROP TABLE time_zone_transition;
|
||||||
|
DROP TABLE time_zone_transition_type;
|
||||||
|
DROP TABLE time_zone_leap_second;
|
||||||
|
#
|
||||||
|
# End of 10.2 tests
|
||||||
|
#
|
1
mysql-test/suite/galera/t/mysql_tzinfo_to_sql.opt
Normal file
1
mysql-test/suite/galera/t/mysql_tzinfo_to_sql.opt
Normal file
|
@ -0,0 +1 @@
|
||||||
|
--log-bin
|
156
mysql-test/suite/galera/t/mysql_tzinfo_to_sql.test
Normal file
156
mysql-test/suite/galera/t/mysql_tzinfo_to_sql.test
Normal file
|
@ -0,0 +1,156 @@
|
||||||
|
--source include/galera_cluster.inc
|
||||||
|
--source include/have_innodb.inc
|
||||||
|
--source include/not_embedded.inc
|
||||||
|
# merge note: 10.6 change not_embedded.inc to no_protocol.inc
|
||||||
|
|
||||||
|
# Unlike the similar galera.mariadb_tzinfo_to_sql.test in 10.6+, this
|
||||||
|
# tests that the output can be parsed by the mysql client.
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-28263: mariadb-tzinfo-to-sql improve wsrep and binlog cases
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
--exec mkdir $MYSQLTEST_VARDIR/zoneinfo
|
||||||
|
--exec ln -s $MYSQLTEST_VARDIR/zoneinfo $MYSQLTEST_VARDIR/zoneinfo/posix
|
||||||
|
--copy_file std_data/zoneinfo/GMT $MYSQLTEST_VARDIR/zoneinfo/GMT
|
||||||
|
|
||||||
|
--echo
|
||||||
|
--echo # On node_1
|
||||||
|
--connection node_1
|
||||||
|
|
||||||
|
CREATE TABLE time_zone LIKE mysql.time_zone;
|
||||||
|
CREATE TABLE time_zone_name LIKE mysql.time_zone_name;
|
||||||
|
CREATE TABLE time_zone_transition LIKE mysql.time_zone_transition;
|
||||||
|
CREATE TABLE time_zone_transition_type LIKE mysql.time_zone_transition_type;
|
||||||
|
CREATE TABLE time_zone_leap_second LIKE mysql.time_zone_leap_second;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Run on zoneinfo directory --skip-write-binlog
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||||
|
--exec $MYSQL_TZINFO_TO_SQL --skip-write-binlog $MYSQLTEST_VARDIR/zoneinfo 2>/dev/null > $MYSQL_TMP_DIR/tz.sql
|
||||||
|
|
||||||
|
--echo
|
||||||
|
--echo # Apply on node_1
|
||||||
|
--echo
|
||||||
|
--let $snap_pos= query_get_value(SHOW STATUS LIKE 'binlog_snapshot_position', Value, 1)
|
||||||
|
--echo load timezones
|
||||||
|
--exec $MYSQL test < "$MYSQL_TMP_DIR/tz.sql"
|
||||||
|
--let $new_snap_pos= query_get_value(SHOW STATUS LIKE 'binlog_snapshot_position', Value, 1)
|
||||||
|
|
||||||
|
if ($snap_pos == $new_snap_pos)
|
||||||
|
{
|
||||||
|
--echo 'binlog stationary as expected'
|
||||||
|
}
|
||||||
|
|
||||||
|
SELECT COUNT(*) FROM time_zone;
|
||||||
|
SELECT COUNT(*) FROM time_zone_name;
|
||||||
|
SELECT COUNT(*) FROM time_zone_transition;
|
||||||
|
SELECT COUNT(*) FROM time_zone_transition_type;
|
||||||
|
SELECT COUNT(*) FROM time_zone_leap_second;
|
||||||
|
|
||||||
|
--echo
|
||||||
|
--echo # On node_2 (not replicated)
|
||||||
|
--echo
|
||||||
|
--connection node_2
|
||||||
|
|
||||||
|
SELECT COUNT(*) FROM time_zone;
|
||||||
|
SELECT COUNT(*) FROM time_zone_name;
|
||||||
|
SELECT COUNT(*) FROM time_zone_transition;
|
||||||
|
SELECT COUNT(*) FROM time_zone_transition_type;
|
||||||
|
SELECT COUNT(*) FROM time_zone_leap_second;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Run on zoneinfo directory without --skip-write-binlog
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||||
|
--exec $MYSQL_TZINFO_TO_SQL $MYSQLTEST_VARDIR/zoneinfo 2>/dev/null > $MYSQL_TMP_DIR/tz.sql
|
||||||
|
|
||||||
|
--echo
|
||||||
|
--echo # Apply on node_1
|
||||||
|
--echo
|
||||||
|
--connection node_1
|
||||||
|
|
||||||
|
--echo load timezones
|
||||||
|
--exec $MYSQL test < "$MYSQL_TMP_DIR/tz.sql"
|
||||||
|
--let $new_snap_pos= query_get_value(SHOW STATUS LIKE 'binlog_snapshot_position', Value, 1)
|
||||||
|
|
||||||
|
if ($snap_pos < $new_snap_pos)
|
||||||
|
{
|
||||||
|
--echo 'binlog advanced as expected'
|
||||||
|
}
|
||||||
|
|
||||||
|
SELECT COUNT(*) FROM time_zone;
|
||||||
|
SELECT COUNT(*) FROM time_zone_name;
|
||||||
|
SELECT COUNT(*) FROM time_zone_transition;
|
||||||
|
SELECT COUNT(*) FROM time_zone_transition_type;
|
||||||
|
SELECT COUNT(*) FROM time_zone_leap_second;
|
||||||
|
|
||||||
|
--echo
|
||||||
|
--echo # On node_2 (replicated via InnoDB)
|
||||||
|
--echo
|
||||||
|
--connection node_2
|
||||||
|
|
||||||
|
SELECT COUNT(*) FROM time_zone;
|
||||||
|
SELECT COUNT(*) FROM time_zone_name;
|
||||||
|
SELECT COUNT(*) FROM time_zone_transition;
|
||||||
|
SELECT COUNT(*) FROM time_zone_transition_type;
|
||||||
|
SELECT COUNT(*) FROM time_zone_leap_second;
|
||||||
|
|
||||||
|
TRUNCATE TABLE time_zone;
|
||||||
|
TRUNCATE TABLE time_zone_name;
|
||||||
|
TRUNCATE TABLE time_zone_transition;
|
||||||
|
TRUNCATE TABLE time_zone_transition_type;
|
||||||
|
TRUNCATE TABLE time_zone_leap_second;
|
||||||
|
|
||||||
|
--echo
|
||||||
|
--echo # Apply on node_1 (with wsrep_on=OFF)
|
||||||
|
--echo
|
||||||
|
--connection node_1
|
||||||
|
|
||||||
|
SET GLOBAL WSREP_ON=OFF;
|
||||||
|
--let $snap_pos= $new_snap_pos
|
||||||
|
--echo load timezones
|
||||||
|
--exec $MYSQL test < "$MYSQL_TMP_DIR/tz.sql"
|
||||||
|
--let $new_snap_pos= query_get_value(SHOW STATUS LIKE 'binlog_snapshot_position', Value, 1)
|
||||||
|
SET GLOBAL WSREP_ON=ON;
|
||||||
|
|
||||||
|
if ($snap_pos < $new_snap_pos)
|
||||||
|
{
|
||||||
|
--echo 'binlog advanced as expected'
|
||||||
|
}
|
||||||
|
|
||||||
|
SELECT COUNT(*) FROM time_zone;
|
||||||
|
SELECT COUNT(*) FROM time_zone_name;
|
||||||
|
SELECT COUNT(*) FROM time_zone_transition;
|
||||||
|
SELECT COUNT(*) FROM time_zone_transition_type;
|
||||||
|
SELECT COUNT(*) FROM time_zone_leap_second;
|
||||||
|
|
||||||
|
--echo
|
||||||
|
--echo # On node_2 (Should not have been replicated)
|
||||||
|
--echo
|
||||||
|
--connection node_2
|
||||||
|
|
||||||
|
SELECT COUNT(*) FROM time_zone;
|
||||||
|
SELECT COUNT(*) FROM time_zone_name;
|
||||||
|
SELECT COUNT(*) FROM time_zone_transition;
|
||||||
|
SELECT COUNT(*) FROM time_zone_transition_type;
|
||||||
|
SELECT COUNT(*) FROM time_zone_leap_second;
|
||||||
|
|
||||||
|
#
|
||||||
|
# Cleanup
|
||||||
|
#
|
||||||
|
|
||||||
|
--connection node_1
|
||||||
|
--remove_file $MYSQL_TMP_DIR/tz.sql
|
||||||
|
--exec rm -rf $MYSQLTEST_VARDIR/zoneinfo
|
||||||
|
DROP TABLE time_zone;
|
||||||
|
DROP TABLE time_zone_name;
|
||||||
|
DROP TABLE time_zone_transition;
|
||||||
|
DROP TABLE time_zone_transition_type;
|
||||||
|
DROP TABLE time_zone_leap_second;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # End of 10.2 tests
|
||||||
|
--echo #
|
|
@ -1849,3 +1849,19 @@ a b
|
||||||
HANDLER t1 CLOSE;
|
HANDLER t1 CLOSE;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
End of 5.1 tests
|
End of 5.1 tests
|
||||||
|
#
|
||||||
|
# 10.2 Test
|
||||||
|
#
|
||||||
|
# MDEV-20207: Assertion `! is_set()' failed in
|
||||||
|
# Diagnostics_area::set_eof_status upon HANDLER READ
|
||||||
|
#
|
||||||
|
DROP TABLE IF EXISTS t1;
|
||||||
|
Warnings:
|
||||||
|
Note 1051 Unknown table 'test.t1'
|
||||||
|
CREATE TABLE t1 (a POINT, KEY(a));
|
||||||
|
HANDLER t1 OPEN h;
|
||||||
|
HANDLER h READ a = (0);
|
||||||
|
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
|
||||||
|
HANDLER h CLOSE;
|
||||||
|
DROP TABLE t1;
|
||||||
|
# End of 10.2 Test
|
||||||
|
|
|
@ -80,3 +80,23 @@ HANDLER t1 CLOSE;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
--echo End of 5.1 tests
|
--echo End of 5.1 tests
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # 10.2 Test
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-20207: Assertion `! is_set()' failed in
|
||||||
|
--echo # Diagnostics_area::set_eof_status upon HANDLER READ
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS t1;
|
||||||
|
|
||||||
|
CREATE TABLE t1 (a POINT, KEY(a));
|
||||||
|
HANDLER t1 OPEN h;
|
||||||
|
|
||||||
|
--error ER_CANT_CREATE_GEOMETRY_OBJECT
|
||||||
|
HANDLER h READ a = (0);
|
||||||
|
|
||||||
|
HANDLER h CLOSE;
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
--echo # End of 10.2 Test
|
||||||
|
|
|
@ -1752,3 +1752,19 @@ HANDLER t1 READ `PRIMARY` PREV;
|
||||||
f1 f2
|
f1 f2
|
||||||
3 3
|
3 3
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
|
# 10.2 Test
|
||||||
|
#
|
||||||
|
# MDEV-20207: Assertion `! is_set()' failed in
|
||||||
|
# Diagnostics_area::set_eof_status upon HANDLER READ
|
||||||
|
#
|
||||||
|
DROP TABLE IF EXISTS t1;
|
||||||
|
Warnings:
|
||||||
|
Note 1051 Unknown table 'test.t1'
|
||||||
|
CREATE TABLE t1 (a POINT, KEY(a));
|
||||||
|
HANDLER t1 OPEN h;
|
||||||
|
HANDLER h READ a = (0);
|
||||||
|
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
|
||||||
|
HANDLER h CLOSE;
|
||||||
|
DROP TABLE t1;
|
||||||
|
# End of 10.2 Test
|
||||||
|
|
|
@ -26,3 +26,23 @@ HANDLER t1 OPEN;
|
||||||
HANDLER t1 READ FIRST WHERE f2 <= 1;
|
HANDLER t1 READ FIRST WHERE f2 <= 1;
|
||||||
HANDLER t1 READ `PRIMARY` PREV;
|
HANDLER t1 READ `PRIMARY` PREV;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # 10.2 Test
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-20207: Assertion `! is_set()' failed in
|
||||||
|
--echo # Diagnostics_area::set_eof_status upon HANDLER READ
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS t1;
|
||||||
|
|
||||||
|
CREATE TABLE t1 (a POINT, KEY(a));
|
||||||
|
HANDLER t1 OPEN h;
|
||||||
|
|
||||||
|
--error ER_CANT_CREATE_GEOMETRY_OBJECT
|
||||||
|
HANDLER h READ a = (0);
|
||||||
|
|
||||||
|
HANDLER h CLOSE;
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
--echo # End of 10.2 Test
|
||||||
|
|
|
@ -315,6 +315,22 @@ handler v read next;
|
||||||
ERROR 42S02: Unknown table 'v' in HANDLER
|
ERROR 42S02: Unknown table 'v' in HANDLER
|
||||||
drop view v;
|
drop view v;
|
||||||
#
|
#
|
||||||
|
# 10.2 Test
|
||||||
|
#
|
||||||
|
# MDEV-20207: Assertion `! is_set()' failed in
|
||||||
|
# Diagnostics_area::set_eof_status upon HANDLER READ
|
||||||
|
#
|
||||||
|
DROP TABLE IF EXISTS t1;
|
||||||
|
Warnings:
|
||||||
|
Note 1051 Unknown table 'test.t1'
|
||||||
|
CREATE TABLE t1 (a POINT, KEY(a));
|
||||||
|
HANDLER t1 OPEN h;
|
||||||
|
HANDLER h READ a = (0);
|
||||||
|
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
|
||||||
|
HANDLER h CLOSE;
|
||||||
|
DROP TABLE t1;
|
||||||
|
# End of 10.2 Test
|
||||||
|
#
|
||||||
# MDEV-15813 ASAN use-after-poison in hp_hashnr upon
|
# MDEV-15813 ASAN use-after-poison in hp_hashnr upon
|
||||||
# HANDLER READ on a versioned HEAP table
|
# HANDLER READ on a versioned HEAP table
|
||||||
#
|
#
|
||||||
|
|
|
@ -357,6 +357,26 @@ execute stmt;
|
||||||
handler v read next;
|
handler v read next;
|
||||||
drop view v;
|
drop view v;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # 10.2 Test
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-20207: Assertion `! is_set()' failed in
|
||||||
|
--echo # Diagnostics_area::set_eof_status upon HANDLER READ
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS t1;
|
||||||
|
|
||||||
|
CREATE TABLE t1 (a POINT, KEY(a));
|
||||||
|
HANDLER t1 OPEN h;
|
||||||
|
|
||||||
|
--error ER_CANT_CREATE_GEOMETRY_OBJECT
|
||||||
|
HANDLER h READ a = (0);
|
||||||
|
|
||||||
|
HANDLER h CLOSE;
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
--echo # End of 10.2 Test
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # MDEV-15813 ASAN use-after-poison in hp_hashnr upon
|
--echo # MDEV-15813 ASAN use-after-poison in hp_hashnr upon
|
||||||
--echo # HANDLER READ on a versioned HEAP table
|
--echo # HANDLER READ on a versioned HEAP table
|
||||||
|
|
|
@ -1935,3 +1935,17 @@ test.t1 preload_keys status OK
|
||||||
HANDLER t1 READ FIRST;
|
HANDLER t1 READ FIRST;
|
||||||
ERROR 42S02: Unknown table 't1' in HANDLER
|
ERROR 42S02: Unknown table 't1' in HANDLER
|
||||||
End of 5.1 tests
|
End of 5.1 tests
|
||||||
|
#
|
||||||
|
# 10.2 Test
|
||||||
|
#
|
||||||
|
# MDEV-20207: Assertion `! is_set()' failed in
|
||||||
|
# Diagnostics_area::set_eof_status upon HANDLER READ
|
||||||
|
#
|
||||||
|
DROP TABLE IF EXISTS t1;
|
||||||
|
CREATE TABLE t1 (a POINT, KEY(a));
|
||||||
|
HANDLER t1 OPEN h;
|
||||||
|
HANDLER h READ a = (0);
|
||||||
|
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
|
||||||
|
HANDLER h CLOSE;
|
||||||
|
DROP TABLE t1;
|
||||||
|
# End of 10.2 Test
|
||||||
|
|
|
@ -169,3 +169,23 @@ HANDLER t1 READ FIRST;
|
||||||
|
|
||||||
|
|
||||||
--echo End of 5.1 tests
|
--echo End of 5.1 tests
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # 10.2 Test
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-20207: Assertion `! is_set()' failed in
|
||||||
|
--echo # Diagnostics_area::set_eof_status upon HANDLER READ
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS t1;
|
||||||
|
|
||||||
|
CREATE TABLE t1 (a POINT, KEY(a));
|
||||||
|
HANDLER t1 OPEN h;
|
||||||
|
|
||||||
|
--error ER_CANT_CREATE_GEOMETRY_OBJECT
|
||||||
|
HANDLER h READ a = (0);
|
||||||
|
|
||||||
|
HANDLER h CLOSE;
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
--echo # End of 10.2 Test
|
||||||
|
|
|
@ -137,7 +137,34 @@ SELECT unique_constraint_name FROM information_schema.referential_constraints
|
||||||
WHERE table_name = 't2';
|
WHERE table_name = 't2';
|
||||||
unique_constraint_name
|
unique_constraint_name
|
||||||
PRIMARY
|
PRIMARY
|
||||||
|
#
|
||||||
|
# MDEV-28317 Assertion failure on rollback of FOREIGN KEY operation
|
||||||
|
#
|
||||||
|
SET foreign_key_checks=0;
|
||||||
|
CREATE TABLE parent(a INT PRIMARY KEY) ENGINE=InnoDB;
|
||||||
|
CREATE TABLE child(a INT,FOREIGN KEY(a) REFERENCES parent(a) ON DELETE CASCADE)
|
||||||
|
ENGINE=InnoDB;
|
||||||
|
INSERT INTO child VALUES(1);
|
||||||
|
ALTER TABLE child DROP INDEX a;
|
||||||
|
connect incomplete, localhost, root,,;
|
||||||
|
BEGIN;
|
||||||
|
DELETE FROM child;
|
||||||
|
connection default;
|
||||||
|
INSERT INTO parent SET a=0;
|
||||||
|
FLUSH TABLES;
|
||||||
# restart
|
# restart
|
||||||
|
disconnect incomplete;
|
||||||
|
INSERT INTO child SET a=0;
|
||||||
|
INSERT INTO child SET a=1;
|
||||||
|
ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test`.`child`, CONSTRAINT `child_ibfk_1` FOREIGN KEY (`a`) REFERENCES `parent` (`a`) ON DELETE CASCADE)
|
||||||
|
DELETE FROM parent;
|
||||||
|
ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`child`, CONSTRAINT `child_ibfk_1` FOREIGN KEY (`a`) REFERENCES `parent` (`a`) ON DELETE CASCADE)
|
||||||
|
ALTER TABLE child ADD INDEX(a);
|
||||||
|
DELETE FROM parent;
|
||||||
|
ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`child`, CONSTRAINT `child_ibfk_1` FOREIGN KEY (`a`) REFERENCES `parent` (`a`) ON DELETE CASCADE)
|
||||||
|
ALTER TABLE child FORCE;
|
||||||
|
DELETE FROM parent;
|
||||||
|
DROP TABLE child,parent;
|
||||||
SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
|
SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
|
||||||
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
|
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
|
||||||
SELECT unique_constraint_name FROM information_schema.referential_constraints
|
SELECT unique_constraint_name FROM information_schema.referential_constraints
|
||||||
|
|
27
mysql-test/suite/innodb/r/gap_lock_split.result
Normal file
27
mysql-test/suite/innodb/r/gap_lock_split.result
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
SET @save_frequency=@@GLOBAL.innodb_purge_rseg_truncate_frequency;
|
||||||
|
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
|
||||||
|
CREATE TABLE t1(id INT PRIMARY key, val VARCHAR(16000)) ENGINE=InnoDB;
|
||||||
|
INSERT INTO t1 (id,val) SELECT 2*seq,'x' FROM seq_0_to_1023;
|
||||||
|
connect con1,localhost,root,,;
|
||||||
|
START TRANSACTION WITH CONSISTENT SNAPSHOT;
|
||||||
|
connection default;
|
||||||
|
DELETE FROM t1 WHERE id=1788;
|
||||||
|
BEGIN;
|
||||||
|
SELECT * FROM t1 WHERE id=1788 FOR UPDATE;
|
||||||
|
id val
|
||||||
|
connection con1;
|
||||||
|
COMMIT;
|
||||||
|
InnoDB 0 transactions not purged
|
||||||
|
connection default;
|
||||||
|
INSERT INTO t1 (id,val) VALUES (1787, REPEAT('x',2000));
|
||||||
|
connection con1;
|
||||||
|
SET innodb_lock_wait_timeout=0;
|
||||||
|
INSERT INTO t1 (id,val) VALUES (1788, 'x');
|
||||||
|
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||||
|
SELECT * FROM t1 WHERE id=1788 FOR UPDATE;
|
||||||
|
id val
|
||||||
|
disconnect con1;
|
||||||
|
connection default;
|
||||||
|
COMMIT;
|
||||||
|
DROP TABLE t1;
|
||||||
|
SET GLOBAL innodb_purge_rseg_truncate_frequency=@save_frequency;
|
34
mysql-test/suite/innodb/r/innodb-autoinc-part.result
Normal file
34
mysql-test/suite/innodb/r/innodb-autoinc-part.result
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
#
|
||||||
|
# MDEV-28416 Incorrect AUTO_INCREMENT may be issued
|
||||||
|
#
|
||||||
|
SET @aii=@@auto_increment_increment;
|
||||||
|
SET auto_increment_increment=300;
|
||||||
|
CREATE TABLE t1 (a SERIAL) ENGINE=innodb
|
||||||
|
PARTITION BY RANGE (a) (
|
||||||
|
PARTITION p0 VALUES LESS THAN (6),
|
||||||
|
PARTITION p1 VALUES LESS THAN MAXVALUE
|
||||||
|
);
|
||||||
|
INSERT INTO t1 VALUES (18446744073709551613);
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`a` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
UNIQUE KEY `a` (`a`)
|
||||||
|
) ENGINE=InnoDB AUTO_INCREMENT=18446744073709551614 DEFAULT CHARSET=latin1
|
||||||
|
PARTITION BY RANGE (`a`)
|
||||||
|
(PARTITION `p0` VALUES LESS THAN (6) ENGINE = InnoDB,
|
||||||
|
PARTITION `p1` VALUES LESS THAN MAXVALUE ENGINE = InnoDB)
|
||||||
|
INSERT INTO t1 VALUES (NULL);
|
||||||
|
ERROR 22003: Out of range value for column 'a' at row 1
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`a` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
UNIQUE KEY `a` (`a`)
|
||||||
|
) ENGINE=InnoDB AUTO_INCREMENT=298 DEFAULT CHARSET=latin1
|
||||||
|
PARTITION BY RANGE (`a`)
|
||||||
|
(PARTITION `p0` VALUES LESS THAN (6) ENGINE = InnoDB,
|
||||||
|
PARTITION `p1` VALUES LESS THAN MAXVALUE ENGINE = InnoDB)
|
||||||
|
DROP TABLE t1;
|
||||||
|
SET auto_increment_increment=@aii;
|
||||||
|
# End of 10.2 tests
|
|
@ -1,4 +1,3 @@
|
||||||
drop table if exists t1;
|
|
||||||
CREATE TABLE t1 (c1 BIGINT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
|
CREATE TABLE t1 (c1 BIGINT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
|
||||||
INSERT INTO t1 VALUES (9223372036854775807, null);
|
INSERT INTO t1 VALUES (9223372036854775807, null);
|
||||||
INSERT INTO t1 (c2) VALUES ('innodb');
|
INSERT INTO t1 (c2) VALUES ('innodb');
|
||||||
|
@ -1622,3 +1621,27 @@ id name
|
||||||
-1 dog
|
-1 dog
|
||||||
2 cat
|
2 cat
|
||||||
DROP PROCEDURE autoinc_mdev15353_one;
|
DROP PROCEDURE autoinc_mdev15353_one;
|
||||||
|
#
|
||||||
|
# MDEV-28416 Incorrect AUTO_INCREMENT may be issued
|
||||||
|
#
|
||||||
|
SET @aii=@@auto_increment_increment;
|
||||||
|
SET auto_increment_increment=300;
|
||||||
|
CREATE TABLE t1 (a SERIAL) ENGINE=innodb;
|
||||||
|
INSERT INTO t1 VALUES (18446744073709551613);
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`a` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
UNIQUE KEY `a` (`a`)
|
||||||
|
) ENGINE=InnoDB AUTO_INCREMENT=18446744073709551614 DEFAULT CHARSET=latin1
|
||||||
|
INSERT INTO t1 VALUES (NULL);
|
||||||
|
ERROR 22003: Out of range value for column 'a' at row 1
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`a` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
UNIQUE KEY `a` (`a`)
|
||||||
|
) ENGINE=InnoDB AUTO_INCREMENT=18446744073709551615 DEFAULT CHARSET=latin1
|
||||||
|
DROP TABLE t1;
|
||||||
|
SET auto_increment_increment=@aii;
|
||||||
|
# End of 10.2 tests
|
||||||
|
|
|
@ -102,7 +102,41 @@ INSERT INTO t2 VALUES (1);
|
||||||
SELECT unique_constraint_name FROM information_schema.referential_constraints
|
SELECT unique_constraint_name FROM information_schema.referential_constraints
|
||||||
WHERE table_name = 't2';
|
WHERE table_name = 't2';
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-28317 Assertion failure on rollback of FOREIGN KEY operation
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
SET foreign_key_checks=0;
|
||||||
|
CREATE TABLE parent(a INT PRIMARY KEY) ENGINE=InnoDB;
|
||||||
|
CREATE TABLE child(a INT,FOREIGN KEY(a) REFERENCES parent(a) ON DELETE CASCADE)
|
||||||
|
ENGINE=InnoDB;
|
||||||
|
INSERT INTO child VALUES(1);
|
||||||
|
ALTER TABLE child DROP INDEX a;
|
||||||
|
|
||||||
|
connect(incomplete, localhost, root,,);
|
||||||
|
BEGIN;
|
||||||
|
DELETE FROM child;
|
||||||
|
|
||||||
|
connection default;
|
||||||
|
INSERT INTO parent SET a=0;
|
||||||
|
FLUSH TABLES;
|
||||||
|
|
||||||
|
--let $shutdown_timeout=0
|
||||||
--source include/restart_mysqld.inc
|
--source include/restart_mysqld.inc
|
||||||
|
--let $shutdown_timeout=
|
||||||
|
disconnect incomplete;
|
||||||
|
|
||||||
|
INSERT INTO child SET a=0;
|
||||||
|
--error ER_NO_REFERENCED_ROW_2
|
||||||
|
INSERT INTO child SET a=1;
|
||||||
|
--error ER_ROW_IS_REFERENCED_2
|
||||||
|
DELETE FROM parent;
|
||||||
|
ALTER TABLE child ADD INDEX(a);
|
||||||
|
--error ER_ROW_IS_REFERENCED_2
|
||||||
|
DELETE FROM parent;
|
||||||
|
ALTER TABLE child FORCE;
|
||||||
|
DELETE FROM parent;
|
||||||
|
DROP TABLE child,parent;
|
||||||
|
|
||||||
SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
|
SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
|
||||||
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
|
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
|
||||||
|
|
39
mysql-test/suite/innodb/t/gap_lock_split.test
Normal file
39
mysql-test/suite/innodb/t/gap_lock_split.test
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
--source include/have_innodb.inc
|
||||||
|
--source include/have_sequence.inc
|
||||||
|
--source include/have_debug.inc
|
||||||
|
|
||||||
|
SET @save_frequency=@@GLOBAL.innodb_purge_rseg_truncate_frequency;
|
||||||
|
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
|
||||||
|
|
||||||
|
CREATE TABLE t1(id INT PRIMARY key, val VARCHAR(16000)) ENGINE=InnoDB;
|
||||||
|
INSERT INTO t1 (id,val) SELECT 2*seq,'x' FROM seq_0_to_1023;
|
||||||
|
|
||||||
|
connect(con1,localhost,root,,);
|
||||||
|
# Prevent purge.
|
||||||
|
START TRANSACTION WITH CONSISTENT SNAPSHOT;
|
||||||
|
connection default;
|
||||||
|
|
||||||
|
DELETE FROM t1 WHERE id=1788;
|
||||||
|
|
||||||
|
BEGIN;
|
||||||
|
# This will return no result, but should acquire a gap lock.
|
||||||
|
SELECT * FROM t1 WHERE id=1788 FOR UPDATE;
|
||||||
|
|
||||||
|
connection con1;
|
||||||
|
COMMIT;
|
||||||
|
source include/wait_all_purged.inc;
|
||||||
|
connection default;
|
||||||
|
|
||||||
|
INSERT INTO t1 (id,val) VALUES (1787, REPEAT('x',2000));
|
||||||
|
|
||||||
|
connection con1;
|
||||||
|
SET innodb_lock_wait_timeout=0;
|
||||||
|
--error ER_LOCK_WAIT_TIMEOUT
|
||||||
|
INSERT INTO t1 (id,val) VALUES (1788, 'x');
|
||||||
|
SELECT * FROM t1 WHERE id=1788 FOR UPDATE;
|
||||||
|
disconnect con1;
|
||||||
|
|
||||||
|
connection default;
|
||||||
|
COMMIT;
|
||||||
|
DROP TABLE t1;
|
||||||
|
SET GLOBAL innodb_purge_rseg_truncate_frequency=@save_frequency;
|
24
mysql-test/suite/innodb/t/innodb-autoinc-part.test
Normal file
24
mysql-test/suite/innodb/t/innodb-autoinc-part.test
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
--source include/have_partition.inc
|
||||||
|
--source include/have_innodb.inc
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-28416 Incorrect AUTO_INCREMENT may be issued
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
SET @aii=@@auto_increment_increment;
|
||||||
|
SET auto_increment_increment=300;
|
||||||
|
|
||||||
|
CREATE TABLE t1 (a SERIAL) ENGINE=innodb
|
||||||
|
PARTITION BY RANGE (a) (
|
||||||
|
PARTITION p0 VALUES LESS THAN (6),
|
||||||
|
PARTITION p1 VALUES LESS THAN MAXVALUE
|
||||||
|
);
|
||||||
|
INSERT INTO t1 VALUES (18446744073709551613);
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
--error HA_ERR_AUTOINC_ERANGE
|
||||||
|
INSERT INTO t1 VALUES (NULL);
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
DROP TABLE t1;
|
||||||
|
SET auto_increment_increment=@aii;
|
||||||
|
|
||||||
|
--echo # End of 10.2 tests
|
|
@ -1,10 +1,4 @@
|
||||||
--source include/have_innodb.inc
|
--source include/have_innodb.inc
|
||||||
# embedded server ignores 'delayed', so skip this
|
|
||||||
-- source include/not_embedded.inc
|
|
||||||
|
|
||||||
--disable_warnings
|
|
||||||
drop table if exists t1;
|
|
||||||
--enable_warnings
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Bug #34335
|
# Bug #34335
|
||||||
|
@ -770,3 +764,20 @@ DROP TABLE t1;
|
||||||
|
|
||||||
SET @engine='INNODB';
|
SET @engine='INNODB';
|
||||||
--source include/autoinc_mdev15353.inc
|
--source include/autoinc_mdev15353.inc
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-28416 Incorrect AUTO_INCREMENT may be issued
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
SET @aii=@@auto_increment_increment;
|
||||||
|
SET auto_increment_increment=300;
|
||||||
|
CREATE TABLE t1 (a SERIAL) ENGINE=innodb;
|
||||||
|
INSERT INTO t1 VALUES (18446744073709551613);
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
--error HA_ERR_AUTOINC_ERANGE
|
||||||
|
INSERT INTO t1 VALUES (NULL);
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
DROP TABLE t1;
|
||||||
|
SET auto_increment_increment=@aii;
|
||||||
|
|
||||||
|
--echo # End of 10.2 tests
|
||||||
|
|
|
@ -61,10 +61,3 @@ select count(*) from t1 where MBRWithin(t1.c2, @g1);
|
||||||
count(*)
|
count(*)
|
||||||
57344
|
57344
|
||||||
drop table t1;
|
drop table t1;
|
||||||
#
|
|
||||||
# MDEV-27417 Spatial index tries to update
|
|
||||||
# change buffer bookkeeping page
|
|
||||||
#
|
|
||||||
CREATE TEMPORARY TABLE t1 (c POINT NOT NULL, SPATIAL(c)) ENGINE=InnoDB;
|
|
||||||
INSERT INTO t1 SELECT PointFromText('POINT(0 0)') FROM seq_1_to_366;
|
|
||||||
DROP TABLE t1;
|
|
||||||
|
|
14
mysql-test/suite/innodb_gis/r/rtree_temporary.result
Normal file
14
mysql-test/suite/innodb_gis/r/rtree_temporary.result
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
#
|
||||||
|
# MDEV-27417 Spatial index tries to update
|
||||||
|
# change buffer bookkeeping page
|
||||||
|
#
|
||||||
|
CREATE TEMPORARY TABLE t1 (c POINT NOT NULL, SPATIAL(c)) ENGINE=InnoDB;
|
||||||
|
INSERT INTO t1 SELECT PointFromText('POINT(0 0)') FROM seq_1_to_366;
|
||||||
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
|
# MDEV-28478 Assertion mtr->get_log_mode() == MTR_LOG_NO_REDO
|
||||||
|
#
|
||||||
|
CREATE TEMPORARY TABLE t1 (c POINT NOT NULL,SPATIAL (c)) ENGINE=InnoDB;
|
||||||
|
INSERT INTO t1 SELECT POINT(0,0) FROM seq_1_to_366;
|
||||||
|
INSERT INTO t1 VALUES (POINT(1e-270,1e-130));
|
||||||
|
DROP TABLE t1;
|
|
@ -73,11 +73,3 @@ select count(*) from t1 where MBRWithin(t1.c2, @g1);
|
||||||
|
|
||||||
# Clean up.
|
# Clean up.
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
--echo #
|
|
||||||
--echo # MDEV-27417 Spatial index tries to update
|
|
||||||
--echo # change buffer bookkeeping page
|
|
||||||
--echo #
|
|
||||||
CREATE TEMPORARY TABLE t1 (c POINT NOT NULL, SPATIAL(c)) ENGINE=InnoDB;
|
|
||||||
INSERT INTO t1 SELECT PointFromText('POINT(0 0)') FROM seq_1_to_366;
|
|
||||||
DROP TABLE t1;
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue