mirror of
https://github.com/MariaDB/server.git
synced 2025-03-25 00:18:42 +01:00
Merge 10.4 into 10.5
This commit is contained in:
commit
1333da90b5
145 changed files with 1685 additions and 980 deletions
client
cmake
dbug
debian
additions
controllibmariadb-dev.README.Maintainermariadb-client-10.5.installmariadb-client-core-10.5.installmariadb-plugin-rocksdb.installmariadb-server-10.5.installmariadb-server-10.5.postinstmariadb-server-core-10.5.installmariadb-test.installmariadb-test.linksrulesextra/mariabackup
include
mysql-test
include
main
compare.resultcompare.testcreate_drop_server.resultcte_nonrecursive.resultcte_recursive.resultctype_uca.resultctype_uca_innodb.resultctype_utf8.resultopt_trace.resultorder_by_innodb.resultorder_by_innodb.testprocesslist.resultps.resultps.testrange.resultrange_mrr_icp.resultselectivity.resultselectivity.testselectivity_innodb.resultstat_tables.resultstat_tables.teststat_tables_innodb.resultstatement-expr.resultstatement-expr.testsubselect.resultsubselect.testsubselect_no_exists_to_in.resultsubselect_no_mat.resultsubselect_no_opts.resultsubselect_no_scache.resultsubselect_no_semijoin.resultsubselect_notembedded.resultsubselect_notembedded.testsystem_mysql_db.resultsystem_mysql_db_fix40123.resulttable_value_constr.resulttable_value_constr.test
suite
scripts
sql
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Copyright (c) 2000, 2013, Oracle and/or its affiliates.
|
||||
Copyright (c) 2010, 2017, MariaDB Corporation.
|
||||
Copyright (c) 2010, 2019, MariaDB Corporation.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -1081,7 +1081,7 @@ static int get_options(int *argc, char ***argv)
|
|||
my_progname_short);
|
||||
return(EX_USAGE);
|
||||
}
|
||||
if (strcmp(default_charset, charset_info->csname) &&
|
||||
if (strcmp(default_charset, MYSQL_AUTODETECT_CHARSET_NAME) &&
|
||||
!(charset_info= get_charset_by_csname(default_charset,
|
||||
MY_CS_PRIMARY, MYF(MY_WME))))
|
||||
exit(1);
|
||||
|
@ -1546,6 +1546,9 @@ static int switch_character_set_results(MYSQL *mysql, const char *cs_name)
|
|||
char query_buffer[QUERY_LENGTH];
|
||||
size_t query_length;
|
||||
|
||||
if (!strcmp(cs_name, MYSQL_AUTODETECT_CHARSET_NAME))
|
||||
cs_name= (char *)my_default_csname();
|
||||
|
||||
/* Server lacks facility. This is not an error, by arbitrary decision . */
|
||||
if (!server_supports_switching_charsets)
|
||||
return FALSE;
|
||||
|
|
|
@ -160,8 +160,20 @@ MACRO (MYSQL_FIND_SYSTEM_LIBEDIT)
|
|||
int res= (*rl_completion_entry_function)(0,0);
|
||||
completion_matches(0,0);
|
||||
}"
|
||||
LIBEDIT_INTERFACE)
|
||||
SET(USE_LIBEDIT_INTERFACE ${LIBEDIT_INTERFACE})
|
||||
LIBEDIT_HAVE_COMPLETION_INT)
|
||||
|
||||
CHECK_CXX_SOURCE_COMPILES("
|
||||
#include <stdio.h>
|
||||
#include <readline.h>
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
char res= *(*rl_completion_entry_function)(0,0);
|
||||
completion_matches(0,0);
|
||||
}"
|
||||
LIBEDIT_HAVE_COMPLETION_CHAR)
|
||||
IF(LIBEDIT_HAVE_COMPLETION_INT OR LIBEDIT_HAVE_COMPLETION_CHAR)
|
||||
SET(USE_LIBEDIT_INTERFACE 1)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ENDMACRO()
|
||||
|
||||
|
@ -187,6 +199,7 @@ MACRO (MYSQL_CHECK_READLINE)
|
|||
IF(USE_LIBEDIT_INTERFACE)
|
||||
SET(MY_READLINE_INCLUDE_DIR ${LIBEDIT_INCLUDE_DIR})
|
||||
SET(MY_READLINE_LIBRARY ${LIBEDIT_LIBRARY} ${CURSES_LIBRARY})
|
||||
SET(USE_NEW_READLINE_INTERFACE ${LIBEDIT_HAVE_COMPLETION_CHAR})
|
||||
ELSE()
|
||||
MYSQL_USE_BUNDLED_READLINE()
|
||||
ENDIF()
|
||||
|
|
|
@ -1,13 +1,31 @@
|
|||
# If timestamping is used, it can (rarely) fail, when public timestamping service has issues.
|
||||
#
|
||||
# To handle the error gracefully and tranparently, we'll retry the signtool command,
|
||||
# second time without "/t URL" parameter
|
||||
SET(SIGNTOOL_PARAMETERS_NO_TIMESTAMP "@SIGNTOOL_PARAMETERS@")
|
||||
LIST(FIND SIGNTOOL_PARAMETERS_NO_TIMESTAMP /t idx)
|
||||
IF(NOT(idx EQUAL -1))
|
||||
LIST(REMOVE_AT SIGNTOOL_PARAMETERS_NO_TIMESTAMP ${idx})
|
||||
#remove the URL following /t , as well
|
||||
LIST(REMOVE_AT SIGNTOOL_PARAMETERS_NO_TIMESTAMP ${idx})
|
||||
ENDIF()
|
||||
|
||||
GET_FILENAME_COMPONENT(SIGNTOOL_DIR "@SIGNTOOL_EXECUTABLE@" DIRECTORY)
|
||||
GET_FILENAME_COMPONENT(SIGNTOOL_NAME "@SIGNTOOL_EXECUTABLE@" NAME)
|
||||
|
||||
FILE(GLOB_RECURSE files "@CMAKE_BINARY_DIR@/*.signme")
|
||||
MESSAGE(STATUS "signing files")
|
||||
|
||||
|
||||
FOREACH(f ${files})
|
||||
STRING(REPLACE ".signme" "" exe_location "${f}")
|
||||
|
||||
string (REPLACE ";" " " params "@SIGNTOOL_PARAMETERS@")
|
||||
#MESSAGE("@SIGNTOOL_EXECUTABLE@" sign ${params} "${exe_location}")
|
||||
|
||||
EXECUTE_PROCESS(COMMAND
|
||||
"@SIGNTOOL_EXECUTABLE@" sign @SIGNTOOL_PARAMETERS@ "${exe_location}"
|
||||
cmd /c "${SIGNTOOL_NAME}" sign @SIGNTOOL_PARAMETERS@ "${exe_location}" 2>NUL
|
||||
|| "${SIGNTOOL_NAME}" sign ${SIGNTOOL_PARAMETERS_NO_TIMESTAMP} "${exe_location}"
|
||||
WORKING_DIRECTORY ${SIGNTOOL_DIR}
|
||||
RESULT_VARIABLE ERR)
|
||||
IF(NOT ${ERR} EQUAL 0)
|
||||
MESSAGE( "Error ${ERR} signing ${exe_location}")
|
||||
|
|
|
@ -2259,9 +2259,14 @@ static int default_my_dbug_sanity(void)
|
|||
}
|
||||
|
||||
extern my_bool my_assert;
|
||||
my_bool _db_my_assert(void)
|
||||
ATTRIBUTE_COLD
|
||||
my_bool _db_my_assert(const char *file, int line, const char *msg)
|
||||
{
|
||||
return my_assert;
|
||||
my_bool a = my_assert;
|
||||
_db_flush_();
|
||||
if (!a)
|
||||
fprintf(stderr, "%s:%d: assert: %s\n", file, line, msg);
|
||||
return a;
|
||||
}
|
||||
#else
|
||||
|
||||
|
|
1
debian/additions/debian-start
vendored
1
debian/additions/debian-start
vendored
|
@ -15,6 +15,7 @@ fi
|
|||
|
||||
MYSQL="/usr/bin/mysql --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
|
||||
MYUPGRADE="/usr/bin/mysql_upgrade --defaults-extra-file=/etc/mysql/debian.cnf --version-check"
|
||||
MYCHECK="/usr/bin/mysqlcheck --defaults-file=/etc/mysql/debian.cnf"
|
||||
MYCHECK_SUBJECT="WARNING: mysqlcheck has found corrupt tables"
|
||||
|
|
5
debian/control
vendored
5
debian/control
vendored
|
@ -234,7 +234,8 @@ Description: MariaDB database common files (e.g. /etc/mysql/conf.d/mariadb.cnf)
|
|||
|
||||
Package: mariadb-client-core-10.5
|
||||
Architecture: any
|
||||
Depends: mariadb-common (>= ${source:Version}), libmariadb3,
|
||||
Depends: libmariadb3,
|
||||
mariadb-common (>= ${source:Version}),
|
||||
${misc:Depends},
|
||||
${shlibs:Depends}
|
||||
Conflicts: mariadb-client-10.0,
|
||||
|
@ -749,6 +750,8 @@ Depends: libcrack2 (>= 2.9.0),
|
|||
Description: CrackLib Password Validation Plugin for MariaDB
|
||||
This password validation plugin uses cracklib to allow only
|
||||
sufficiently secure (as defined by cracklib) user passwords in MariaDB.
|
||||
.
|
||||
Install and configure this to enforce stronger passwords for MariaDB users.
|
||||
|
||||
Package: mariadb-test
|
||||
Architecture: any
|
||||
|
|
3
debian/libmariadb-dev.README.Maintainer
vendored
3
debian/libmariadb-dev.README.Maintainer
vendored
|
@ -1,3 +1,6 @@
|
|||
The examples directory includes files that might be needed by some
|
||||
developers:
|
||||
- the example file udf_example.c
|
||||
|
||||
For more information, see MariaDB Connector/C docs at:
|
||||
https://github.com/MariaDB/mariadb-connector-c/wiki/libmysql_libmariadb
|
||||
|
|
20
debian/mariadb-client-10.5.install
vendored
20
debian/mariadb-client-10.5.install
vendored
|
@ -10,16 +10,6 @@ usr/bin/mysqldumpslow
|
|||
usr/bin/mysqlimport
|
||||
usr/bin/mysqlshow
|
||||
usr/bin/mysqlslap
|
||||
usr/share/man/man1/mysql_find_rows.1
|
||||
usr/share/man/man1/mysql_fix_extensions.1
|
||||
usr/share/man/man1/mysql_waitpid.1
|
||||
usr/share/man/man1/mysqlaccess.1
|
||||
usr/share/man/man1/mysqladmin.1
|
||||
usr/share/man/man1/mysqldump.1
|
||||
usr/share/man/man1/mysqldumpslow.1
|
||||
usr/share/man/man1/mysqlimport.1
|
||||
usr/share/man/man1/mysqlshow.1
|
||||
usr/share/man/man1/mysqlslap.1
|
||||
usr/share/man/man1/mariadb-access.1
|
||||
usr/share/man/man1/mariadb-admin.1
|
||||
usr/share/man/man1/mariadb-binlog.1
|
||||
|
@ -31,3 +21,13 @@ usr/share/man/man1/mariadb-import.1
|
|||
usr/share/man/man1/mariadb-plugin.1
|
||||
usr/share/man/man1/mariadb-slap.1
|
||||
usr/share/man/man1/mariadb-waitpid.1
|
||||
usr/share/man/man1/mysql_find_rows.1
|
||||
usr/share/man/man1/mysql_fix_extensions.1
|
||||
usr/share/man/man1/mysql_waitpid.1
|
||||
usr/share/man/man1/mysqlaccess.1
|
||||
usr/share/man/man1/mysqladmin.1
|
||||
usr/share/man/man1/mysqldump.1
|
||||
usr/share/man/man1/mysqldumpslow.1
|
||||
usr/share/man/man1/mysqlimport.1
|
||||
usr/share/man/man1/mysqlshow.1
|
||||
usr/share/man/man1/mysqlslap.1
|
||||
|
|
4
debian/mariadb-client-core-10.5.install
vendored
4
debian/mariadb-client-core-10.5.install
vendored
|
@ -1,6 +1,6 @@
|
|||
usr/bin/mysql
|
||||
usr/bin/mysqlcheck
|
||||
usr/share/man/man1/mariadb-check.1
|
||||
usr/share/man/man1/mariadb.1
|
||||
usr/share/man/man1/mysql.1
|
||||
usr/share/man/man1/mysqlcheck.1
|
||||
usr/share/man/man1/mariadb.1
|
||||
usr/share/man/man1/mariadb-check.1
|
||||
|
|
4
debian/mariadb-plugin-rocksdb.install
vendored
4
debian/mariadb-plugin-rocksdb.install
vendored
|
@ -1,7 +1,7 @@
|
|||
etc/mysql/conf.d/rocksdb.cnf etc/mysql/mariadb.conf.d
|
||||
usr/bin/myrocks_hotbackup
|
||||
usr/bin/mysql_ldb
|
||||
usr/share/man/man1/mariadb-ldb.1
|
||||
usr/share/man/man1/mysql_ldb.1
|
||||
usr/bin/sst_dump
|
||||
usr/lib/mysql/plugin/ha_rocksdb.so
|
||||
usr/share/man/man1/mariadb-ldb.1
|
||||
usr/share/man/man1/mysql_ldb.1
|
||||
|
|
2
debian/mariadb-server-10.5.install
vendored
2
debian/mariadb-server-10.5.install
vendored
|
@ -1,8 +1,8 @@
|
|||
debian/additions/debian-start etc/mysql
|
||||
debian/additions/debian-start.inc.sh usr/share/mysql
|
||||
debian/additions/echo_stderr usr/share/mysql
|
||||
debian/additions/mysqld_safe_syslog.cnf etc/mysql/conf.d
|
||||
debian/additions/mysql.init usr/share/mysql
|
||||
debian/additions/mysqld_safe_syslog.cnf etc/mysql/conf.d
|
||||
etc/apparmor.d/usr.sbin.mysqld
|
||||
lib/systemd/system/mariadb@bootstrap.service.d/use_galera_new_cluster.conf
|
||||
usr/bin/aria_chk
|
||||
|
|
10
debian/mariadb-server-10.5.postinst
vendored
10
debian/mariadb-server-10.5.postinst
vendored
|
@ -2,8 +2,8 @@
|
|||
|
||||
. /usr/share/debconf/confmodule
|
||||
|
||||
# assume the filename is /path/to/mariadb-server-##.#.postinst
|
||||
VER=${0: -13:4}
|
||||
# Automatically set version to ease maintenance of this file
|
||||
MAJOR_VER="${DPKG_MAINTSCRIPT_PACKAGE#mariadb-server-}"
|
||||
|
||||
if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi
|
||||
${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 }
|
||||
|
@ -11,7 +11,7 @@ ${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 }
|
|||
export PATH=$PATH:/sbin:/usr/sbin:/bin:/usr/bin
|
||||
|
||||
# This command can be used as pipe to syslog. With "-s" it also logs to stderr.
|
||||
ERR_LOGGER="logger -p daemon.err -t mariadb-server-$VER.postinst -i"
|
||||
ERR_LOGGER="logger -p daemon.err -t mariadb-server-$MAJOR_VER.postinst -i"
|
||||
# This will make an error in a logged command immediately apparent by aborting
|
||||
# the install, rather than failing silently and leaving a broken install.
|
||||
set -o pipefail
|
||||
|
@ -117,8 +117,8 @@ EOF
|
|||
set -e
|
||||
|
||||
# To avoid downgrades.
|
||||
touch $mysql_statedir/debian-$VER.flag
|
||||
|
||||
touch $mysql_statedir/debian-$MAJOR_VER.flag
|
||||
|
||||
# On new installations root user can connect via unix_socket.
|
||||
# But on upgrades, scripts rely on debian-sys-maint user and
|
||||
# credentials in /etc/mysql/debian.cnf
|
||||
|
|
6
debian/mariadb-server-core-10.5.install
vendored
6
debian/mariadb-server-core-10.5.install
vendored
|
@ -3,12 +3,12 @@ usr/bin/mysql_install_db
|
|||
usr/bin/mysql_upgrade
|
||||
usr/sbin/mysqld
|
||||
usr/share/man/man1/innochecksum.1
|
||||
usr/share/man/man1/mysql_install_db.1
|
||||
usr/share/man/man1/mysql_upgrade.1
|
||||
usr/share/man/man8/mysqld.8
|
||||
usr/share/man/man1/mariadb-install-db.1
|
||||
usr/share/man/man1/mariadb-upgrade.1
|
||||
usr/share/man/man1/mysql_install_db.1
|
||||
usr/share/man/man1/mysql_upgrade.1
|
||||
usr/share/man/man8/mariadbd.8
|
||||
usr/share/man/man8/mysqld.8
|
||||
usr/share/mysql/charsets
|
||||
usr/share/mysql/czech
|
||||
usr/share/mysql/danish
|
||||
|
|
8
debian/mariadb-test.install
vendored
8
debian/mariadb-test.install
vendored
|
@ -17,16 +17,16 @@ usr/lib/mysql/plugin/qa_auth_client.so
|
|||
usr/lib/mysql/plugin/qa_auth_interface.so
|
||||
usr/lib/mysql/plugin/qa_auth_server.so
|
||||
usr/lib/mysql/plugin/test_versioning.so
|
||||
usr/share/man/man1/mariadb-client-test-embedded.1
|
||||
usr/share/man/man1/mariadb-client-test.1
|
||||
usr/share/man/man1/mariadb-test-embedded.1
|
||||
usr/share/man/man1/mariadb-test.1
|
||||
usr/share/man/man1/mysql-stress-test.pl.1
|
||||
usr/share/man/man1/mysql-test-run.pl.1
|
||||
usr/share/man/man1/mysql_client_test.1
|
||||
usr/share/man/man1/mysql_client_test_embedded.1
|
||||
usr/share/man/man1/mysqltest.1
|
||||
usr/share/man/man1/mysqltest_embedded.1
|
||||
usr/share/man/man1/mariadb-client-test-embedded.1
|
||||
usr/share/man/man1/mariadb-client-test.1
|
||||
usr/share/man/man1/mariadb-test-embedded.1
|
||||
usr/share/man/man1/mariadb-test.1
|
||||
usr/share/mysql/mysql-test/README
|
||||
usr/share/mysql/mysql-test/README-gcov
|
||||
usr/share/mysql/mysql-test/README.stress
|
||||
|
|
8
debian/mariadb-test.links
vendored
8
debian/mariadb-test.links
vendored
|
@ -1,6 +1,6 @@
|
|||
usr/bin/mysql_client_test usr/bin/mariadb-client-test
|
||||
usr/bin/mysql_client_test_embedded usr/bin/mariadb-client-test-embedded
|
||||
usr/bin/mysqltest usr/bin/mariadb-test
|
||||
usr/bin/mysqltest_embedded usr/bin/mariadb-test-embedded
|
||||
usr/share/mysql/mysql-test/mysql-test-run.pl usr/share/mysql/mysql-test/mtr
|
||||
usr/share/mysql/mysql-test/mysql-test-run.pl usr/share/mysql/mysql-test/mysql-test-run
|
||||
usr/bin/mysql_client_test_embedded usr/bin/mariadb-client-test-embedded
|
||||
usr/bin/mysqltest_embedded usr/bin/mariadb-test-embedded
|
||||
usr/bin/mysql_client_test usr/bin/mariadb-client-test
|
||||
usr/bin/mysqltest usr/bin/mariadb-test
|
||||
|
|
3
debian/rules
vendored
3
debian/rules
vendored
|
@ -163,9 +163,6 @@ override_dh_installinit-arch:
|
|||
override_dh_installcron-arch:
|
||||
dh_installcron --name mysql-server
|
||||
|
||||
get-orig-source:
|
||||
uscan --force-download --verbose
|
||||
|
||||
# If a file is not supposed to be included anywhere, add it to the not-installed
|
||||
# file and document the reason. Note that dh_install supports the above mentioned
|
||||
# white list file only starting from Debian Stretch and Ubuntu Xenial.
|
||||
|
|
|
@ -1606,7 +1606,8 @@ bool backup_finish()
|
|||
return(false);
|
||||
}
|
||||
|
||||
if (!write_xtrabackup_info(mysql_connection, XTRABACKUP_INFO, opt_history != 0)) {
|
||||
if (!write_xtrabackup_info(mysql_connection, XTRABACKUP_INFO,
|
||||
opt_history != 0, true)) {
|
||||
return(false);
|
||||
}
|
||||
|
||||
|
|
|
@ -1367,9 +1367,12 @@ PERCONA_SCHEMA.xtrabackup_history and writes a new history record to the
|
|||
table containing all the history info particular to the just completed
|
||||
backup. */
|
||||
bool
|
||||
write_xtrabackup_info(MYSQL *connection, const char * filename, bool history)
|
||||
write_xtrabackup_info(MYSQL *connection, const char * filename, bool history,
|
||||
bool stream)
|
||||
{
|
||||
|
||||
bool result = true;
|
||||
FILE *fp = NULL;
|
||||
char *uuid = NULL;
|
||||
char *server_version = NULL;
|
||||
char buf_start_time[100];
|
||||
|
@ -1395,7 +1398,8 @@ write_xtrabackup_info(MYSQL *connection, const char * filename, bool history)
|
|||
|| xtrabackup_databases_exclude
|
||||
);
|
||||
|
||||
backup_file_printf(filename,
|
||||
char *buf = NULL;
|
||||
int buf_len = asprintf(&buf,
|
||||
"uuid = %s\n"
|
||||
"name = %s\n"
|
||||
"tool_name = %s\n"
|
||||
|
@ -1407,8 +1411,8 @@ write_xtrabackup_info(MYSQL *connection, const char * filename, bool history)
|
|||
"end_time = %s\n"
|
||||
"lock_time = %d\n"
|
||||
"binlog_pos = %s\n"
|
||||
"innodb_from_lsn = %llu\n"
|
||||
"innodb_to_lsn = %llu\n"
|
||||
"innodb_from_lsn = " LSN_PF "\n"
|
||||
"innodb_to_lsn = " LSN_PF "\n"
|
||||
"partial = %s\n"
|
||||
"incremental = %s\n"
|
||||
"format = %s\n"
|
||||
|
@ -1425,12 +1429,34 @@ write_xtrabackup_info(MYSQL *connection, const char * filename, bool history)
|
|||
(int)history_lock_time, /* lock_time */
|
||||
mysql_binlog_position ?
|
||||
mysql_binlog_position : "", /* binlog_pos */
|
||||
incremental_lsn, /* innodb_from_lsn */
|
||||
metadata_to_lsn, /* innodb_to_lsn */
|
||||
incremental_lsn,
|
||||
/* innodb_from_lsn */
|
||||
metadata_to_lsn,
|
||||
/* innodb_to_lsn */
|
||||
is_partial? "Y" : "N",
|
||||
xtrabackup_incremental ? "Y" : "N", /* incremental */
|
||||
xb_stream_name[xtrabackup_stream_fmt], /* format */
|
||||
xtrabackup_compress ? "compressed" : "N"); /* compressed */
|
||||
if (buf_len < 0) {
|
||||
msg("Error: cannot generate xtrabackup_info");
|
||||
result = false;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (stream) {
|
||||
backup_file_printf(filename, "%s", buf);
|
||||
} else {
|
||||
fp = fopen(filename, "w");
|
||||
if (!fp) {
|
||||
msg("Error: cannot open %s", filename);
|
||||
result = false;
|
||||
goto cleanup;
|
||||
}
|
||||
if (fwrite(buf, buf_len, 1, fp) < 1) {
|
||||
result = false;
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
|
||||
if (!history) {
|
||||
goto cleanup;
|
||||
|
@ -1492,8 +1518,11 @@ cleanup:
|
|||
|
||||
free(uuid);
|
||||
free(server_version);
|
||||
free(buf);
|
||||
if (fp)
|
||||
fclose(fp);
|
||||
|
||||
return(true);
|
||||
return(result);
|
||||
}
|
||||
|
||||
extern const char *innodb_checksum_algorithm_names[];
|
||||
|
|
|
@ -68,7 +68,8 @@ bool
|
|||
write_binlog_info(MYSQL *connection);
|
||||
|
||||
bool
|
||||
write_xtrabackup_info(MYSQL *connection, const char * filename, bool history);
|
||||
write_xtrabackup_info(MYSQL *connection, const char * filename, bool history,
|
||||
bool stream);
|
||||
|
||||
bool
|
||||
write_backup_config_file();
|
||||
|
|
|
@ -3970,7 +3970,7 @@ static bool xtrabackup_backup_low()
|
|||
}
|
||||
sprintf(filename, "%s/%s", xtrabackup_extra_lsndir,
|
||||
XTRABACKUP_INFO);
|
||||
if (!write_xtrabackup_info(mysql_connection, filename, false)) {
|
||||
if (!write_xtrabackup_info(mysql_connection, filename, false, false)) {
|
||||
msg("Error: failed to write info "
|
||||
"to '%s'.", filename);
|
||||
return false;
|
||||
|
|
|
@ -58,7 +58,8 @@ extern void _db_dump_(uint _line_,const char *keyword,
|
|||
extern void _db_end_(void);
|
||||
extern void _db_lock_file_(void);
|
||||
extern void _db_unlock_file_(void);
|
||||
extern my_bool _db_my_assert(void);
|
||||
ATTRIBUTE_COLD
|
||||
extern my_bool _db_my_assert(const char *file, int line, const char *msg);
|
||||
extern FILE *_db_fp_(void);
|
||||
extern void _db_flush_(void);
|
||||
extern void dbug_swap_code_state(void **code_state_store);
|
||||
|
@ -104,10 +105,9 @@ extern int (*dbug_sanity)(void);
|
|||
#define DBUG_END() _db_end_ ()
|
||||
#define DBUG_LOCK_FILE _db_lock_file_()
|
||||
#define DBUG_UNLOCK_FILE _db_unlock_file_()
|
||||
#define DBUG_ASSERT(A) do { if (!(A)) { _db_flush_(); \
|
||||
if (_db_my_assert()) assert(A); \
|
||||
else fprintf(stderr, "%s:%d: assert: %s\n", __FILE__, __LINE__, #A); \
|
||||
}} while (0)
|
||||
#define DBUG_ASSERT(A) do { \
|
||||
if (unlikely(!(A)) && _db_my_assert(__FILE__, __LINE__, #A)) assert(A); \
|
||||
} while (0)
|
||||
#define DBUG_SLOW_ASSERT(A) DBUG_ASSERT(A)
|
||||
#define DBUG_ASSERT_EXISTS
|
||||
#define DBUG_EXPLAIN(buf,len) _db_explain_(0, (buf),(len))
|
||||
|
|
|
@ -14,6 +14,7 @@ SHOW CREATE TABLE t1;
|
|||
|
||||
INSERT INTO t1 (ch) VALUES ('admin'),('admin1');
|
||||
SELECT ch FROM t1 WHERE ch='admin𝌆';
|
||||
EXPLAIN SELECT ch FROM t1 WHERE ch='admin𝌆';
|
||||
SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch='admin𝌆';
|
||||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='admin𝌆';
|
||||
DELETE FROM t1;
|
||||
|
|
|
@ -100,3 +100,23 @@ CREATE TABLE t1(a INT ZEROFILL);
|
|||
SELECT 1 FROM t1 WHERE t1.a IN (1, t1.a) AND t1.a=2;
|
||||
1
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a char(2), index (a));
|
||||
insert into t1 values ("aa"),("bb");
|
||||
select * from t1 where a="aa";
|
||||
a
|
||||
aa
|
||||
select * from t1 where a="aaa";
|
||||
a
|
||||
select * from t1 where a="aa ";
|
||||
a
|
||||
aa
|
||||
select * from t1 where a>="aaa";
|
||||
a
|
||||
bb
|
||||
explain select * from t1 where a="aaa";
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref a a 3 const 1 Using where; Using index
|
||||
explain select * from t1 where a="aa ";
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref a a 3 const 1 Using where; Using index
|
||||
drop table t1;
|
||||
|
|
|
@ -94,3 +94,17 @@ DROP TABLE t1;
|
|||
CREATE TABLE t1(a INT ZEROFILL);
|
||||
SELECT 1 FROM t1 WHERE t1.a IN (1, t1.a) AND t1.a=2;
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# Check what happens when comparing to long string
|
||||
#
|
||||
|
||||
CREATE TABLE t1 (a char(2), index (a));
|
||||
insert into t1 values ("aa"),("bb");
|
||||
select * from t1 where a="aa";
|
||||
select * from t1 where a="aaa";
|
||||
select * from t1 where a="aa ";
|
||||
select * from t1 where a>="aaa";
|
||||
explain select * from t1 where a="aaa";
|
||||
explain select * from t1 where a="aa ";
|
||||
drop table t1;
|
||||
|
|
|
@ -38,9 +38,9 @@ DROP SERVER server_1;
|
|||
CREATE SERVER server_1 FOREIGN DATA WRAPPER mysql OPTIONS (USER 'Remote', HOST 'Server.Example.Com', DATABASE 'test');
|
||||
SELECT Host FROM mysql.servers WHERE Server_Name = 'server_1';
|
||||
Host
|
||||
server.example.com
|
||||
Server.Example.Com
|
||||
ALTER SERVER server_1 OPTIONS(HOST 'Server.Example.Org');
|
||||
SELECT Host FROM mysql.servers WHERE Server_Name = 'server_1';
|
||||
Host
|
||||
server.example.org
|
||||
Server.Example.Org
|
||||
DROP SERVER server_1;
|
||||
|
|
|
@ -606,7 +606,7 @@ with t(c) as (select a from t1 where b >= 'c')
|
|||
select * from t r1 where r1.c=4;
|
||||
show create view v3;
|
||||
View Create View character_set_client collation_connection
|
||||
v3 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v3` AS with t as (select `t1`.`a` AS `c` from `t1` where `t1`.`b` >= 'c')select `r1`.`c` AS `c` from `t` `r1` where `r1`.`c` = 4 latin1 latin1_swedish_ci
|
||||
v3 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v3` AS with t(c) as (select `t1`.`a` AS `c` from `t1` where `t1`.`b` >= 'c')select `r1`.`c` AS `c` from `t` `r1` where `r1`.`c` = 4 latin1 latin1_swedish_ci
|
||||
select * from v3;
|
||||
c
|
||||
4
|
||||
|
@ -618,7 +618,7 @@ with t(c) as (select a from t1 where b >= 'c')
|
|||
select * from t r1, t r2 where r1.c=r2.c and r2.c=4;
|
||||
show create view v4;
|
||||
View Create View character_set_client collation_connection
|
||||
v4 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v4` AS with t as (select `test`.`t1`.`a` AS `c` from `test`.`t1` where `test`.`t1`.`b` >= 'c')select `r1`.`c` AS `c`,`r2`.`c` AS `d` from (`t` `r1` join (select `test`.`t1`.`a` AS `c` from `test`.`t1` where `test`.`t1`.`b` >= 'c') `r2`) where `r1`.`c` = `r2`.`c` and `r2`.`c` = 4 latin1 latin1_swedish_ci
|
||||
v4 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v4` AS with t(c) as (select `test`.`t1`.`a` AS `c` from `test`.`t1` where `test`.`t1`.`b` >= 'c')select `r1`.`c` AS `c`,`r2`.`c` AS `d` from (`t` `r1` join (select `test`.`t1`.`a` AS `c` from `test`.`t1` where `test`.`t1`.`b` >= 'c') `r2`) where `r1`.`c` = `r2`.`c` and `r2`.`c` = 4 latin1 latin1_swedish_ci
|
||||
select * from v4;
|
||||
c d
|
||||
4 4
|
||||
|
|
|
@ -699,7 +699,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
|||
5 RECURSIVE UNION p ALL NULL NULL NULL NULL 12 100.00 Using where; Using join buffer (flat, BNL join)
|
||||
NULL UNION RESULT <union3,4,5> ALL NULL NULL NULL NULL NULL NULL
|
||||
Warnings:
|
||||
Note 1003 with recursive ancestor_couple_ids as (/* select#2 */ select `a`.`father` AS `h_id`,`a`.`mother` AS `w_id` from `coupled_ancestors` `a` where `a`.`father` is not null and `a`.`mother` is not null), coupled_ancestors as (/* select#3 */ select `test`.`folks`.`id` AS `id`,`test`.`folks`.`name` AS `name`,`test`.`folks`.`dob` AS `dob`,`test`.`folks`.`father` AS `father`,`test`.`folks`.`mother` AS `mother` from `test`.`folks` where `test`.`folks`.`name` = 'Me' union all /* select#4 */ select `test`.`p`.`id` AS `id`,`test`.`p`.`name` AS `name`,`test`.`p`.`dob` AS `dob`,`test`.`p`.`father` AS `father`,`test`.`p`.`mother` AS `mother` from `test`.`folks` `p` join `ancestor_couple_ids` `fa` where `test`.`p`.`id` = `fa`.`h_id` union all /* select#5 */ select `test`.`p`.`id` AS `id`,`test`.`p`.`name` AS `name`,`test`.`p`.`dob` AS `dob`,`test`.`p`.`father` AS `father`,`test`.`p`.`mother` AS `mother` from `test`.`folks` `p` join `ancestor_couple_ids` `ma` where `test`.`p`.`id` = `ma`.`w_id`)/* select#1 */ select `h`.`name` AS `name`,`h`.`dob` AS `dob`,`w`.`name` AS `name`,`w`.`dob` AS `dob` from `ancestor_couple_ids` `c` join `coupled_ancestors` `h` join `coupled_ancestors` `w` where `h`.`id` = `c`.`h_id` and `w`.`id` = `c`.`w_id`
|
||||
Note 1003 with recursive ancestor_couple_ids(h_id,w_id) as (/* select#2 */ select `a`.`father` AS `h_id`,`a`.`mother` AS `w_id` from `coupled_ancestors` `a` where `a`.`father` is not null and `a`.`mother` is not null), coupled_ancestors(id,name,dob,father,mother) as (/* select#3 */ select `test`.`folks`.`id` AS `id`,`test`.`folks`.`name` AS `name`,`test`.`folks`.`dob` AS `dob`,`test`.`folks`.`father` AS `father`,`test`.`folks`.`mother` AS `mother` from `test`.`folks` where `test`.`folks`.`name` = 'Me' union all /* select#4 */ select `test`.`p`.`id` AS `id`,`test`.`p`.`name` AS `name`,`test`.`p`.`dob` AS `dob`,`test`.`p`.`father` AS `father`,`test`.`p`.`mother` AS `mother` from `test`.`folks` `p` join `ancestor_couple_ids` `fa` where `test`.`p`.`id` = `fa`.`h_id` union all /* select#5 */ select `test`.`p`.`id` AS `id`,`test`.`p`.`name` AS `name`,`test`.`p`.`dob` AS `dob`,`test`.`p`.`father` AS `father`,`test`.`p`.`mother` AS `mother` from `test`.`folks` `p` join `ancestor_couple_ids` `ma` where `test`.`p`.`id` = `ma`.`w_id`)/* select#1 */ select `h`.`name` AS `name`,`h`.`dob` AS `dob`,`w`.`name` AS `name`,`w`.`dob` AS `dob` from `ancestor_couple_ids` `c` join `coupled_ancestors` `h` join `coupled_ancestors` `w` where `h`.`id` = `c`.`h_id` and `w`.`id` = `c`.`w_id`
|
||||
# simple mutual recursion
|
||||
with recursive
|
||||
ancestor_couple_ids(h_id, w_id)
|
||||
|
@ -3091,7 +3091,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
|||
4 DEPENDENT SUBQUERY <derived2> ALL NULL NULL NULL NULL 16 100.00 Using where
|
||||
NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL NULL
|
||||
Warnings:
|
||||
Note 1003 with recursive destinations as (/* select#2 */ select `test`.`a`.`arrival` AS `city`,1 AS `legs` from `test`.`flights` `a` where `test`.`a`.`departure` = 'Cairo' union /* select#3 */ select `test`.`b`.`arrival` AS `arrival`,`r`.`legs` + 1 AS `r.legs + 1` from `destinations` `r` join `test`.`flights` `b` where `r`.`city` = `test`.`b`.`departure` and !<in_optimizer>(`test`.`b`.`arrival`,<exists>(/* select#4 */ select `destinations`.`city` from `destinations` where trigcond(`test`.`b`.`arrival` = `destinations`.`city` or `destinations`.`city` is null) having trigcond(`destinations`.`city` is null))))/* select#1 */ select `destinations`.`city` AS `city`,`destinations`.`legs` AS `legs` from `destinations`
|
||||
Note 1003 with recursive destinations(city,legs) as (/* select#2 */ select `test`.`a`.`arrival` AS `city`,1 AS `legs` from `test`.`flights` `a` where `test`.`a`.`departure` = 'Cairo' union /* select#3 */ select `test`.`b`.`arrival` AS `arrival`,`r`.`legs` + 1 AS `r.legs + 1` from `destinations` `r` join `test`.`flights` `b` where `r`.`city` = `test`.`b`.`departure` and !<in_optimizer>(`test`.`b`.`arrival`,<exists>(/* select#4 */ select `destinations`.`city` from `destinations` where trigcond(`test`.`b`.`arrival` = `destinations`.`city` or `destinations`.`city` is null) having trigcond(`destinations`.`city` is null))))/* select#1 */ select `destinations`.`city` AS `city`,`destinations`.`legs` AS `legs` from `destinations`
|
||||
set standard_compliant_cte=default;
|
||||
drop table flights;
|
||||
#
|
||||
|
@ -3378,7 +3378,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
|||
3 RECURSIVE UNION <derived2> ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||
NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL NULL
|
||||
Warnings:
|
||||
Note 1003 with recursive rcte as (/* select#2 */ select 1 AS `a` union /* select#3 */ select cast(`rcte`.`a` + 1 as unsigned) AS `cast(a+1 as unsigned)` from `rcte` where `rcte`.`a` < 10), cte1 as (/* select#4 */ select count(0) AS `c1` from `rcte` join `test`.`t1` where `rcte`.`a` between 3 and 5 and `test`.`t1`.`id` = `rcte`.`a` - 3), cte2 as (/* select#5 */ select count(0) AS `c2` from `rcte` join `test`.`t1` where `rcte`.`a` between 7 and 8 and `test`.`t1`.`id` = `rcte`.`a` - 7)/* select#1 */ select `cte1`.`c1` AS `c1`,`cte2`.`c2` AS `c2` from `cte1` join `cte2`
|
||||
Note 1003 with recursive rcte(a) as (/* select#2 */ select 1 AS `a` union /* select#3 */ select cast(`rcte`.`a` + 1 as unsigned) AS `cast(a+1 as unsigned)` from `rcte` where `rcte`.`a` < 10), cte1 as (/* select#4 */ select count(0) AS `c1` from `rcte` join `test`.`t1` where `rcte`.`a` between 3 and 5 and `test`.`t1`.`id` = `rcte`.`a` - 3), cte2 as (/* select#5 */ select count(0) AS `c2` from `rcte` join `test`.`t1` where `rcte`.`a` between 7 and 8 and `test`.`t1`.`id` = `rcte`.`a` - 7)/* select#1 */ select `cte1`.`c1` AS `c1`,`cte2`.`c2` AS `c2` from `cte1` join `cte2`
|
||||
prepare stmt from "with recursive
|
||||
rcte(a) as
|
||||
(select 1 union select cast(a+1 as unsigned) from rcte where a < 10),
|
||||
|
|
|
@ -6748,14 +6748,13 @@ t1 CREATE TABLE `t1` (
|
|||
INSERT INTO t1 (ch) VALUES ('admin'),('admin1');
|
||||
SELECT ch FROM t1 WHERE ch='admin𝌆';
|
||||
ch
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
|
||||
EXPLAIN SELECT ch FROM t1 WHERE ch='admin𝌆';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
|
||||
SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch='admin𝌆';
|
||||
ch
|
||||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='admin𝌆';
|
||||
ch
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
|
||||
DELETE FROM t1;
|
||||
INSERT INTO t1 (ch) VALUES ('a'), ('a?'), ('a??'), ('a???'), ('a????');
|
||||
INSERT INTO t1 (ch) VALUES ('ab'),('a?b'),('a??b'),('a???b'),('a????b');
|
||||
|
@ -6771,22 +6770,14 @@ EXPLAIN
|
|||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='a𝌆' ORDER BY ch;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL # Impossible WHERE noticed after reading const tables
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
|
||||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='a𝌆' ORDER BY ch;
|
||||
ch
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
|
||||
EXPLAIN
|
||||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='a𝌆b' ORDER BY ch;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL # Impossible WHERE noticed after reading const tables
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1
|
||||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='a𝌆b' ORDER BY ch;
|
||||
ch
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1
|
||||
SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch<'a𝌆' ORDER BY ch;
|
||||
ch
|
||||
a
|
||||
|
@ -6829,8 +6820,6 @@ EXPLAIN
|
|||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'a𝌆' ORDER BY ch;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
|
||||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'a𝌆' ORDER BY ch;
|
||||
ch
|
||||
a
|
||||
|
@ -6850,14 +6839,10 @@ ab
|
|||
az
|
||||
aЀ
|
||||
aր
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
|
||||
EXPLAIN
|
||||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'a𝌆b' ORDER BY ch;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1
|
||||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'a𝌆b' ORDER BY ch;
|
||||
ch
|
||||
a
|
||||
|
@ -6877,8 +6862,6 @@ ab
|
|||
az
|
||||
aЀ
|
||||
aր
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1
|
||||
SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch>'a𝌆' ORDER BY ch;
|
||||
ch
|
||||
z
|
||||
|
@ -6889,24 +6872,16 @@ EXPLAIN
|
|||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'a𝌆' ORDER BY ch;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
|
||||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'a𝌆' ORDER BY ch;
|
||||
ch
|
||||
z
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
|
||||
EXPLAIN
|
||||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'a𝌆b' ORDER BY ch;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1
|
||||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'a𝌆b' ORDER BY ch;
|
||||
ch
|
||||
z
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1
|
||||
ALTER TABLE t1 DROP KEY ch;
|
||||
# 0xD18F would be a good 2-byte character, 0xD1 is an incomplete sequence
|
||||
SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0xD1,'''');
|
||||
|
@ -6992,14 +6967,13 @@ t1 CREATE TABLE `t1` (
|
|||
INSERT INTO t1 (ch) VALUES ('admin'),('admin1');
|
||||
SELECT ch FROM t1 WHERE ch='admin𝌆';
|
||||
ch
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
|
||||
EXPLAIN SELECT ch FROM t1 WHERE ch='admin𝌆';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
|
||||
SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch='admin𝌆';
|
||||
ch
|
||||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='admin𝌆';
|
||||
ch
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
|
||||
DELETE FROM t1;
|
||||
INSERT INTO t1 (ch) VALUES ('a'), ('a?'), ('a??'), ('a???'), ('a????');
|
||||
INSERT INTO t1 (ch) VALUES ('ab'),('a?b'),('a??b'),('a???b'),('a????b');
|
||||
|
@ -7015,22 +6989,14 @@ EXPLAIN
|
|||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='a𝌆' ORDER BY ch;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL # Impossible WHERE noticed after reading const tables
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
|
||||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='a𝌆' ORDER BY ch;
|
||||
ch
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
|
||||
EXPLAIN
|
||||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='a𝌆b' ORDER BY ch;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL # Impossible WHERE noticed after reading const tables
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1
|
||||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='a𝌆b' ORDER BY ch;
|
||||
ch
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1
|
||||
SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch<'a𝌆' ORDER BY ch;
|
||||
ch
|
||||
a
|
||||
|
|
|
@ -23,14 +23,13 @@ t1 CREATE TABLE `t1` (
|
|||
INSERT INTO t1 (ch) VALUES ('admin'),('admin1');
|
||||
SELECT ch FROM t1 WHERE ch='admin𝌆';
|
||||
ch
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
|
||||
EXPLAIN SELECT ch FROM t1 WHERE ch='admin𝌆';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
|
||||
SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch='admin𝌆';
|
||||
ch
|
||||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='admin𝌆';
|
||||
ch
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
|
||||
DELETE FROM t1;
|
||||
INSERT INTO t1 (ch) VALUES ('a'), ('a?'), ('a??'), ('a???'), ('a????');
|
||||
INSERT INTO t1 (ch) VALUES ('ab'),('a?b'),('a??b'),('a???b'),('a????b');
|
||||
|
@ -46,22 +45,14 @@ EXPLAIN
|
|||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='a𝌆' ORDER BY ch;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL # Impossible WHERE noticed after reading const tables
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
|
||||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='a𝌆' ORDER BY ch;
|
||||
ch
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
|
||||
EXPLAIN
|
||||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='a𝌆b' ORDER BY ch;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL # Impossible WHERE noticed after reading const tables
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1
|
||||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='a𝌆b' ORDER BY ch;
|
||||
ch
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1
|
||||
SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch<'a𝌆' ORDER BY ch;
|
||||
ch
|
||||
a
|
||||
|
@ -104,8 +95,6 @@ EXPLAIN
|
|||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'a𝌆' ORDER BY ch;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
|
||||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'a𝌆' ORDER BY ch;
|
||||
ch
|
||||
a
|
||||
|
@ -125,14 +114,10 @@ ab
|
|||
az
|
||||
aЀ
|
||||
aր
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
|
||||
EXPLAIN
|
||||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'a𝌆b' ORDER BY ch;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1
|
||||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'a𝌆b' ORDER BY ch;
|
||||
ch
|
||||
a
|
||||
|
@ -152,8 +137,6 @@ ab
|
|||
az
|
||||
aЀ
|
||||
aր
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1
|
||||
SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch>'a𝌆' ORDER BY ch;
|
||||
ch
|
||||
z
|
||||
|
@ -164,24 +147,16 @@ EXPLAIN
|
|||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'a𝌆' ORDER BY ch;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
|
||||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'a𝌆' ORDER BY ch;
|
||||
ch
|
||||
z
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
|
||||
EXPLAIN
|
||||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'a𝌆b' ORDER BY ch;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1
|
||||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'a𝌆b' ORDER BY ch;
|
||||
ch
|
||||
z
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1
|
||||
ALTER TABLE t1 DROP KEY ch;
|
||||
# 0xD18F would be a good 2-byte character, 0xD1 is an incomplete sequence
|
||||
SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0xD1,'''');
|
||||
|
|
|
@ -5467,14 +5467,13 @@ t1 CREATE TABLE `t1` (
|
|||
INSERT INTO t1 (ch) VALUES ('admin'),('admin1');
|
||||
SELECT ch FROM t1 WHERE ch='admin𝌆';
|
||||
ch
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
|
||||
EXPLAIN SELECT ch FROM t1 WHERE ch='admin𝌆';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
|
||||
SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch='admin𝌆';
|
||||
ch
|
||||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='admin𝌆';
|
||||
ch
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
|
||||
DELETE FROM t1;
|
||||
INSERT INTO t1 (ch) VALUES ('a'), ('a?'), ('a??'), ('a???'), ('a????');
|
||||
INSERT INTO t1 (ch) VALUES ('ab'),('a?b'),('a??b'),('a???b'),('a????b');
|
||||
|
@ -5490,22 +5489,14 @@ EXPLAIN
|
|||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='a𝌆' ORDER BY ch;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL # Impossible WHERE noticed after reading const tables
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
|
||||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='a𝌆' ORDER BY ch;
|
||||
ch
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
|
||||
EXPLAIN
|
||||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='a𝌆b' ORDER BY ch;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL # Impossible WHERE noticed after reading const tables
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1
|
||||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='a𝌆b' ORDER BY ch;
|
||||
ch
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1
|
||||
SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch<'a𝌆' ORDER BY ch;
|
||||
ch
|
||||
a
|
||||
|
@ -5548,8 +5539,6 @@ EXPLAIN
|
|||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'a𝌆' ORDER BY ch;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
|
||||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'a𝌆' ORDER BY ch;
|
||||
ch
|
||||
a
|
||||
|
@ -5569,14 +5558,10 @@ ab
|
|||
az
|
||||
aЀ
|
||||
aր
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
|
||||
EXPLAIN
|
||||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'a𝌆b' ORDER BY ch;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1
|
||||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'a𝌆b' ORDER BY ch;
|
||||
ch
|
||||
a
|
||||
|
@ -5596,8 +5581,6 @@ ab
|
|||
az
|
||||
aЀ
|
||||
aր
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1
|
||||
SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch>'a𝌆' ORDER BY ch;
|
||||
ch
|
||||
z
|
||||
|
@ -5608,24 +5591,16 @@ EXPLAIN
|
|||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'a𝌆' ORDER BY ch;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
|
||||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'a𝌆' ORDER BY ch;
|
||||
ch
|
||||
z
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
|
||||
EXPLAIN
|
||||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'a𝌆b' ORDER BY ch;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1
|
||||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'a𝌆b' ORDER BY ch;
|
||||
ch
|
||||
z
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1
|
||||
ALTER TABLE t1 DROP KEY ch;
|
||||
# 0xD18F would be a good 2-byte character, 0xD1 is an incomplete sequence
|
||||
SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0xD1,'''');
|
||||
|
@ -5711,14 +5686,13 @@ t1 CREATE TABLE `t1` (
|
|||
INSERT INTO t1 (ch) VALUES ('admin'),('admin1');
|
||||
SELECT ch FROM t1 WHERE ch='admin𝌆';
|
||||
ch
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
|
||||
EXPLAIN SELECT ch FROM t1 WHERE ch='admin𝌆';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
|
||||
SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch='admin𝌆';
|
||||
ch
|
||||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='admin𝌆';
|
||||
ch
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
|
||||
DELETE FROM t1;
|
||||
INSERT INTO t1 (ch) VALUES ('a'), ('a?'), ('a??'), ('a???'), ('a????');
|
||||
INSERT INTO t1 (ch) VALUES ('ab'),('a?b'),('a??b'),('a???b'),('a????b');
|
||||
|
@ -5734,22 +5708,14 @@ EXPLAIN
|
|||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='a𝌆' ORDER BY ch;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL # Impossible WHERE noticed after reading const tables
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
|
||||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='a𝌆' ORDER BY ch;
|
||||
ch
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
|
||||
EXPLAIN
|
||||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='a𝌆b' ORDER BY ch;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL # Impossible WHERE noticed after reading const tables
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1
|
||||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='a𝌆b' ORDER BY ch;
|
||||
ch
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1
|
||||
SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch<'a𝌆' ORDER BY ch;
|
||||
ch
|
||||
a
|
||||
|
@ -5792,8 +5758,6 @@ EXPLAIN
|
|||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'a𝌆' ORDER BY ch;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
|
||||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'a𝌆' ORDER BY ch;
|
||||
ch
|
||||
a
|
||||
|
@ -5813,14 +5777,10 @@ ab
|
|||
az
|
||||
aЀ
|
||||
aր
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
|
||||
EXPLAIN
|
||||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'a𝌆b' ORDER BY ch;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1
|
||||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'a𝌆b' ORDER BY ch;
|
||||
ch
|
||||
a
|
||||
|
@ -5840,8 +5800,6 @@ ab
|
|||
az
|
||||
aЀ
|
||||
aր
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1
|
||||
SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch>'a𝌆' ORDER BY ch;
|
||||
ch
|
||||
z
|
||||
|
@ -5852,24 +5810,16 @@ EXPLAIN
|
|||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'a𝌆' ORDER BY ch;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
|
||||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'a𝌆' ORDER BY ch;
|
||||
ch
|
||||
z
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
|
||||
EXPLAIN
|
||||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'a𝌆b' ORDER BY ch;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1
|
||||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'a𝌆b' ORDER BY ch;
|
||||
ch
|
||||
z
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1
|
||||
ALTER TABLE t1 DROP KEY ch;
|
||||
# 0xD18F would be a good 2-byte character, 0xD1 is an incomplete sequence
|
||||
SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0xD1,'''');
|
||||
|
@ -5955,14 +5905,13 @@ t1 CREATE TABLE `t1` (
|
|||
INSERT INTO t1 (ch) VALUES ('admin'),('admin1');
|
||||
SELECT ch FROM t1 WHERE ch='admin𝌆';
|
||||
ch
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
|
||||
EXPLAIN SELECT ch FROM t1 WHERE ch='admin𝌆';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
|
||||
SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch='admin𝌆';
|
||||
ch
|
||||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='admin𝌆';
|
||||
ch
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
|
||||
DELETE FROM t1;
|
||||
INSERT INTO t1 (ch) VALUES ('a'), ('a?'), ('a??'), ('a???'), ('a????');
|
||||
INSERT INTO t1 (ch) VALUES ('ab'),('a?b'),('a??b'),('a???b'),('a????b');
|
||||
|
@ -5978,22 +5927,14 @@ EXPLAIN
|
|||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='a𝌆' ORDER BY ch;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL # Impossible WHERE noticed after reading const tables
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
|
||||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='a𝌆' ORDER BY ch;
|
||||
ch
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
|
||||
EXPLAIN
|
||||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='a𝌆b' ORDER BY ch;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL # Impossible WHERE noticed after reading const tables
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1
|
||||
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='a𝌆b' ORDER BY ch;
|
||||
ch
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1
|
||||
SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch<'a𝌆' ORDER BY ch;
|
||||
ch
|
||||
a
|
||||
|
|
|
@ -2193,7 +2193,7 @@ explain select * from t1 where a=1 and b=2 order by c limit 1 {
|
|||
"range_analysis": {
|
||||
"table_scan": {
|
||||
"rows": 1000,
|
||||
"cost": 1202
|
||||
"cost": 2e308
|
||||
},
|
||||
"potential_range_indexes": [
|
||||
{
|
||||
|
|
|
@ -49,6 +49,32 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|||
1 SIMPLE t1 index_merge key1,key2 key1,key2 5,5 NULL # Using sort_union(key1,key2); Using where
|
||||
drop table t0, t1;
|
||||
#
|
||||
# MDEV-18094: Query with order by limit picking index scan over filesort
|
||||
#
|
||||
create table t0 (a int);
|
||||
INSERT INTO t0 VALUES (0),(0),(0),(0),(2),(0),(0),(1),(1),(0);
|
||||
CREATE TABLE t1 (
|
||||
a int(11),
|
||||
b int(11),
|
||||
c int(11),
|
||||
KEY a_c (a,c),
|
||||
KEY a_b (a,b)
|
||||
) ENGINE=InnoDB;
|
||||
insert into t1 select A.a , B.a, C.a from t0 A, t0 B, t0 C;
|
||||
# should use ref access
|
||||
explain select a,b,c from t1 where a=1 and c=2 order by b;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref a_c,a_b a_c 10 const,const 20 Using where; Using filesort
|
||||
# both should use range access
|
||||
explain select a,b,c from t1 where a=1 and c=2 order by b limit 1000;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range a_c,a_b a_b 5 NULL 200 Using where
|
||||
explain select a,b,c from t1 where a=1 and c=2 order by b limit 2000;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range a_c,a_b a_b 5 NULL 200 Using where
|
||||
drop table t1,t0;
|
||||
# Start of 10.2 tests
|
||||
#
|
||||
# MDEV-14071: wrong results with orderby_uses_equalities=on
|
||||
# (duplicate of MDEV-13994)
|
||||
#
|
||||
|
@ -121,3 +147,4 @@ i n
|
|||
656 eight
|
||||
set optimizer_switch= @save_optimizer_switch;
|
||||
DROP TABLE t1,t2,t3;
|
||||
# End of 10.2 tests
|
||||
|
|
|
@ -62,6 +62,32 @@ where key1<3 or key2<3;
|
|||
|
||||
drop table t0, t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-18094: Query with order by limit picking index scan over filesort
|
||||
--echo #
|
||||
|
||||
create table t0 (a int);
|
||||
INSERT INTO t0 VALUES (0),(0),(0),(0),(2),(0),(0),(1),(1),(0);
|
||||
|
||||
CREATE TABLE t1 (
|
||||
a int(11),
|
||||
b int(11),
|
||||
c int(11),
|
||||
KEY a_c (a,c),
|
||||
KEY a_b (a,b)
|
||||
) ENGINE=InnoDB;
|
||||
insert into t1 select A.a , B.a, C.a from t0 A, t0 B, t0 C;
|
||||
|
||||
--echo # should use ref access
|
||||
explain select a,b,c from t1 where a=1 and c=2 order by b;
|
||||
|
||||
--echo # both should use range access
|
||||
explain select a,b,c from t1 where a=1 and c=2 order by b limit 1000;
|
||||
explain select a,b,c from t1 where a=1 and c=2 order by b limit 2000;
|
||||
drop table t1,t0;
|
||||
|
||||
--echo # Start of 10.2 tests
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-14071: wrong results with orderby_uses_equalities=on
|
||||
--echo # (duplicate of MDEV-13994)
|
||||
|
@ -108,3 +134,5 @@ eval $q2;
|
|||
set optimizer_switch= @save_optimizer_switch;
|
||||
|
||||
DROP TABLE t1,t2,t3;
|
||||
|
||||
--echo # End of 10.2 tests
|
||||
|
|
|
@ -36,10 +36,6 @@ SELECT INFO, INFO_BINARY, 'xxx😎yyy' AS utf8mb4_string FROM INFORMATION_SCHEMA
|
|||
INFO SELECT INFO, INFO_BINARY, 'xxx????yyy' AS utf8mb4_string FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO LIKE '%xxx%yyy%'
|
||||
INFO_BINARY SELECT INFO, INFO_BINARY, 'xxx😎yyy' AS utf8mb4_string FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO LIKE '%xxx%yyy%'
|
||||
utf8mb4_string xxx😎yyy
|
||||
Warnings:
|
||||
Level Warning
|
||||
Code 1366
|
||||
Message Incorrect string value: '\xF0\x9F\x98\x8Eyy...' for column `information_schema`.`(temporary)`.`INFO` at row 1
|
||||
#
|
||||
# End of 10.1 tests
|
||||
#
|
||||
|
|
|
@ -4547,7 +4547,7 @@ DEALLOCATE PREPARE stmt;
|
|||
#
|
||||
PREPARE stmt FROM 'SELECT ? FROM DUAL';
|
||||
EXECUTE stmt USING (SELECT 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 'SELECT 1)' at line 1
|
||||
ERROR 42000: EXECUTE..USING does not support subqueries or stored functions
|
||||
DEALLOCATE PREPARE stmt;
|
||||
CREATE FUNCTION f1() RETURNS VARCHAR(10) RETURN 'test';
|
||||
PREPARE stmt FROM 'SELECT ? FROM DUAL';
|
||||
|
@ -4746,7 +4746,7 @@ ERROR 21000: Operand should contain 1 column(s)
|
|||
# Testing disallowed expressions in USING
|
||||
#
|
||||
EXECUTE IMMEDIATE 'SELECT ? FROM DUAL' USING (SELECT 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 'SELECT 1)' at line 1
|
||||
ERROR 42000: EXECUTE..USING does not support subqueries or stored functions
|
||||
CREATE FUNCTION f1() RETURNS VARCHAR(10) RETURN 'test';
|
||||
EXECUTE IMMEDIATE 'SELECT ? FROM DUAL' USING f1();
|
||||
ERROR 42000: EXECUTE IMMEDIATE does not support subqueries or stored functions
|
||||
|
@ -4932,9 +4932,9 @@ ERROR HY000: Illegal mix of collations (latin1_swedish_ci,COERCIBLE) and (latin2
|
|||
PREPARE stmt FROM CONCAT(_latin1'SELECT 1 AS c FROM ', _latin2 'DUAL');
|
||||
ERROR HY000: Illegal mix of collations (latin1_swedish_ci,COERCIBLE) and (latin2_general_ci,COERCIBLE) for operation 'concat'
|
||||
EXECUTE IMMEDIATE (SELECT 'SELECT 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 'SELECT 'SELECT 1')' at line 1
|
||||
ERROR 42000: EXECUTE IMMEDIATE does not support subqueries or stored functions
|
||||
PREPARE stmt FROM (SELECT 'SELECT 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 'SELECT 'SELECT 1')' at line 1
|
||||
ERROR 42000: PREPARE..FROM does not support subqueries or stored functions
|
||||
EXECUTE IMMEDIATE a;
|
||||
ERROR 42S22: Unknown column 'a' in 'field list'
|
||||
PREPARE stmt FROM a;
|
||||
|
|
|
@ -4042,7 +4042,7 @@ DEALLOCATE PREPARE stmt;
|
|||
--echo #
|
||||
|
||||
PREPARE stmt FROM 'SELECT ? FROM DUAL';
|
||||
--error ER_PARSE_ERROR
|
||||
--error ER_SUBQUERIES_NOT_SUPPORTED
|
||||
EXECUTE stmt USING (SELECT 1);
|
||||
DEALLOCATE PREPARE stmt;
|
||||
|
||||
|
@ -4221,7 +4221,7 @@ EXECUTE IMMEDIATE 'SELECT ?' USING ROW(1,2);
|
|||
--echo # Testing disallowed expressions in USING
|
||||
--echo #
|
||||
|
||||
--error ER_PARSE_ERROR
|
||||
--error ER_SUBQUERIES_NOT_SUPPORTED
|
||||
EXECUTE IMMEDIATE 'SELECT ? FROM DUAL' USING (SELECT 1);
|
||||
|
||||
CREATE FUNCTION f1() RETURNS VARCHAR(10) RETURN 'test';
|
||||
|
@ -4394,9 +4394,9 @@ EXECUTE IMMEDIATE CONCAT(_latin1'SELECT 1 AS c FROM ', _latin2 'DUAL');
|
|||
--error ER_CANT_AGGREGATE_2COLLATIONS
|
||||
PREPARE stmt FROM CONCAT(_latin1'SELECT 1 AS c FROM ', _latin2 'DUAL');
|
||||
|
||||
--error ER_PARSE_ERROR
|
||||
--error ER_SUBQUERIES_NOT_SUPPORTED
|
||||
EXECUTE IMMEDIATE (SELECT 'SELECT 1');
|
||||
--error ER_PARSE_ERROR
|
||||
--error ER_SUBQUERIES_NOT_SUPPORTED
|
||||
PREPARE stmt FROM (SELECT 'SELECT 1');
|
||||
|
||||
--error ER_BAD_FIELD_ERROR
|
||||
|
|
|
@ -2115,23 +2115,15 @@ explain
|
|||
SELECT * FROM t1 WHERE fd='😁';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9F\x98\x81' for column `test`.`t1`.`fd` at row 1
|
||||
SELECT * FROM t1 WHERE fd='😁';
|
||||
id fd
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9F\x98\x81' for column `test`.`t1`.`fd` at row 1
|
||||
# The following must not use range access:
|
||||
explain select count(*) from t1 where fd <'😁';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index ix_fd ix_fd 63 NULL # Using where; Using index
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9F\x98\x81' for column `test`.`t1`.`fd` at row 1
|
||||
select count(*) from t1 where fd <'😁';
|
||||
count(*)
|
||||
40960
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9F\x98\x81' for column `test`.`t1`.`fd` at row 1
|
||||
select count(*) from t1 ignore index (ix_fd) where fd <'😁';
|
||||
count(*)
|
||||
40960
|
||||
|
@ -2353,8 +2345,6 @@ INSERT INTO t1 VALUES ('a'),('b'),('c'),('d'),('e');
|
|||
EXPLAIN SELECT * FROM t1 WHERE a<=>'😎';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9F\x98\x8E' for column `test`.`t1`.`a` at row 1
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-10185: Assertion `tree1->keys[key_no] && tree2->keys[key_no]' failed in
|
||||
|
|
|
@ -2118,23 +2118,15 @@ explain
|
|||
SELECT * FROM t1 WHERE fd='😁';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9F\x98\x81' for column `test`.`t1`.`fd` at row 1
|
||||
SELECT * FROM t1 WHERE fd='😁';
|
||||
id fd
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9F\x98\x81' for column `test`.`t1`.`fd` at row 1
|
||||
# The following must not use range access:
|
||||
explain select count(*) from t1 where fd <'😁';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index ix_fd ix_fd 63 NULL # Using where; Using index
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9F\x98\x81' for column `test`.`t1`.`fd` at row 1
|
||||
select count(*) from t1 where fd <'😁';
|
||||
count(*)
|
||||
40960
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9F\x98\x81' for column `test`.`t1`.`fd` at row 1
|
||||
select count(*) from t1 ignore index (ix_fd) where fd <'😁';
|
||||
count(*)
|
||||
40960
|
||||
|
@ -2356,8 +2348,6 @@ INSERT INTO t1 VALUES ('a'),('b'),('c'),('d'),('e');
|
|||
EXPLAIN SELECT * FROM t1 WHERE a<=>'😎';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9F\x98\x8E' for column `test`.`t1`.`a` at row 1
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-10185: Assertion `tree1->keys[key_no] && tree2->keys[key_no]' failed in
|
||||
|
|
|
@ -1668,5 +1668,90 @@ drop table t1;
|
|||
set use_stat_tables= @save_use_stat_tables;
|
||||
set @@histogram_size=@save_histogram_size;
|
||||
set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
|
||||
#
|
||||
# MDEV-20576: failing assertion DBUG_ASSERT(0.0 < sel && sel <= 1)
|
||||
#
|
||||
set @@optimizer_use_condition_selectivity=2;
|
||||
set names utf8;
|
||||
CREATE DATABASE world;
|
||||
use world;
|
||||
CREATE TABLE Country (
|
||||
Code char(3) NOT NULL default '',
|
||||
Name char(52) NOT NULL default '',
|
||||
SurfaceArea float(10,2) NOT NULL default '0.00',
|
||||
Population int(11) NOT NULL default '0',
|
||||
Capital int(11) default NULL,
|
||||
PRIMARY KEY (Code),
|
||||
UNIQUE INDEX (Name)
|
||||
);
|
||||
CREATE TABLE City (
|
||||
ID int(11) NOT NULL auto_increment,
|
||||
Name char(35) NOT NULL default '',
|
||||
Country char(3) NOT NULL default '',
|
||||
Population int(11) NOT NULL default '0',
|
||||
PRIMARY KEY (ID),
|
||||
INDEX (Population),
|
||||
INDEX (Country)
|
||||
);
|
||||
CREATE TABLE CountryLanguage (
|
||||
Country char(3) NOT NULL default '',
|
||||
Language char(30) NOT NULL default '',
|
||||
Percentage float(3,1) NOT NULL default '0.0',
|
||||
PRIMARY KEY (Country, Language),
|
||||
INDEX (Percentage)
|
||||
);
|
||||
CREATE INDEX Name ON City(Name);
|
||||
CREATE INDEX CountryPopulation ON City(Country,Population);
|
||||
CREATE INDEX CountryName ON City(Country,Name);
|
||||
set @@optimizer_use_condition_selectivity=2;
|
||||
EXPLAIN
|
||||
SELECT * FROM City WHERE Country='FIN';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE City ref Country,CountryPopulation,CountryName CountryName 3 const 5 Using index condition
|
||||
DROP DATABASE world;
|
||||
use test;
|
||||
CREATE TABLE t1 (
|
||||
a INT,
|
||||
b INT NOT NULL,
|
||||
c char(100),
|
||||
KEY (b, c),
|
||||
KEY (b, a, c)
|
||||
) ENGINE=MyISAM
|
||||
DEFAULT CHARSET = utf8;
|
||||
INSERT INTO t1 VALUES
|
||||
(1, 1, 1),
|
||||
(2, 2, 2),
|
||||
(3, 3, 3),
|
||||
(4, 4, 4),
|
||||
(5, 5, 5),
|
||||
(6, 6, 6),
|
||||
(7, 7, 7),
|
||||
(8, 8, 8),
|
||||
(9, 9, 9);
|
||||
INSERT INTO t1 SELECT a + 10, b, c FROM t1;
|
||||
INSERT INTO t1 SELECT a + 20, b, c FROM t1;
|
||||
INSERT INTO t1 SELECT a + 40, b, c FROM t1;
|
||||
INSERT INTO t1 SELECT a + 80, b, c FROM t1;
|
||||
INSERT INTO t1 SELECT a + 160, b, c FROM t1;
|
||||
INSERT INTO t1 SELECT a + 320, b, c FROM t1;
|
||||
INSERT INTO t1 SELECT a + 640, b, c FROM t1;
|
||||
INSERT INTO t1 SELECT a + 1280, b, c FROM t1 LIMIT 80;
|
||||
EXPLAIN
|
||||
SELECT a FROM t1 WHERE b = 1 ORDER BY c DESC LIMIT 9;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range b,b_2 b 4 NULL 226 Using where
|
||||
SELECT a FROM t1 WHERE b = 1 ORDER BY c DESC LIMIT 9;
|
||||
a
|
||||
2071
|
||||
2061
|
||||
2051
|
||||
2041
|
||||
2031
|
||||
2021
|
||||
2011
|
||||
2001
|
||||
1991
|
||||
set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
|
||||
DROP TABLE t1;
|
||||
# End of 10.1 tests
|
||||
set @@global.histogram_size=@save_histogram_size;
|
||||
|
|
|
@ -1125,6 +1125,87 @@ drop table t1;
|
|||
set use_stat_tables= @save_use_stat_tables;
|
||||
set @@histogram_size=@save_histogram_size;
|
||||
set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-20576: failing assertion DBUG_ASSERT(0.0 < sel && sel <= 1)
|
||||
--echo #
|
||||
|
||||
set @@optimizer_use_condition_selectivity=2;
|
||||
|
||||
set names utf8;
|
||||
|
||||
CREATE DATABASE world;
|
||||
|
||||
use world;
|
||||
|
||||
--source include/world_schema.inc
|
||||
|
||||
--disable_query_log
|
||||
--disable_result_log
|
||||
--disable_warnings
|
||||
--source include/world.inc
|
||||
--enable_warnings
|
||||
--enable_result_log
|
||||
--enable_query_log
|
||||
|
||||
CREATE INDEX Name ON City(Name);
|
||||
CREATE INDEX CountryPopulation ON City(Country,Population);
|
||||
CREATE INDEX CountryName ON City(Country,Name);
|
||||
|
||||
--disable_query_log
|
||||
--disable_result_log
|
||||
--disable_warnings
|
||||
ANALYZE TABLE City;
|
||||
--enable_warnings
|
||||
--enable_result_log
|
||||
--enable_query_log
|
||||
|
||||
set @@optimizer_use_condition_selectivity=2;
|
||||
|
||||
EXPLAIN
|
||||
SELECT * FROM City WHERE Country='FIN';
|
||||
|
||||
DROP DATABASE world;
|
||||
|
||||
use test;
|
||||
|
||||
CREATE TABLE t1 (
|
||||
a INT,
|
||||
b INT NOT NULL,
|
||||
c char(100),
|
||||
KEY (b, c),
|
||||
KEY (b, a, c)
|
||||
) ENGINE=MyISAM
|
||||
DEFAULT CHARSET = utf8;
|
||||
|
||||
INSERT INTO t1 VALUES
|
||||
(1, 1, 1),
|
||||
(2, 2, 2),
|
||||
(3, 3, 3),
|
||||
(4, 4, 4),
|
||||
(5, 5, 5),
|
||||
(6, 6, 6),
|
||||
(7, 7, 7),
|
||||
(8, 8, 8),
|
||||
(9, 9, 9);
|
||||
|
||||
INSERT INTO t1 SELECT a + 10, b, c FROM t1;
|
||||
INSERT INTO t1 SELECT a + 20, b, c FROM t1;
|
||||
INSERT INTO t1 SELECT a + 40, b, c FROM t1;
|
||||
INSERT INTO t1 SELECT a + 80, b, c FROM t1;
|
||||
INSERT INTO t1 SELECT a + 160, b, c FROM t1;
|
||||
INSERT INTO t1 SELECT a + 320, b, c FROM t1;
|
||||
INSERT INTO t1 SELECT a + 640, b, c FROM t1;
|
||||
INSERT INTO t1 SELECT a + 1280, b, c FROM t1 LIMIT 80;
|
||||
|
||||
EXPLAIN
|
||||
SELECT a FROM t1 WHERE b = 1 ORDER BY c DESC LIMIT 9;
|
||||
SELECT a FROM t1 WHERE b = 1 ORDER BY c DESC LIMIT 9;
|
||||
|
||||
set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo # End of 10.1 tests
|
||||
|
||||
#
|
||||
|
|
|
@ -1678,6 +1678,91 @@ drop table t1;
|
|||
set use_stat_tables= @save_use_stat_tables;
|
||||
set @@histogram_size=@save_histogram_size;
|
||||
set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
|
||||
#
|
||||
# MDEV-20576: failing assertion DBUG_ASSERT(0.0 < sel && sel <= 1)
|
||||
#
|
||||
set @@optimizer_use_condition_selectivity=2;
|
||||
set names utf8;
|
||||
CREATE DATABASE world;
|
||||
use world;
|
||||
CREATE TABLE Country (
|
||||
Code char(3) NOT NULL default '',
|
||||
Name char(52) NOT NULL default '',
|
||||
SurfaceArea float(10,2) NOT NULL default '0.00',
|
||||
Population int(11) NOT NULL default '0',
|
||||
Capital int(11) default NULL,
|
||||
PRIMARY KEY (Code),
|
||||
UNIQUE INDEX (Name)
|
||||
);
|
||||
CREATE TABLE City (
|
||||
ID int(11) NOT NULL auto_increment,
|
||||
Name char(35) NOT NULL default '',
|
||||
Country char(3) NOT NULL default '',
|
||||
Population int(11) NOT NULL default '0',
|
||||
PRIMARY KEY (ID),
|
||||
INDEX (Population),
|
||||
INDEX (Country)
|
||||
);
|
||||
CREATE TABLE CountryLanguage (
|
||||
Country char(3) NOT NULL default '',
|
||||
Language char(30) NOT NULL default '',
|
||||
Percentage float(3,1) NOT NULL default '0.0',
|
||||
PRIMARY KEY (Country, Language),
|
||||
INDEX (Percentage)
|
||||
);
|
||||
CREATE INDEX Name ON City(Name);
|
||||
CREATE INDEX CountryPopulation ON City(Country,Population);
|
||||
CREATE INDEX CountryName ON City(Country,Name);
|
||||
set @@optimizer_use_condition_selectivity=2;
|
||||
EXPLAIN
|
||||
SELECT * FROM City WHERE Country='FIN';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE City ref Country,CountryPopulation,CountryName Country 3 const 7 Using index condition
|
||||
DROP DATABASE world;
|
||||
use test;
|
||||
CREATE TABLE t1 (
|
||||
a INT,
|
||||
b INT NOT NULL,
|
||||
c char(100),
|
||||
KEY (b, c),
|
||||
KEY (b, a, c)
|
||||
) ENGINE=MyISAM
|
||||
DEFAULT CHARSET = utf8;
|
||||
INSERT INTO t1 VALUES
|
||||
(1, 1, 1),
|
||||
(2, 2, 2),
|
||||
(3, 3, 3),
|
||||
(4, 4, 4),
|
||||
(5, 5, 5),
|
||||
(6, 6, 6),
|
||||
(7, 7, 7),
|
||||
(8, 8, 8),
|
||||
(9, 9, 9);
|
||||
INSERT INTO t1 SELECT a + 10, b, c FROM t1;
|
||||
INSERT INTO t1 SELECT a + 20, b, c FROM t1;
|
||||
INSERT INTO t1 SELECT a + 40, b, c FROM t1;
|
||||
INSERT INTO t1 SELECT a + 80, b, c FROM t1;
|
||||
INSERT INTO t1 SELECT a + 160, b, c FROM t1;
|
||||
INSERT INTO t1 SELECT a + 320, b, c FROM t1;
|
||||
INSERT INTO t1 SELECT a + 640, b, c FROM t1;
|
||||
INSERT INTO t1 SELECT a + 1280, b, c FROM t1 LIMIT 80;
|
||||
EXPLAIN
|
||||
SELECT a FROM t1 WHERE b = 1 ORDER BY c DESC LIMIT 9;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range b,b_2 b 4 NULL 226 Using where
|
||||
SELECT a FROM t1 WHERE b = 1 ORDER BY c DESC LIMIT 9;
|
||||
a
|
||||
2071
|
||||
2061
|
||||
2051
|
||||
2041
|
||||
2031
|
||||
2021
|
||||
2011
|
||||
2001
|
||||
1991
|
||||
set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
|
||||
DROP TABLE t1;
|
||||
# End of 10.1 tests
|
||||
set @@global.histogram_size=@save_histogram_size;
|
||||
set optimizer_switch=@save_optimizer_switch_for_selectivity_test;
|
||||
|
|
|
@ -800,7 +800,38 @@ col1
|
|||
2004-01-01
|
||||
2004-02-29
|
||||
0000-10-31
|
||||
set @@sql_mode= @save_sql_mode;
|
||||
set @@use_stat_tables=@save_use_stat_tables;
|
||||
set @@histogram_size= @save_histogram_size;
|
||||
set @@histogram_type=@save_histogram_type;
|
||||
set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
|
||||
drop table t1;
|
||||
#
|
||||
# MDEV-20589: Server still crashes in Field::set_warning_truncated_wrong_value
|
||||
#
|
||||
set names utf8;
|
||||
create table t1 ( a varchar(255) character set utf8);
|
||||
insert into t1 values (REPEAT('ӥ',255)), (REPEAT('ç',255));
|
||||
set use_stat_tables='preferably';
|
||||
analyze table t1 persistent for all;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze status Engine-independent statistics collected
|
||||
test.t1 analyze status OK
|
||||
set @save_sql_mode= @@sql_mode;
|
||||
set sql_mode='ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';
|
||||
update mysql.column_stats set min_value= REPEAT('ӥ',256) where db_name='test' and table_name='t1';
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'min_value' at row 1
|
||||
set @@sql_mode= @save_sql_mode;
|
||||
select length(a) from t1 where a=REPEAT('ӥ',255);
|
||||
length(a)
|
||||
510
|
||||
set names latin1;
|
||||
set @@use_stat_tables=@save_use_stat_tables;
|
||||
drop table t1;
|
||||
# please keep this at the last
|
||||
set @@global.histogram_size=@save_histogram_size;
|
||||
# Start of 10.4 tests
|
||||
set histogram_size=0;
|
||||
#
|
||||
# MDEV-17255: New optimizer defaults and ANALYZE TABLE
|
||||
|
@ -858,8 +889,4 @@ id select_type table type possible_keys key key_len ref rows r_rows filtered r_f
|
|||
1 SIMPLE t1 ALL NULL NULL NULL NULL 10 10.00 2.78 10.00 Using where
|
||||
drop table t1;
|
||||
set @@global.histogram_size=@save_histogram_size;
|
||||
set @@histogram_size= @save_histogram_size;
|
||||
set @@histogram_type=@save_histogram_type;
|
||||
set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
|
||||
set @@sql_mode= @save_sql_mode;
|
||||
set @@use_stat_tables=@save_use_stat_tables;
|
||||
# End of 10.4 tests
|
||||
|
|
|
@ -544,7 +544,40 @@ analyze table t1;
|
|||
update mysql.column_stats set min_value='2004-0-31123' where db_name='test' and table_name='t1';
|
||||
select min_value from mysql.column_stats where db_name='test' and table_name='t1';
|
||||
select * from t1;
|
||||
set @@sql_mode= @save_sql_mode;
|
||||
set @@use_stat_tables=@save_use_stat_tables;
|
||||
set @@histogram_size= @save_histogram_size;
|
||||
set @@histogram_type=@save_histogram_type;
|
||||
set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-20589: Server still crashes in Field::set_warning_truncated_wrong_value
|
||||
--echo #
|
||||
|
||||
set names utf8;
|
||||
create table t1 ( a varchar(255) character set utf8);
|
||||
insert into t1 values (REPEAT('ӥ',255)), (REPEAT('ç',255));
|
||||
|
||||
set use_stat_tables='preferably';
|
||||
analyze table t1 persistent for all;
|
||||
|
||||
set @save_sql_mode= @@sql_mode;
|
||||
set sql_mode='ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';
|
||||
update mysql.column_stats set min_value= REPEAT('ӥ',256) where db_name='test' and table_name='t1';
|
||||
set @@sql_mode= @save_sql_mode;
|
||||
|
||||
select length(a) from t1 where a=REPEAT('ӥ',255);
|
||||
|
||||
set names latin1;
|
||||
set @@use_stat_tables=@save_use_stat_tables;
|
||||
drop table t1;
|
||||
|
||||
--echo # please keep this at the last
|
||||
set @@global.histogram_size=@save_histogram_size;
|
||||
|
||||
--echo # Start of 10.4 tests
|
||||
|
||||
set histogram_size=0;
|
||||
|
||||
--echo #
|
||||
|
@ -590,9 +623,5 @@ select * from t1 where a=1 and b=3;
|
|||
drop table t1;
|
||||
|
||||
set @@global.histogram_size=@save_histogram_size;
|
||||
set @@histogram_size= @save_histogram_size;
|
||||
set @@histogram_type=@save_histogram_type;
|
||||
set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
|
||||
set @@sql_mode= @save_sql_mode;
|
||||
set @@use_stat_tables=@save_use_stat_tables;
|
||||
|
||||
--echo # End of 10.4 tests
|
||||
|
|
|
@ -832,7 +832,38 @@ col1
|
|||
2004-01-01
|
||||
2004-02-29
|
||||
0000-10-31
|
||||
set @@sql_mode= @save_sql_mode;
|
||||
set @@use_stat_tables=@save_use_stat_tables;
|
||||
set @@histogram_size= @save_histogram_size;
|
||||
set @@histogram_type=@save_histogram_type;
|
||||
set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
|
||||
drop table t1;
|
||||
#
|
||||
# MDEV-20589: Server still crashes in Field::set_warning_truncated_wrong_value
|
||||
#
|
||||
set names utf8;
|
||||
create table t1 ( a varchar(255) character set utf8);
|
||||
insert into t1 values (REPEAT('ӥ',255)), (REPEAT('ç',255));
|
||||
set use_stat_tables='preferably';
|
||||
analyze table t1 persistent for all;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze status Engine-independent statistics collected
|
||||
test.t1 analyze status OK
|
||||
set @save_sql_mode= @@sql_mode;
|
||||
set sql_mode='ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';
|
||||
update mysql.column_stats set min_value= REPEAT('ӥ',256) where db_name='test' and table_name='t1';
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'min_value' at row 1
|
||||
set @@sql_mode= @save_sql_mode;
|
||||
select length(a) from t1 where a=REPEAT('ӥ',255);
|
||||
length(a)
|
||||
510
|
||||
set names latin1;
|
||||
set @@use_stat_tables=@save_use_stat_tables;
|
||||
drop table t1;
|
||||
# please keep this at the last
|
||||
set @@global.histogram_size=@save_histogram_size;
|
||||
# Start of 10.4 tests
|
||||
set histogram_size=0;
|
||||
#
|
||||
# MDEV-17255: New optimizer defaults and ANALYZE TABLE
|
||||
|
@ -890,11 +921,7 @@ id select_type table type possible_keys key key_len ref rows r_rows filtered r_f
|
|||
1 SIMPLE t1 ALL NULL NULL NULL NULL 10 10.00 2.78 10.00 Using where
|
||||
drop table t1;
|
||||
set @@global.histogram_size=@save_histogram_size;
|
||||
set @@histogram_size= @save_histogram_size;
|
||||
set @@histogram_type=@save_histogram_type;
|
||||
set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
|
||||
set @@sql_mode= @save_sql_mode;
|
||||
set @@use_stat_tables=@save_use_stat_tables;
|
||||
# End of 10.4 tests
|
||||
set global innodb_stats_persistent= @innodb_stats_persistent_save;
|
||||
set global innodb_stats_persistent_sample_pages=
|
||||
@innodb_stats_persistent_sample_pages_save;
|
||||
|
|
|
@ -12,9 +12,9 @@ ROW(1, 7) IN (SELECT id, id1 FROM t1 WHERE id1= 8)
|
|||
0
|
||||
DROP TABLE t1;
|
||||
EXECUTE IMMEDIATE 'SELECT ?' USING (1 IN (SELECT * FROM t1));
|
||||
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 'SELECT * FROM t1))' at line 1
|
||||
ERROR 42000: EXECUTE..USING does not support subqueries or stored functions
|
||||
EXECUTE IMMEDIATE 'SELECT ?' USING (SELECT * FROM t1);
|
||||
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 'SELECT * FROM t1)' at line 1
|
||||
ERROR 42000: EXECUTE..USING does not support subqueries or stored functions
|
||||
CREATE TABLE t1 (id INT);
|
||||
INSERT INTO t1 VALUES (10);
|
||||
CREATE PROCEDURE p1(a INT) BEGIN END;
|
||||
|
@ -45,21 +45,21 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
|
|||
SIGNAL SQLSTATE '01000';
|
||||
END' at line 3
|
||||
PREPARE stmt FROM (1 IN (SELECT * FROM t1));
|
||||
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 'SELECT * FROM t1))' at line 1
|
||||
ERROR 42000: PREPARE..FROM does not support subqueries or stored functions
|
||||
PREPARE stmt FROM EXISTS (SELECT * FROM t1);
|
||||
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 '(SELECT * FROM t1)' at line 1
|
||||
ERROR 42000: PREPARE..FROM does not support subqueries or stored functions
|
||||
EXECUTE IMMEDIATE (1 IN (SELECT * FROM t1));
|
||||
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 'SELECT * FROM t1))' at line 1
|
||||
ERROR 42000: EXECUTE IMMEDIATE does not support subqueries or stored functions
|
||||
EXECUTE IMMEDIATE EXISTS (SELECT * FROM t1);
|
||||
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 '(SELECT * FROM t1)' at line 1
|
||||
ERROR 42000: EXECUTE IMMEDIATE does not support subqueries or stored functions
|
||||
GET DIAGNOSTICS CONDITION (1 IN (SELECT * FROM t1)) @errno=MYSQL_ERRNO;
|
||||
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 IN (SELECT * FROM t1)) @errno=MYSQL_ERRNO' at line 1
|
||||
GET DIAGNOSTICS CONDITION EXISTS (SELECT * FROM t1) @errno=MYSQL_ERRNO;
|
||||
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 'EXISTS (SELECT * FROM t1) @errno=MYSQL_ERRNO' at line 1
|
||||
PURGE BINARY LOGS BEFORE (1 IN (SELECT * FROM t1));
|
||||
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 'SELECT * FROM t1))' at line 1
|
||||
ERROR 42000: PURGE..BEFORE does not support subqueries or stored functions
|
||||
PURGE BINARY LOGS BEFORE EXISTS (SELECT * FROM t1);
|
||||
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 '(SELECT * FROM t1)' at line 1
|
||||
ERROR 42000: PURGE..BEFORE does not support subqueries or stored functions
|
||||
CREATE TABLE t1 (a INT);
|
||||
INSERT INTO t1 VALUES (1),(2),(3);
|
||||
DO 1 IN (SELECT * FROM t1);
|
||||
|
|
|
@ -15,9 +15,9 @@ SELECT ROW(1,7) IN (SELECT id, id1 FROM t1 WHERE id1= 8);
|
|||
EXECUTE IMMEDIATE 'SELECT ROW(1, 7) IN (SELECT id, id1 FROM t1 WHERE id1= 8)';
|
||||
DROP TABLE t1;
|
||||
|
||||
--error ER_PARSE_ERROR
|
||||
--error ER_SUBQUERIES_NOT_SUPPORTED
|
||||
EXECUTE IMMEDIATE 'SELECT ?' USING (1 IN (SELECT * FROM t1));
|
||||
--error ER_PARSE_ERROR
|
||||
--error ER_SUBQUERIES_NOT_SUPPORTED
|
||||
EXECUTE IMMEDIATE 'SELECT ?' USING (SELECT * FROM t1);
|
||||
|
||||
|
||||
|
@ -52,14 +52,14 @@ $$
|
|||
DELIMITER ;$$
|
||||
|
||||
|
||||
--error ER_PARSE_ERROR
|
||||
--error ER_SUBQUERIES_NOT_SUPPORTED
|
||||
PREPARE stmt FROM (1 IN (SELECT * FROM t1));
|
||||
--error ER_PARSE_ERROR
|
||||
--error ER_SUBQUERIES_NOT_SUPPORTED
|
||||
PREPARE stmt FROM EXISTS (SELECT * FROM t1);
|
||||
|
||||
--error ER_PARSE_ERROR
|
||||
--error ER_SUBQUERIES_NOT_SUPPORTED
|
||||
EXECUTE IMMEDIATE (1 IN (SELECT * FROM t1));
|
||||
--error ER_PARSE_ERROR
|
||||
--error ER_SUBQUERIES_NOT_SUPPORTED
|
||||
EXECUTE IMMEDIATE EXISTS (SELECT * FROM t1);
|
||||
|
||||
--error ER_PARSE_ERROR
|
||||
|
@ -67,9 +67,9 @@ GET DIAGNOSTICS CONDITION (1 IN (SELECT * FROM t1)) @errno=MYSQL_ERRNO;
|
|||
--error ER_PARSE_ERROR
|
||||
GET DIAGNOSTICS CONDITION EXISTS (SELECT * FROM t1) @errno=MYSQL_ERRNO;
|
||||
|
||||
--error ER_PARSE_ERROR
|
||||
--error ER_SUBQUERIES_NOT_SUPPORTED
|
||||
PURGE BINARY LOGS BEFORE (1 IN (SELECT * FROM t1));
|
||||
--error ER_PARSE_ERROR
|
||||
--error ER_SUBQUERIES_NOT_SUPPORTED
|
||||
PURGE BINARY LOGS BEFORE EXISTS (SELECT * FROM t1);
|
||||
|
||||
CREATE TABLE t1 (a INT);
|
||||
|
|
|
@ -83,7 +83,7 @@ SELECT 1 FROM (SELECT 1 as a) b WHERE 1 IN (SELECT (SELECT a));
|
|||
select (SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE(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 'PROCEDURE ANALYSE(1))' at line 1
|
||||
SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE((SELECT 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 'SELECT 1))' at line 1
|
||||
ERROR 42000: PROCEDURE does not support subqueries or stored functions
|
||||
SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NULL;
|
||||
ERROR 42S22: Unknown column 'a' in 'field list'
|
||||
SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NOT NULL;
|
||||
|
@ -1133,7 +1133,7 @@ ERROR 42S02: Table 'test.t1' doesn't exist
|
|||
CREATE TABLE t1 (a int, KEY(a));
|
||||
HANDLER t1 OPEN;
|
||||
HANDLER t1 READ a=((SELECT 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 'SELECT 1))' at line 1
|
||||
ERROR 42000: HANDLER..READ does not support subqueries or stored functions
|
||||
HANDLER t1 CLOSE;
|
||||
drop table t1;
|
||||
create table t1 (a int);
|
||||
|
|
|
@ -56,7 +56,7 @@ SELECT 1 IN (SELECT 1);
|
|||
SELECT 1 FROM (SELECT 1 as a) b WHERE 1 IN (SELECT (SELECT a));
|
||||
-- error ER_PARSE_ERROR
|
||||
select (SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE(1));
|
||||
-- error ER_PARSE_ERROR
|
||||
-- error ER_SUBQUERIES_NOT_SUPPORTED
|
||||
SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE((SELECT 1));
|
||||
-- error ER_BAD_FIELD_ERROR
|
||||
SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NULL;
|
||||
|
@ -623,7 +623,7 @@ set @a:=(SELECT a from t1);
|
|||
|
||||
CREATE TABLE t1 (a int, KEY(a));
|
||||
HANDLER t1 OPEN;
|
||||
-- error ER_PARSE_ERROR
|
||||
-- error ER_SUBQUERIES_NOT_SUPPORTED
|
||||
HANDLER t1 READ a=((SELECT 1));
|
||||
HANDLER t1 CLOSE;
|
||||
drop table t1;
|
||||
|
|
|
@ -87,7 +87,7 @@ SELECT 1 FROM (SELECT 1 as a) b WHERE 1 IN (SELECT (SELECT a));
|
|||
select (SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE(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 'PROCEDURE ANALYSE(1))' at line 1
|
||||
SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE((SELECT 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 'SELECT 1))' at line 1
|
||||
ERROR 42000: PROCEDURE does not support subqueries or stored functions
|
||||
SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NULL;
|
||||
ERROR 42S22: Unknown column 'a' in 'field list'
|
||||
SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NOT NULL;
|
||||
|
@ -1137,7 +1137,7 @@ ERROR 42S02: Table 'test.t1' doesn't exist
|
|||
CREATE TABLE t1 (a int, KEY(a));
|
||||
HANDLER t1 OPEN;
|
||||
HANDLER t1 READ a=((SELECT 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 'SELECT 1))' at line 1
|
||||
ERROR 42000: HANDLER..READ does not support subqueries or stored functions
|
||||
HANDLER t1 CLOSE;
|
||||
drop table t1;
|
||||
create table t1 (a int);
|
||||
|
|
|
@ -90,7 +90,7 @@ SELECT 1 FROM (SELECT 1 as a) b WHERE 1 IN (SELECT (SELECT a));
|
|||
select (SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE(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 'PROCEDURE ANALYSE(1))' at line 1
|
||||
SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE((SELECT 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 'SELECT 1))' at line 1
|
||||
ERROR 42000: PROCEDURE does not support subqueries or stored functions
|
||||
SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NULL;
|
||||
ERROR 42S22: Unknown column 'a' in 'field list'
|
||||
SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NOT NULL;
|
||||
|
@ -1140,7 +1140,7 @@ ERROR 42S02: Table 'test.t1' doesn't exist
|
|||
CREATE TABLE t1 (a int, KEY(a));
|
||||
HANDLER t1 OPEN;
|
||||
HANDLER t1 READ a=((SELECT 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 'SELECT 1))' at line 1
|
||||
ERROR 42000: HANDLER..READ does not support subqueries or stored functions
|
||||
HANDLER t1 CLOSE;
|
||||
drop table t1;
|
||||
create table t1 (a int);
|
||||
|
|
|
@ -86,7 +86,7 @@ SELECT 1 FROM (SELECT 1 as a) b WHERE 1 IN (SELECT (SELECT a));
|
|||
select (SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE(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 'PROCEDURE ANALYSE(1))' at line 1
|
||||
SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE((SELECT 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 'SELECT 1))' at line 1
|
||||
ERROR 42000: PROCEDURE does not support subqueries or stored functions
|
||||
SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NULL;
|
||||
ERROR 42S22: Unknown column 'a' in 'field list'
|
||||
SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NOT NULL;
|
||||
|
@ -1136,7 +1136,7 @@ ERROR 42S02: Table 'test.t1' doesn't exist
|
|||
CREATE TABLE t1 (a int, KEY(a));
|
||||
HANDLER t1 OPEN;
|
||||
HANDLER t1 READ a=((SELECT 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 'SELECT 1))' at line 1
|
||||
ERROR 42000: HANDLER..READ does not support subqueries or stored functions
|
||||
HANDLER t1 CLOSE;
|
||||
drop table t1;
|
||||
create table t1 (a int);
|
||||
|
|
|
@ -89,7 +89,7 @@ SELECT 1 FROM (SELECT 1 as a) b WHERE 1 IN (SELECT (SELECT a));
|
|||
select (SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE(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 'PROCEDURE ANALYSE(1))' at line 1
|
||||
SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE((SELECT 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 'SELECT 1))' at line 1
|
||||
ERROR 42000: PROCEDURE does not support subqueries or stored functions
|
||||
SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NULL;
|
||||
ERROR 42S22: Unknown column 'a' in 'field list'
|
||||
SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NOT NULL;
|
||||
|
@ -1139,7 +1139,7 @@ ERROR 42S02: Table 'test.t1' doesn't exist
|
|||
CREATE TABLE t1 (a int, KEY(a));
|
||||
HANDLER t1 OPEN;
|
||||
HANDLER t1 READ a=((SELECT 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 'SELECT 1))' at line 1
|
||||
ERROR 42000: HANDLER..READ does not support subqueries or stored functions
|
||||
HANDLER t1 CLOSE;
|
||||
drop table t1;
|
||||
create table t1 (a int);
|
||||
|
|
|
@ -86,7 +86,7 @@ SELECT 1 FROM (SELECT 1 as a) b WHERE 1 IN (SELECT (SELECT a));
|
|||
select (SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE(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 'PROCEDURE ANALYSE(1))' at line 1
|
||||
SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE((SELECT 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 'SELECT 1))' at line 1
|
||||
ERROR 42000: PROCEDURE does not support subqueries or stored functions
|
||||
SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NULL;
|
||||
ERROR 42S22: Unknown column 'a' in 'field list'
|
||||
SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NOT NULL;
|
||||
|
@ -1136,7 +1136,7 @@ ERROR 42S02: Table 'test.t1' doesn't exist
|
|||
CREATE TABLE t1 (a int, KEY(a));
|
||||
HANDLER t1 OPEN;
|
||||
HANDLER t1 READ a=((SELECT 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 'SELECT 1))' at line 1
|
||||
ERROR 42000: HANDLER..READ does not support subqueries or stored functions
|
||||
HANDLER t1 CLOSE;
|
||||
drop table t1;
|
||||
create table t1 (a int);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
purge master logs before (select adddate(current_timestamp(), interval -4 day));
|
||||
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 'select adddate(current_timestamp(), interval -4 day))' at line 1
|
||||
ERROR 42000: PURGE..BEFORE does not support subqueries or stored functions
|
||||
purge master logs before adddate(current_timestamp(), interval -4 day);
|
||||
drop table if exists t1;
|
||||
create table t1(a int,b int,key(a),key(b));
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
# BUG#10308: purge log with subselect
|
||||
# Bug#28553: mysqld crash in "purge master log before(select time from information_schema)"
|
||||
#
|
||||
--error 1064
|
||||
--error ER_SUBQUERIES_NOT_SUPPORTED
|
||||
purge master logs before (select adddate(current_timestamp(), interval -4 day));
|
||||
purge master logs before adddate(current_timestamp(), interval -4 day);
|
||||
|
||||
|
|
|
@ -124,14 +124,14 @@ show create table servers;
|
|||
Table Create Table
|
||||
servers CREATE TABLE `servers` (
|
||||
`Server_name` char(64) NOT NULL DEFAULT '',
|
||||
`Host` char(64) NOT NULL DEFAULT '',
|
||||
`Host` varchar(2048) NOT NULL DEFAULT '',
|
||||
`Db` char(64) NOT NULL DEFAULT '',
|
||||
`Username` char(80) NOT NULL DEFAULT '',
|
||||
`Password` char(64) NOT NULL DEFAULT '',
|
||||
`Port` int(4) NOT NULL DEFAULT 0,
|
||||
`Socket` char(64) NOT NULL DEFAULT '',
|
||||
`Wrapper` char(64) NOT NULL DEFAULT '',
|
||||
`Owner` char(64) NOT NULL DEFAULT '',
|
||||
`Owner` varchar(512) NOT NULL DEFAULT '',
|
||||
PRIMARY KEY (`Server_name`)
|
||||
) ENGINE=Aria DEFAULT CHARSET=utf8 PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='MySQL Foreign Servers table'
|
||||
show create table proc;
|
||||
|
|
|
@ -162,14 +162,14 @@ show create table servers;
|
|||
Table Create Table
|
||||
servers CREATE TABLE `servers` (
|
||||
`Server_name` char(64) NOT NULL DEFAULT '',
|
||||
`Host` char(64) NOT NULL DEFAULT '',
|
||||
`Host` varchar(2048) NOT NULL DEFAULT '',
|
||||
`Db` char(64) NOT NULL DEFAULT '',
|
||||
`Username` char(80) NOT NULL DEFAULT '',
|
||||
`Password` char(64) NOT NULL DEFAULT '',
|
||||
`Port` int(4) NOT NULL DEFAULT 0,
|
||||
`Socket` char(64) NOT NULL DEFAULT '',
|
||||
`Wrapper` char(64) NOT NULL DEFAULT '',
|
||||
`Owner` char(64) NOT NULL DEFAULT '',
|
||||
`Owner` varchar(512) NOT NULL DEFAULT '',
|
||||
PRIMARY KEY (`Server_name`)
|
||||
) ENGINE=Aria DEFAULT CHARSET=utf8 PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='MySQL Foreign Servers table'
|
||||
show create table proc;
|
||||
|
|
|
@ -2586,3 +2586,16 @@ create view v1 as
|
|||
union
|
||||
( values (5), (7), (1), (3), (4) order by 2 limit 2 );
|
||||
ERROR 42S22: Unknown column '2' in 'order clause'
|
||||
#
|
||||
# MDEV-20229: view defined as select using
|
||||
# CTE with named columns defined as TVC
|
||||
#
|
||||
create view v1 as with t(a) as (values (2), (1)) select a from t;
|
||||
show create view v1;
|
||||
View Create View character_set_client collation_connection
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS with t(a) as (values (2),(1))select `t`.`a` AS `a` from `t` latin1 latin1_swedish_ci
|
||||
select * from v1;
|
||||
a
|
||||
2
|
||||
1
|
||||
drop view v1;
|
||||
|
|
|
@ -1316,3 +1316,13 @@ create view v1 as
|
|||
( values (5), (7), (1), (3), (4) limit 2 offset 1 )
|
||||
union
|
||||
( values (5), (7), (1), (3), (4) order by 2 limit 2 );
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-20229: view defined as select using
|
||||
--echo # CTE with named columns defined as TVC
|
||||
--echo #
|
||||
|
||||
create view v1 as with t(a) as (values (2), (1)) select a from t;
|
||||
show create view v1;
|
||||
select * from v1;
|
||||
drop view v1;
|
||||
|
|
|
@ -47,7 +47,7 @@ EXECUTE stmt USING @a, @b;
|
|||
#
|
||||
PREPARE stmt FROM 'SELECT :1 FROM DUAL';
|
||||
EXECUTE stmt USING (SELECT 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 'SELECT 1)' at line 1
|
||||
ERROR 42000: EXECUTE..USING does not support subqueries or stored functions
|
||||
DEALLOCATE PREPARE stmt;
|
||||
CREATE FUNCTION f1() RETURN VARCHAR
|
||||
AS
|
||||
|
@ -155,7 +155,7 @@ DROP TABLE t1;
|
|||
# Testing disallowed expressions in USING
|
||||
#
|
||||
EXECUTE IMMEDIATE 'SELECT :1 FROM DUAL' USING (SELECT 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 'SELECT 1)' at line 1
|
||||
ERROR 42000: EXECUTE..USING does not support subqueries or stored functions
|
||||
CREATE FUNCTION f1() RETURN VARCHAR
|
||||
AS
|
||||
BEGIN
|
||||
|
@ -182,9 +182,9 @@ ERROR HY000: Illegal mix of collations (latin1_swedish_ci,COERCIBLE) and (latin2
|
|||
PREPARE stmt FROM _latin1'SELECT 1 AS c FROM ' || _latin2 'DUAL';
|
||||
ERROR HY000: Illegal mix of collations (latin1_swedish_ci,COERCIBLE) and (latin2_general_ci,COERCIBLE) for operation 'concat_operator_oracle'
|
||||
EXECUTE IMMEDIATE (SELECT 'SELECT 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 'SELECT 'SELECT 1')' at line 1
|
||||
ERROR 42000: EXECUTE IMMEDIATE does not support subqueries or stored functions
|
||||
PREPARE stmt FROM (SELECT 'SELECT 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 'SELECT 'SELECT 1')' at line 1
|
||||
ERROR 42000: PREPARE..FROM does not support subqueries or stored functions
|
||||
EXECUTE IMMEDIATE a;
|
||||
ERROR 42S22: Unknown column 'a' in 'field list'
|
||||
PREPARE stmt FROM a;
|
||||
|
|
|
@ -13,9 +13,9 @@ ROW(1, 7) IN (SELECT id, id1 FROM t1 WHERE id1= 8)
|
|||
0
|
||||
DROP TABLE t1;
|
||||
EXECUTE IMMEDIATE 'SELECT ?' USING (1 IN (SELECT * FROM t1));
|
||||
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 'SELECT * FROM t1))' at line 1
|
||||
ERROR 42000: EXECUTE..USING does not support subqueries or stored functions
|
||||
EXECUTE IMMEDIATE 'SELECT ?' USING (SELECT * FROM t1);
|
||||
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 'SELECT * FROM t1)' at line 1
|
||||
ERROR 42000: EXECUTE..USING does not support subqueries or stored functions
|
||||
CREATE TABLE t1 (id INT);
|
||||
INSERT INTO t1 VALUES (10);
|
||||
CREATE PROCEDURE p1(a INT) AS BEGIN NULL; END;
|
||||
|
@ -47,21 +47,21 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
|
|||
SIGNAL SQLSTATE '01000';
|
||||
END' at line 3
|
||||
PREPARE stmt FROM (1 IN (SELECT * FROM t1));
|
||||
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 'SELECT * FROM t1))' at line 1
|
||||
ERROR 42000: PREPARE..FROM does not support subqueries or stored functions
|
||||
PREPARE stmt FROM EXISTS (SELECT * FROM t1);
|
||||
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 '(SELECT * FROM t1)' at line 1
|
||||
ERROR 42000: PREPARE..FROM does not support subqueries or stored functions
|
||||
EXECUTE IMMEDIATE (1 IN (SELECT * FROM t1));
|
||||
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 'SELECT * FROM t1))' at line 1
|
||||
ERROR 42000: EXECUTE IMMEDIATE does not support subqueries or stored functions
|
||||
EXECUTE IMMEDIATE EXISTS (SELECT * FROM t1);
|
||||
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 '(SELECT * FROM t1)' at line 1
|
||||
ERROR 42000: EXECUTE IMMEDIATE does not support subqueries or stored functions
|
||||
GET DIAGNOSTICS CONDITION (1 IN (SELECT * FROM t1)) @errno=MYSQL_ERRNO;
|
||||
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 IN (SELECT * FROM t1)) @errno=MYSQL_ERRNO' at line 1
|
||||
GET DIAGNOSTICS CONDITION EXISTS (SELECT * FROM t1) @errno=MYSQL_ERRNO;
|
||||
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 'EXISTS (SELECT * FROM t1) @errno=MYSQL_ERRNO' at line 1
|
||||
PURGE BINARY LOGS BEFORE (1 IN (SELECT * FROM t1));
|
||||
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 'SELECT * FROM t1))' at line 1
|
||||
ERROR 42000: PURGE..BEFORE does not support subqueries or stored functions
|
||||
PURGE BINARY LOGS BEFORE EXISTS (SELECT * FROM t1);
|
||||
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 '(SELECT * FROM t1)' at line 1
|
||||
ERROR 42000: PURGE..BEFORE does not support subqueries or stored functions
|
||||
CREATE TABLE t1 (a INT);
|
||||
INSERT INTO t1 VALUES (1),(2),(3);
|
||||
DO 1 IN (SELECT * FROM t1);
|
||||
|
|
|
@ -33,7 +33,7 @@ EXECUTE stmt USING @a, @b;
|
|||
--echo #
|
||||
|
||||
PREPARE stmt FROM 'SELECT :1 FROM DUAL';
|
||||
--error ER_PARSE_ERROR
|
||||
--error ER_SUBQUERIES_NOT_SUPPORTED
|
||||
EXECUTE stmt USING (SELECT 1);
|
||||
DEALLOCATE PREPARE stmt;
|
||||
|
||||
|
@ -153,7 +153,7 @@ DROP TABLE t1;
|
|||
--echo # Testing disallowed expressions in USING
|
||||
--echo #
|
||||
|
||||
--error ER_PARSE_ERROR
|
||||
--error ER_SUBQUERIES_NOT_SUPPORTED
|
||||
EXECUTE IMMEDIATE 'SELECT :1 FROM DUAL' USING (SELECT 1);
|
||||
|
||||
DELIMITER $$;
|
||||
|
@ -189,9 +189,9 @@ EXECUTE IMMEDIATE _latin1'SELECT 1 AS c FROM ' || _latin2 'DUAL';
|
|||
--error ER_CANT_AGGREGATE_2COLLATIONS
|
||||
PREPARE stmt FROM _latin1'SELECT 1 AS c FROM ' || _latin2 'DUAL';
|
||||
|
||||
--error ER_PARSE_ERROR
|
||||
--error ER_SUBQUERIES_NOT_SUPPORTED
|
||||
EXECUTE IMMEDIATE (SELECT 'SELECT 1');
|
||||
--error ER_PARSE_ERROR
|
||||
--error ER_SUBQUERIES_NOT_SUPPORTED
|
||||
PREPARE stmt FROM (SELECT 'SELECT 1');
|
||||
|
||||
--error ER_BAD_FIELD_ERROR
|
||||
|
|
|
@ -17,9 +17,9 @@ SELECT ROW(1,7) IN (SELECT id, id1 FROM t1 WHERE id1= 8);
|
|||
EXECUTE IMMEDIATE 'SELECT ROW(1, 7) IN (SELECT id, id1 FROM t1 WHERE id1= 8)';
|
||||
DROP TABLE t1;
|
||||
|
||||
--error ER_PARSE_ERROR
|
||||
--error ER_SUBQUERIES_NOT_SUPPORTED
|
||||
EXECUTE IMMEDIATE 'SELECT ?' USING (1 IN (SELECT * FROM t1));
|
||||
--error ER_PARSE_ERROR
|
||||
--error ER_SUBQUERIES_NOT_SUPPORTED
|
||||
EXECUTE IMMEDIATE 'SELECT ?' USING (SELECT * FROM t1);
|
||||
|
||||
|
||||
|
@ -57,14 +57,14 @@ $$
|
|||
DELIMITER ;$$
|
||||
|
||||
|
||||
--error ER_PARSE_ERROR
|
||||
--error ER_SUBQUERIES_NOT_SUPPORTED
|
||||
PREPARE stmt FROM (1 IN (SELECT * FROM t1));
|
||||
--error ER_PARSE_ERROR
|
||||
--error ER_SUBQUERIES_NOT_SUPPORTED
|
||||
PREPARE stmt FROM EXISTS (SELECT * FROM t1);
|
||||
|
||||
--error ER_PARSE_ERROR
|
||||
--error ER_SUBQUERIES_NOT_SUPPORTED
|
||||
EXECUTE IMMEDIATE (1 IN (SELECT * FROM t1));
|
||||
--error ER_PARSE_ERROR
|
||||
--error ER_SUBQUERIES_NOT_SUPPORTED
|
||||
EXECUTE IMMEDIATE EXISTS (SELECT * FROM t1);
|
||||
|
||||
--error ER_PARSE_ERROR
|
||||
|
@ -72,9 +72,9 @@ GET DIAGNOSTICS CONDITION (1 IN (SELECT * FROM t1)) @errno=MYSQL_ERRNO;
|
|||
--error ER_PARSE_ERROR
|
||||
GET DIAGNOSTICS CONDITION EXISTS (SELECT * FROM t1) @errno=MYSQL_ERRNO;
|
||||
|
||||
--error ER_PARSE_ERROR
|
||||
--error ER_SUBQUERIES_NOT_SUPPORTED
|
||||
PURGE BINARY LOGS BEFORE (1 IN (SELECT * FROM t1));
|
||||
--error ER_PARSE_ERROR
|
||||
--error ER_SUBQUERIES_NOT_SUPPORTED
|
||||
PURGE BINARY LOGS BEFORE EXISTS (SELECT * FROM t1);
|
||||
|
||||
CREATE TABLE t1 (a INT);
|
||||
|
|
|
@ -12,4 +12,3 @@
|
|||
|
||||
innodb_scrub : MDEV-8139 scrubbing does not work reliably
|
||||
innodb_scrub_background : MDEV-8139 scrubbing does not work reliably
|
||||
innodb-redo-badkey : MDEV-13893/MDEV-12699 fix recovery of corrupted pages
|
||||
|
|
|
@ -6,7 +6,7 @@ call mtr.add_suppression("InnoDB: Unable to decompress .*.test.t1\\.ibd\\[page i
|
|||
call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed file read of tablespace test/t1 page \\[page id: space=[1-9][0-9]*, page number=[0-9]*\\]");
|
||||
call mtr.add_suppression("InnoDB: Plugin initialization aborted");
|
||||
call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed");
|
||||
# Restart mysqld --file-key-management-filename=keys2.txt
|
||||
# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
|
||||
# Wait max 10 min for key encryption threads to encrypt all spaces
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
create table t1(a int not null primary key auto_increment, c char(250), b blob, index(b(10))) engine=innodb row_format=compressed encrypted=yes encryption_key_id=4;
|
||||
|
@ -30,9 +30,9 @@ insert into t3 (c,b) values (repeat('secret9',20), repeat('secre10',6000));
|
|||
insert into t4 (c,b) values (repeat('secre11',20), repeat('secre12',6000));
|
||||
COMMIT;
|
||||
# Kill the server
|
||||
# restart
|
||||
# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
|
||||
# Kill the server
|
||||
# Restart mysqld --innodb-force-recovery=1
|
||||
# restart: --innodb-force-recovery=1
|
||||
# Kill the server
|
||||
# Restart mysqld --file-key-management-filename=keys2.txt
|
||||
# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
|
||||
drop table t1, t2,t3,t4;
|
||||
|
|
|
@ -12,7 +12,6 @@ call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed f
|
|||
call mtr.add_suppression("InnoDB: Plugin initialization aborted");
|
||||
call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed");
|
||||
|
||||
--echo # Restart mysqld --file-key-management-filename=keys2.txt
|
||||
-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
|
||||
-- source include/restart_mysqld.inc
|
||||
|
||||
|
@ -68,7 +67,6 @@ let $cleanup= drop table t1,t2,t3,t4;
|
|||
--let CLEANUP_IF_CHECKPOINT= $cleanup;
|
||||
--source ../../suite/innodb/include/no_checkpoint_end.inc
|
||||
|
||||
--echo # restart
|
||||
--error 1
|
||||
-- source include/start_mysqld.inc
|
||||
--source include/kill_mysqld.inc
|
||||
|
@ -77,14 +75,12 @@ let $cleanup= drop table t1,t2,t3,t4;
|
|||
# Now test with innodb-force-recovery=1 i.e. ignore corrupt pages
|
||||
#
|
||||
|
||||
--echo # Restart mysqld --innodb-force-recovery=1
|
||||
-- let $restart_parameters=--innodb-force-recovery=1
|
||||
--error 1
|
||||
-- source include/start_mysqld.inc
|
||||
|
||||
--source include/kill_mysqld.inc
|
||||
|
||||
--echo # Restart mysqld --file-key-management-filename=keys2.txt
|
||||
-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
|
||||
-- source include/start_mysqld.inc
|
||||
|
||||
|
|
|
@ -158,8 +158,8 @@ def mysql roles_mapping Host 1 '' NO char 60 180 NULL NULL NULL utf8 utf8_bin ch
|
|||
def mysql roles_mapping Role 3 '' NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) PRI select,insert,update,references NEVER NULL
|
||||
def mysql roles_mapping User 2 '' NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) PRI select,insert,update,references NEVER NULL
|
||||
def mysql servers Db 3 '' NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references NEVER NULL
|
||||
def mysql servers Host 2 '' NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references NEVER NULL
|
||||
def mysql servers Owner 9 '' NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references NEVER NULL
|
||||
def mysql servers Host 2 '' NO varchar 2048 6144 NULL NULL NULL utf8 utf8_general_ci varchar(2048) select,insert,update,references NEVER NULL
|
||||
def mysql servers Owner 9 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select,insert,update,references NEVER NULL
|
||||
def mysql servers Password 5 '' NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references NEVER NULL
|
||||
def mysql servers Port 6 0 NO int NULL NULL 10 0 NULL NULL NULL int(4) select,insert,update,references NEVER NULL
|
||||
def mysql servers Server_name 1 '' NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64) PRI select,insert,update,references NEVER NULL
|
||||
|
@ -485,14 +485,14 @@ NULL mysql proxies_priv Timestamp timestamp NULL NULL NULL NULL timestamp
|
|||
3.0000 mysql roles_mapping Role char 80 240 utf8 utf8_bin char(80)
|
||||
3.0000 mysql roles_mapping Admin_option enum 1 3 utf8 utf8_general_ci enum('N','Y')
|
||||
3.0000 mysql servers Server_name char 64 192 utf8 utf8_general_ci char(64)
|
||||
3.0000 mysql servers Host char 64 192 utf8 utf8_general_ci char(64)
|
||||
3.0000 mysql servers Host varchar 2048 6144 utf8 utf8_general_ci varchar(2048)
|
||||
3.0000 mysql servers Db char 64 192 utf8 utf8_general_ci char(64)
|
||||
3.0000 mysql servers Username char 80 240 utf8 utf8_general_ci char(80)
|
||||
3.0000 mysql servers Password char 64 192 utf8 utf8_general_ci char(64)
|
||||
NULL mysql servers Port int NULL NULL NULL NULL int(4)
|
||||
3.0000 mysql servers Socket char 64 192 utf8 utf8_general_ci char(64)
|
||||
3.0000 mysql servers Wrapper char 64 192 utf8 utf8_general_ci char(64)
|
||||
3.0000 mysql servers Owner char 64 192 utf8 utf8_general_ci char(64)
|
||||
3.0000 mysql servers Owner varchar 512 1536 utf8 utf8_general_ci varchar(512)
|
||||
NULL mysql slow_log start_time timestamp NULL NULL NULL NULL timestamp(6)
|
||||
1.0000 mysql slow_log user_host mediumtext 16777215 16777215 utf8 utf8_general_ci mediumtext
|
||||
NULL mysql slow_log query_time time NULL NULL NULL NULL time(6)
|
||||
|
|
|
@ -144,8 +144,8 @@ def mysql roles_mapping Host 1 '' NO char 60 180 NULL NULL NULL utf8 utf8_bin ch
|
|||
def mysql roles_mapping Role 3 '' NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) PRI NEVER NULL
|
||||
def mysql roles_mapping User 2 '' NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) PRI NEVER NULL
|
||||
def mysql servers Db 3 '' NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64) NEVER NULL
|
||||
def mysql servers Host 2 '' NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64) NEVER NULL
|
||||
def mysql servers Owner 9 '' NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64) NEVER NULL
|
||||
def mysql servers Host 2 '' NO varchar 2048 6144 NULL NULL NULL utf8 utf8_general_ci varchar(2048) NEVER NULL
|
||||
def mysql servers Owner 9 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL
|
||||
def mysql servers Password 5 '' NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64) NEVER NULL
|
||||
def mysql servers Port 6 0 NO int NULL NULL 10 0 NULL NULL NULL int(4) NEVER NULL
|
||||
def mysql servers Server_name 1 '' NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64) PRI NEVER NULL
|
||||
|
@ -468,14 +468,14 @@ NULL mysql proxies_priv Timestamp timestamp NULL NULL NULL NULL timestamp
|
|||
3.0000 mysql roles_mapping Role char 80 240 utf8 utf8_bin char(80)
|
||||
3.0000 mysql roles_mapping Admin_option enum 1 3 utf8 utf8_general_ci enum('N','Y')
|
||||
3.0000 mysql servers Server_name char 64 192 utf8 utf8_general_ci char(64)
|
||||
3.0000 mysql servers Host char 64 192 utf8 utf8_general_ci char(64)
|
||||
3.0000 mysql servers Host varchar 2048 6144 utf8 utf8_general_ci varchar(2048)
|
||||
3.0000 mysql servers Db char 64 192 utf8 utf8_general_ci char(64)
|
||||
3.0000 mysql servers Username char 80 240 utf8 utf8_general_ci char(80)
|
||||
3.0000 mysql servers Password char 64 192 utf8 utf8_general_ci char(64)
|
||||
NULL mysql servers Port int NULL NULL NULL NULL int(4)
|
||||
3.0000 mysql servers Socket char 64 192 utf8 utf8_general_ci char(64)
|
||||
3.0000 mysql servers Wrapper char 64 192 utf8 utf8_general_ci char(64)
|
||||
3.0000 mysql servers Owner char 64 192 utf8 utf8_general_ci char(64)
|
||||
3.0000 mysql servers Owner varchar 512 1536 utf8 utf8_general_ci varchar(512)
|
||||
NULL mysql slow_log start_time timestamp NULL NULL NULL NULL timestamp(6)
|
||||
1.0000 mysql slow_log user_host mediumtext 16777215 16777215 utf8 utf8_general_ci mediumtext
|
||||
NULL mysql slow_log query_time time NULL NULL NULL NULL time(6)
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
#
|
||||
##############################################################################
|
||||
|
||||
MW-286 : MDEV-19992 Galera test failure on MW-286
|
||||
GCF-1081 : MDEV-18283 Galera test failure on galera.GCF-1081
|
||||
MW-329 : MDEV-19962 Galera test failure on MW-329
|
||||
MW-360 : needs rewrite to be MariaDB gtid compatible
|
||||
|
@ -36,11 +35,11 @@ galera_many_tables_nopk : MDEV-18182 Galera test failure on galera.galera_many_t
|
|||
galera_migrate : MariaDB does not support START SLAVE USER
|
||||
galera_split_brain : MDEV-18280 Galera test failure on galera_split_brain and galera_kill_nochanges
|
||||
galera_ssl_upgrade : MDEV-19950 Galera test failure on galera_ssl_upgrade
|
||||
galera_var_node_address : MDEV-20485 Galera test failure
|
||||
galera_var_notify_cmd : MDEV-20600 Galera test galera_var_notify_cmd causes hang
|
||||
galera_var_reject_queries : assertion in inline_mysql_socket_send
|
||||
galera_var_retry_autocommit: MDEV-18181 Galera test failure on galera.galera_var_retry_autocommit
|
||||
galera_var_node_address : MDEV-20485 Galera test failure on galera.galera_var_node_address
|
||||
galera_wan : MDEV-17259 Test failure on galera.galera_wan
|
||||
mysql-wsrep#198 : MDEV-18935 Galera test mysql-wsrep#198 sporaric assertion transaction.cpp:362: int wsrep::transaction::before_commit(): Assertion `state() == s_executing || state() == s_committing || state() == s_must_abort || state() == s_replaying' failed.
|
||||
partition : MDEV-19958 Galera test failure on galera.partition
|
||||
query_cache: MDEV-15805 Test failure on galera.query_cache
|
||||
galera_var_notify_cmd : MDEV-20600 Galera test galera_var_notify_cmd causes hang
|
||||
|
|
|
@ -8,10 +8,6 @@ SET GLOBAL wsrep_slave_threads = 1;
|
|||
connection node_2;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
connection node_1;
|
||||
SET SESSION wsrep_sync_wait=15;
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
1
|
||||
SET GLOBAL wsrep_slave_threads = 10;
|
||||
# Set slave threads to 10 step 2
|
||||
SET GLOBAL wsrep_slave_threads = 20;
|
||||
|
@ -45,9 +41,11 @@ INSERT INTO t1 VALUES (17);
|
|||
INSERT INTO t1 VALUES (18);
|
||||
INSERT INTO t1 VALUES (19);
|
||||
INSERT INTO t1 VALUES (20);
|
||||
INSERT INTO t1 VALUES (21);
|
||||
INSERT INTO t1 VALUES (22);
|
||||
connection node_1;
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
21
|
||||
23
|
||||
SET GLOBAL wsrep_slave_threads = 1;
|
||||
DROP TABLE t1;
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (id INT PRIMARY KEY, val INT);
|
||||
INSERT INTO t1 VALUES (1, 1);
|
||||
connection node_2;
|
||||
START TRANSACTION;
|
||||
SET DEBUG_SYNC = 'wsrep_after_statement_enter SIGNAL blocked WAIT_FOR continue';
|
||||
UPDATE t1 SET val=2 WHERE id=1;
|
||||
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
|
||||
SET DEBUG_SYNC = 'now WAIT_FOR blocked';
|
||||
connection node_1;
|
||||
UPDATE t1 SET val=3 WHERE id=1;
|
||||
connection node_2a;
|
||||
SET DEBUG_SYNC = 'now SIGNAL continue';
|
||||
connection node_2;
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
COMMIT;
|
||||
SET DEBUG_SYNC = 'RESET';
|
||||
connection node_1;
|
||||
DROP TABLE t1;
|
|
@ -23,14 +23,12 @@ SET GLOBAL wsrep_slave_threads = 1;
|
|||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
--connection node_1
|
||||
SET SESSION wsrep_sync_wait=15;
|
||||
SELECT COUNT(*) FROM t1;
|
||||
|
||||
SET GLOBAL wsrep_slave_threads = 10;
|
||||
|
||||
# Note that above insert could be handled by one of the slave threads
|
||||
--echo # Set slave threads to 10 step 2
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = 10 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
|
||||
--let $wait_condition_on_error_output = SELECT COUNT(*), 10 as EXPECTED_VALUE FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep applier idle'; show processlist
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE >= 9 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
|
||||
--let $wait_condition_on_error_output = SELECT COUNT(*), 9 as EXPECTED_VALUE FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep applier idle'; show processlist
|
||||
--source include/wait_condition_with_debug.inc
|
||||
|
||||
SET GLOBAL wsrep_slave_threads = 20;
|
||||
|
@ -73,6 +71,8 @@ INSERT INTO t1 VALUES (17);
|
|||
INSERT INTO t1 VALUES (18);
|
||||
INSERT INTO t1 VALUES (19);
|
||||
INSERT INTO t1 VALUES (20);
|
||||
INSERT INTO t1 VALUES (21);
|
||||
INSERT INTO t1 VALUES (22);
|
||||
|
||||
--connection node_1
|
||||
SELECT COUNT(*) FROM t1;
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
#
|
||||
# This test checks that the client gets an error for a BF abort,
|
||||
# specifically when it gets detected inside the wsrep_after_statement hook
|
||||
#
|
||||
|
||||
--source include/have_innodb.inc
|
||||
--source include/galera_cluster.inc
|
||||
--source include/have_debug_sync.inc
|
||||
|
||||
--connection node_1
|
||||
CREATE TABLE t1 (id INT PRIMARY KEY, val INT);
|
||||
INSERT INTO t1 VALUES (1, 1);
|
||||
|
||||
--connection node_2
|
||||
START TRANSACTION;
|
||||
SET DEBUG_SYNC = 'wsrep_after_statement_enter SIGNAL blocked WAIT_FOR continue';
|
||||
--send UPDATE t1 SET val=2 WHERE id=1
|
||||
|
||||
--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
|
||||
SET DEBUG_SYNC = 'now WAIT_FOR blocked';
|
||||
|
||||
--connection node_1
|
||||
# cause BF abort on other node
|
||||
UPDATE t1 SET val=3 WHERE id=1;
|
||||
|
||||
--connection node_2a
|
||||
SET DEBUG_SYNC = 'now SIGNAL continue';
|
||||
|
||||
--connection node_2
|
||||
# check we get BF aborted
|
||||
--error ER_LOCK_DEADLOCK
|
||||
--reap
|
||||
COMMIT;
|
||||
SET DEBUG_SYNC = 'RESET';
|
||||
|
||||
--connection node_1
|
||||
DROP TABLE t1;
|
|
@ -204,5 +204,32 @@ connection truncate;
|
|||
disconnect truncate;
|
||||
connection default;
|
||||
DROP TABLE t1, t2;
|
||||
#
|
||||
# MDEV-16222 Assertion `0' failed in row_purge_remove_sec_if_poss_leaf
|
||||
# on table with virtual columns and indexes
|
||||
#
|
||||
set @saved_dbug= @@global.debug_dbug;
|
||||
set global debug_dbug= "+d,ib_purge_virtual_mdev_16222_1,ib_purge_virtual_mdev_16222_2";
|
||||
create table t1 (
|
||||
pk serial, vb tinyblob as (b) virtual, b tinyblob,
|
||||
primary key(pk), index (vb(64)))
|
||||
engine innodb;
|
||||
insert ignore into t1 (b) values ('foo');
|
||||
select * into outfile 'load.data' from t1;
|
||||
load data infile 'load.data' replace into table t1;
|
||||
set debug_sync= "now WAIT_FOR latch_released";
|
||||
set global debug_dbug= "-d,ib_purge_virtual_mdev_16222_1";
|
||||
drop table t1;
|
||||
set debug_sync= "now SIGNAL drop_started WAIT_FOR got_no_such_table";
|
||||
create table t1 (
|
||||
pk serial, vb tinyblob as (b) virtual, b tinyblob,
|
||||
primary key(pk), index (vb(64)))
|
||||
engine innodb;
|
||||
insert ignore into t1 (b) values ('foo');
|
||||
select * into outfile 'load.data' from t1;
|
||||
load data infile 'load.data' replace into table t1;
|
||||
set debug_sync= "now WAIT_FOR got_no_such_table";
|
||||
set global debug_dbug= @saved_dbug;
|
||||
drop table t1;
|
||||
set debug_sync=reset;
|
||||
SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
|
||||
|
|
|
@ -259,6 +259,54 @@ disconnect truncate;
|
|||
connection default;
|
||||
DROP TABLE t1, t2;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-16222 Assertion `0' failed in row_purge_remove_sec_if_poss_leaf
|
||||
--echo # on table with virtual columns and indexes
|
||||
--echo #
|
||||
|
||||
--let $datadir= `select @@datadir`
|
||||
set @saved_dbug= @@global.debug_dbug;
|
||||
set global debug_dbug= "+d,ib_purge_virtual_mdev_16222_1,ib_purge_virtual_mdev_16222_2";
|
||||
|
||||
create table t1 (
|
||||
pk serial, vb tinyblob as (b) virtual, b tinyblob,
|
||||
primary key(pk), index (vb(64)))
|
||||
engine innodb;
|
||||
|
||||
insert ignore into t1 (b) values ('foo');
|
||||
|
||||
select * into outfile 'load.data' from t1;
|
||||
load data infile 'load.data' replace into table t1;
|
||||
|
||||
set debug_sync= "now WAIT_FOR latch_released";
|
||||
set global debug_dbug= "-d,ib_purge_virtual_mdev_16222_1";
|
||||
drop table t1;
|
||||
--remove_file $datadir/test/load.data
|
||||
|
||||
set debug_sync= "now SIGNAL drop_started WAIT_FOR got_no_such_table";
|
||||
|
||||
create table t1 (
|
||||
pk serial, vb tinyblob as (b) virtual, b tinyblob,
|
||||
primary key(pk), index (vb(64)))
|
||||
engine innodb;
|
||||
|
||||
insert ignore into t1 (b) values ('foo');
|
||||
|
||||
select * into outfile 'load.data' from t1;
|
||||
load data infile 'load.data' replace into table t1;
|
||||
|
||||
set debug_sync= "now WAIT_FOR got_no_such_table";
|
||||
|
||||
# FIXME: Race condition here:
|
||||
# 1. purge thread goes into sending got_no_such_table
|
||||
# 2. test thread finishes debug_sync= "RESET" below
|
||||
# 3. purge thread sends got_no_such_table
|
||||
set global debug_dbug= @saved_dbug;
|
||||
|
||||
# cleanup
|
||||
drop table t1;
|
||||
--remove_file $datadir/test/load.data
|
||||
|
||||
--source include/wait_until_count_sessions.inc
|
||||
set debug_sync=reset;
|
||||
SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
|
||||
|
|
|
@ -176,3 +176,10 @@ check table rename_column_and_index;
|
|||
Table Op Msg_type Msg_text
|
||||
test.rename_column_and_index check status OK
|
||||
drop table rename_column_and_index;
|
||||
#
|
||||
# MDEV-19189: ASAN memcpy-param-overlap in fill_alter_inplace_info upon adding indexes
|
||||
#
|
||||
CREATE TABLE t1 (f1 INT, f2 INT, f3 INT);
|
||||
ALTER TABLE t1 ADD FOREIGN KEY f (f2) REFERENCES xx(f2);
|
||||
ALTER TABLE t1 ADD FOREIGN KEY (f2) REFERENCES t1(f2), ADD KEY (f3), ADD KEY (f1);
|
||||
DROP TABLE t1;
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
#
|
||||
# MDEV-16222 Assertion `0' failed in row_purge_remove_sec_if_poss_leaf on table with virtual columns and indexes
|
||||
#
|
||||
set @saved_frequency= @@global.innodb_purge_rseg_truncate_frequency;
|
||||
set global innodb_purge_rseg_truncate_frequency= 1;
|
||||
set @saved_dbug= @@global.debug_dbug;
|
||||
set global debug_dbug= "+d,ib_purge_virtual_mdev_16222_1,ib_purge_virtual_mdev_16222_2";
|
||||
create table t1 (
|
||||
pk serial, vb tinyblob as (b) virtual, b tinyblob,
|
||||
primary key(pk), index (vb(64)))
|
||||
engine innodb;
|
||||
insert ignore into t1 (b) values ('foo');
|
||||
select * into outfile 'load.data' from t1;
|
||||
load data infile 'load.data' replace into table t1;
|
||||
set debug_sync= "now WAIT_FOR latch_released";
|
||||
set global debug_dbug= "-d,ib_purge_virtual_mdev_16222_1";
|
||||
drop table t1;
|
||||
set debug_sync= "now SIGNAL drop_started WAIT_FOR got_no_such_table";
|
||||
create table t1 (
|
||||
pk serial, vb tinyblob as (b) virtual, b tinyblob,
|
||||
primary key(pk), index (vb(64)))
|
||||
engine innodb;
|
||||
insert ignore into t1 (b) values ('foo');
|
||||
select * into outfile 'load.data' from t1;
|
||||
load data infile 'load.data' replace into table t1;
|
||||
set debug_sync= "now WAIT_FOR got_no_such_table";
|
||||
set global debug_dbug= @saved_dbug;
|
||||
drop table t1;
|
||||
set global innodb_purge_rseg_truncate_frequency= @saved_frequency;
|
||||
set debug_sync= "RESET";
|
|
@ -184,3 +184,13 @@ alter table rename_column_and_index
|
|||
show create table rename_column_and_index;
|
||||
check table rename_column_and_index;
|
||||
drop table rename_column_and_index;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-19189: ASAN memcpy-param-overlap in fill_alter_inplace_info upon adding indexes
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (f1 INT, f2 INT, f3 INT);
|
||||
ALTER TABLE t1 ADD FOREIGN KEY f (f2) REFERENCES xx(f2);
|
||||
ALTER TABLE t1 ADD FOREIGN KEY (f2) REFERENCES t1(f2), ADD KEY (f3), ADD KEY (f1);
|
||||
DROP TABLE t1;
|
||||
|
|
|
@ -1,53 +0,0 @@
|
|||
--source include/have_debug.inc
|
||||
--source include/have_innodb.inc
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-16222 Assertion `0' failed in row_purge_remove_sec_if_poss_leaf on table with virtual columns and indexes
|
||||
--echo #
|
||||
|
||||
--let $datadir= `select @@datadir`
|
||||
set @saved_frequency= @@global.innodb_purge_rseg_truncate_frequency;
|
||||
set global innodb_purge_rseg_truncate_frequency= 1;
|
||||
set @saved_dbug= @@global.debug_dbug;
|
||||
set global debug_dbug= "+d,ib_purge_virtual_mdev_16222_1,ib_purge_virtual_mdev_16222_2";
|
||||
|
||||
create table t1 (
|
||||
pk serial, vb tinyblob as (b) virtual, b tinyblob,
|
||||
primary key(pk), index (vb(64)))
|
||||
engine innodb;
|
||||
|
||||
insert ignore into t1 (b) values ('foo');
|
||||
|
||||
select * into outfile 'load.data' from t1;
|
||||
load data infile 'load.data' replace into table t1;
|
||||
|
||||
set debug_sync= "now WAIT_FOR latch_released";
|
||||
set global debug_dbug= "-d,ib_purge_virtual_mdev_16222_1";
|
||||
drop table t1;
|
||||
--remove_file $datadir/test/load.data
|
||||
|
||||
set debug_sync= "now SIGNAL drop_started WAIT_FOR got_no_such_table";
|
||||
|
||||
create table t1 (
|
||||
pk serial, vb tinyblob as (b) virtual, b tinyblob,
|
||||
primary key(pk), index (vb(64)))
|
||||
engine innodb;
|
||||
|
||||
insert ignore into t1 (b) values ('foo');
|
||||
|
||||
select * into outfile 'load.data' from t1;
|
||||
load data infile 'load.data' replace into table t1;
|
||||
|
||||
set debug_sync= "now WAIT_FOR got_no_such_table";
|
||||
# FIXME: Racing condition here:
|
||||
# 1. purge thread goes into sending got_no_such_table
|
||||
# 2. test thread finishes debug_sync= "RESET" below
|
||||
# 3. purge thread sends got_no_such_table
|
||||
set global debug_dbug= @saved_dbug;
|
||||
|
||||
# cleanup
|
||||
drop table t1;
|
||||
--remove_file $datadir/test/load.data
|
||||
|
||||
set global innodb_purge_rseg_truncate_frequency= @saved_frequency;
|
||||
set debug_sync= "RESET";
|
|
@ -9,3 +9,26 @@ disconnect dml;
|
|||
connection default;
|
||||
SET DEBUG_SYNC = 'RESET';
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-19529 InnoDB hang on DROP FULLTEXT INDEX
|
||||
#
|
||||
CREATE TABLE t1(f1 CHAR(100), FULLTEXT(f1))ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES('test');
|
||||
CREATE TABLE t2 (f1 char(100), FULLTEXT idx1(f1))ENGINE=InnoDB;
|
||||
INSERT INTO t2 VALUES('mariadb');
|
||||
connection default;
|
||||
SET GLOBAL debug_dbug ='+d,fts_instrument_sync_request,ib_optimize_wq_hang';
|
||||
SET DEBUG_SYNC= 'fts_instrument_sync_request
|
||||
SIGNAL drop_index_start WAIT_FOR sync_op';
|
||||
INSERT INTO t1 VALUES('Keyword');
|
||||
connect con1,localhost,root,,,;
|
||||
SET DEBUG_SYNC='now WAIT_FOR drop_index_start';
|
||||
SET DEBUG_SYNC= 'norebuild_fts_drop SIGNAL sync_op WAIT_FOR fts_drop_index';
|
||||
ALTER TABLE t2 drop index idx1;
|
||||
connection default;
|
||||
set DEBUG_SYNC= 'now SIGNAL fts_drop_index';
|
||||
connection con1;
|
||||
SET global DEBUG_DBUG=RESET;
|
||||
drop table t1, t2;
|
||||
connection default;
|
||||
set DEBUG_SYNC=RESET;
|
||||
|
|
|
@ -700,15 +700,21 @@ count(*)
|
|||
DROP TABLE t1;
|
||||
"----------Test27---------"
|
||||
CREATE TABLE t1 (id INT,char_column VARCHAR(60));
|
||||
CREATE TABLE t2 (FTS_DOC_ID BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, a TEXT)ENGINE=InnoDB;
|
||||
ALTER TABLE t2 DROP a;
|
||||
SET @@autocommit=0;
|
||||
CREATE FULLTEXT INDEX i ON t1 (char_column);
|
||||
INSERT INTO t1 values (1,'aaa');
|
||||
"restart server..."
|
||||
# Restart the server
|
||||
--source include/restart_mysqld.inc
|
||||
DELETE FROM t1 WHERE MATCH(char_column) AGAINST ('bbb')
|
||||
# restart
|
||||
SHOW CREATE TABLE t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`FTS_DOC_ID` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||
PRIMARY KEY (`FTS_DOC_ID`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
DELETE FROM t1 WHERE MATCH(char_column) AGAINST ('bbb');
|
||||
SET @@autocommit=1;
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t1, t2;
|
||||
"----------Test28---------"
|
||||
drop table if exists `fts_test`;
|
||||
Warnings:
|
||||
|
|
|
@ -18,3 +18,34 @@ reap;
|
|||
SET DEBUG_SYNC = 'RESET';
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-19529 InnoDB hang on DROP FULLTEXT INDEX
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1(f1 CHAR(100), FULLTEXT(f1))ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES('test');
|
||||
CREATE TABLE t2 (f1 char(100), FULLTEXT idx1(f1))ENGINE=InnoDB;
|
||||
INSERT INTO t2 VALUES('mariadb');
|
||||
|
||||
connection default;
|
||||
SET GLOBAL debug_dbug ='+d,fts_instrument_sync_request,ib_optimize_wq_hang';
|
||||
SET DEBUG_SYNC= 'fts_instrument_sync_request
|
||||
SIGNAL drop_index_start WAIT_FOR sync_op';
|
||||
send INSERT INTO t1 VALUES('Keyword');
|
||||
|
||||
connect(con1,localhost,root,,,);
|
||||
SET DEBUG_SYNC='now WAIT_FOR drop_index_start';
|
||||
SET DEBUG_SYNC= 'norebuild_fts_drop SIGNAL sync_op WAIT_FOR fts_drop_index';
|
||||
send ALTER TABLE t2 drop index idx1;
|
||||
|
||||
connection default;
|
||||
reap;
|
||||
set DEBUG_SYNC= 'now SIGNAL fts_drop_index';
|
||||
|
||||
connection con1;
|
||||
reap;
|
||||
SET global DEBUG_DBUG=RESET;
|
||||
drop table t1, t2;
|
||||
connection default;
|
||||
set DEBUG_SYNC=RESET;
|
||||
|
|
|
@ -670,15 +670,16 @@ DROP TABLE t1;
|
|||
--echo "----------Test27---------"
|
||||
#27 Crash after server restart
|
||||
CREATE TABLE t1 (id INT,char_column VARCHAR(60));
|
||||
CREATE TABLE t2 (FTS_DOC_ID BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, a TEXT)ENGINE=InnoDB;
|
||||
ALTER TABLE t2 DROP a;
|
||||
SET @@autocommit=0;
|
||||
CREATE FULLTEXT INDEX i ON t1 (char_column);
|
||||
INSERT INTO t1 values (1,'aaa');
|
||||
echo "restart server..."
|
||||
# Restart the server
|
||||
--source include/restart_mysqld.inc
|
||||
SHOW CREATE TABLE t2;
|
||||
DELETE FROM t1 WHERE MATCH(char_column) AGAINST ('bbb');
|
||||
SET @@autocommit=1;
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t1, t2;
|
||||
|
||||
--echo "----------Test28---------"
|
||||
drop table if exists `fts_test`;
|
||||
|
|
|
@ -167,7 +167,7 @@ WHERE ts BETWEEN '0000-00-00' AND '2010-00-01 00:00:00'
|
|||
ORDER BY ts DESC
|
||||
LIMIT 2;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index PRIMARY PRIMARY 4 NULL 2 Using where
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 4 Using where
|
||||
|
||||
DROP TABLE t1;
|
||||
#
|
||||
|
|
2
mysql-test/suite/mariabackup/extra_lsndir_stream.result
Normal file
2
mysql-test/suite/mariabackup/extra_lsndir_stream.result
Normal file
|
@ -0,0 +1,2 @@
|
|||
xtrabackup_checkpoints
|
||||
xtrabackup_info
|
7
mysql-test/suite/mariabackup/extra_lsndir_stream.test
Normal file
7
mysql-test/suite/mariabackup/extra_lsndir_stream.test
Normal file
|
@ -0,0 +1,7 @@
|
|||
let $extra_lsndir=$MYSQLTEST_VARDIR/tmp/extra_lsndir;
|
||||
mkdir $extra_lsndir;
|
||||
--disable_result_log
|
||||
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --stream=xbstream --extra-lsndir=$extra_lsndir > /dev/null;
|
||||
--enable_result_log
|
||||
list_files $extra_lsndir;
|
||||
rmdir $extra_lsndir;
|
1
mysql-test/suite/mariabackup/mdev-18438.result
Normal file
1
mysql-test/suite/mariabackup/mdev-18438.result
Normal file
|
@ -0,0 +1 @@
|
|||
stream.xb
|
11
mysql-test/suite/mariabackup/mdev-18438.test
Normal file
11
mysql-test/suite/mariabackup/mdev-18438.test
Normal file
|
@ -0,0 +1,11 @@
|
|||
let $basedir=$MYSQLTEST_VARDIR/tmp/mdev-18438;
|
||||
mkdir $basedir;
|
||||
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --extra-lsndir=$basedir/extra_lsndir --stream=xbstream > $basedir/stream.xb;
|
||||
mkdir $basedir/backup;
|
||||
rmdir $basedir/extra_lsndir;
|
||||
--disable_result_log
|
||||
exec $XBSTREAM -x -C $basedir/backup < $basedir/stream.xb;
|
||||
--enable_result_log
|
||||
rmdir $basedir/backup;
|
||||
list_files $basedir;
|
||||
rmdir $basedir;
|
40
mysql-test/suite/rpl/r/rpl_semi_sync_slave_reply_fail.result
Normal file
40
mysql-test/suite/rpl/r/rpl_semi_sync_slave_reply_fail.result
Normal file
|
@ -0,0 +1,40 @@
|
|||
include/master-slave.inc
|
||||
[connection master]
|
||||
connection slave;
|
||||
include/stop_slave.inc
|
||||
connection master;
|
||||
call mtr.add_suppression("Timeout waiting for reply of binlog*");
|
||||
set global rpl_semi_sync_master_enabled = ON;
|
||||
SET @@GLOBAL.rpl_semi_sync_master_timeout=100;
|
||||
create table t1 (i int);
|
||||
connection slave;
|
||||
set global rpl_semi_sync_slave_enabled = ON;
|
||||
CALL mtr.add_suppression("Semi-sync slave net_flush*");
|
||||
SET @save_debug= @@global.debug;
|
||||
SET GLOBAL debug_dbug="+d,semislave_failed_net_flush";
|
||||
include/start_slave.inc
|
||||
connection master;
|
||||
connection slave;
|
||||
"Assert that the net_fulsh() reply failed is present in slave error log.
|
||||
FOUND 1 /Semi-sync slave net_flush\(\) reply failed/ in mysqld.2.err
|
||||
"Assert that Slave IO thread is up and running."
|
||||
SHOW STATUS LIKE 'Slave_running';
|
||||
Variable_name Value
|
||||
Slave_running ON
|
||||
Slave_IO_Running= Yes
|
||||
"Clear the network failure simulation."
|
||||
SET GLOBAL debug_dbug= @save_debug;
|
||||
connection master;
|
||||
insert into t1 values (10);
|
||||
connection slave;
|
||||
connection slave;
|
||||
# Compare the tables on master and slave.
|
||||
include/diff_tables.inc [master:t1, slave:t1]
|
||||
connection master;
|
||||
drop table t1;
|
||||
connection slave;
|
||||
set global rpl_semi_sync_slave_enabled = OFF;
|
||||
connection master;
|
||||
set global rpl_semi_sync_master_enabled = OFF;
|
||||
SET @@GLOBAL.rpl_semi_sync_master_timeout = 10000;
|
||||
include/rpl_end.inc
|
87
mysql-test/suite/rpl/t/rpl_semi_sync_slave_reply_fail.test
Normal file
87
mysql-test/suite/rpl/t/rpl_semi_sync_slave_reply_fail.test
Normal file
|
@ -0,0 +1,87 @@
|
|||
# ==== Purpose ====
|
||||
#
|
||||
# Test verifies that slave IO thread doesn't report an error, when slave fails
|
||||
# to send an acknowledgment to master with semi sync replication in use.
|
||||
#
|
||||
# ==== Implementation ====
|
||||
#
|
||||
# Steps:
|
||||
# 0 - Have semi synchronous replication in use.
|
||||
# 1 - Enable a debug simulation point which simulates network flush failure
|
||||
# at the time of slave reply operation.
|
||||
# 2 - Do some operation on master and wait for it to be replicated. Master
|
||||
# will timeout waiting for reply from slave.
|
||||
# 3 - Check the slave error log for appropriate error message regarding
|
||||
# net_flush operation failure.
|
||||
# 4 - Remove the debug simulation and do some more DML operations on master
|
||||
# and wait for them to be replicated.
|
||||
# 5 - Slave will be able to replicate and data is consistent on both master
|
||||
# and slave. Semi sync will be automatically turned on.
|
||||
#
|
||||
# ==== References ====
|
||||
#
|
||||
# MDEV-20217: Semi_sync: Last_IO_Error: Fatal error: Failed to run
|
||||
# 'after_queue_event' hook
|
||||
#
|
||||
--source include/have_debug.inc
|
||||
--source include/master-slave.inc
|
||||
|
||||
--connection slave
|
||||
--source include/stop_slave.inc
|
||||
|
||||
--connection master
|
||||
call mtr.add_suppression("Timeout waiting for reply of binlog*");
|
||||
--let $sav_timeout_master=`SELECT @@GLOBAL.rpl_semi_sync_master_timeout`
|
||||
set global rpl_semi_sync_master_enabled = ON;
|
||||
SET @@GLOBAL.rpl_semi_sync_master_timeout=100;
|
||||
create table t1 (i int);
|
||||
|
||||
--connection slave
|
||||
set global rpl_semi_sync_slave_enabled = ON;
|
||||
CALL mtr.add_suppression("Semi-sync slave net_flush*");
|
||||
SET @save_debug= @@global.debug;
|
||||
SET GLOBAL debug_dbug="+d,semislave_failed_net_flush";
|
||||
--source include/start_slave.inc
|
||||
|
||||
--connection master
|
||||
--sync_slave_with_master
|
||||
|
||||
# Check error log for correct messages.
|
||||
let $log_error_= `SELECT @@GLOBAL.log_error`;
|
||||
if(!$log_error_)
|
||||
{
|
||||
# MySQL Server on windows is started with --console and thus
|
||||
# does not know the location of its .err log, use default location
|
||||
let $log_error_ = $MYSQLTEST_VARDIR/log/mysqld.2.err;
|
||||
}
|
||||
--echo "Assert that the net_fulsh() reply failed is present in slave error log.
|
||||
--let SEARCH_FILE=$log_error_
|
||||
--let SEARCH_PATTERN=Semi-sync slave net_flush\(\) reply failed
|
||||
--source include/search_pattern_in_file.inc
|
||||
|
||||
--echo "Assert that Slave IO thread is up and running."
|
||||
SHOW STATUS LIKE 'Slave_running';
|
||||
let $status= query_get_value("show slave status", Slave_IO_Running, 1);
|
||||
echo Slave_IO_Running= $status;
|
||||
|
||||
--echo "Clear the network failure simulation."
|
||||
SET GLOBAL debug_dbug= @save_debug;
|
||||
|
||||
--connection master
|
||||
insert into t1 values (10);
|
||||
--sync_slave_with_master
|
||||
|
||||
--connection slave
|
||||
--echo # Compare the tables on master and slave.
|
||||
--let $diff_tables= master:t1, slave:t1
|
||||
--source include/diff_tables.inc
|
||||
|
||||
--connection master
|
||||
drop table t1;
|
||||
--sync_slave_with_master
|
||||
set global rpl_semi_sync_slave_enabled = OFF;
|
||||
|
||||
--connection master
|
||||
set global rpl_semi_sync_master_enabled = OFF;
|
||||
--eval SET @@GLOBAL.rpl_semi_sync_master_timeout = $sav_timeout_master
|
||||
--source include/rpl_end.inc
|
|
@ -88,5 +88,26 @@ UPDATE IGNORE t1 SET d = NOW();
|
|||
DROP TABLE t1;
|
||||
SET sql_mode=DEFAULT;
|
||||
#
|
||||
# MDEV-20423 Assertion `0' failed or `btr_validate_index(index, 0, false)' in row_upd_sec_index_entry or error code 126: Index is corrupted upon DELETE with TIME_ROUND_FRACTIONAL
|
||||
#
|
||||
CREATE TABLE t1 (
|
||||
a DATETIME(6),
|
||||
v VARCHAR(30) GENERATED ALWAYS AS (CAST(a AS DATETIME(3))) VIRTUAL,
|
||||
KEY (v)
|
||||
);
|
||||
ERROR HY000: Function or expression 'cast(`a` as datetime(3))' cannot be used in the GENERATED ALWAYS AS clause of `v`
|
||||
CREATE TABLE t1 (
|
||||
a DATETIME(6),
|
||||
v VARCHAR(30) GENERATED ALWAYS AS (TRUNCATE(a,3)) VIRTUAL,
|
||||
KEY (v)
|
||||
);
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (
|
||||
a DATETIME(6),
|
||||
v VARCHAR(30) GENERATED ALWAYS AS (ROUND(a,3)) VIRTUAL,
|
||||
KEY (v)
|
||||
);
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# End of 10.4 tests
|
||||
#
|
||||
|
|
|
@ -88,5 +88,26 @@ UPDATE IGNORE t1 SET d = CURRENT_TIME;
|
|||
DROP TABLE t1;
|
||||
SET sql_mode=DEFAULT;
|
||||
#
|
||||
# MDEV-20423 Assertion `0' failed or `btr_validate_index(index, 0, false)' in row_upd_sec_index_entry or error code 126: Index is corrupted upon DELETE with TIME_ROUND_FRACTIONAL
|
||||
#
|
||||
CREATE TABLE t1 (
|
||||
a TIME(6),
|
||||
v VARCHAR(30) GENERATED ALWAYS AS (CAST(a AS TIME(3))) VIRTUAL,
|
||||
KEY (v)
|
||||
);
|
||||
ERROR HY000: Function or expression 'cast(`a` as time(3))' cannot be used in the GENERATED ALWAYS AS clause of `v`
|
||||
CREATE TABLE t1 (
|
||||
a TIME(6),
|
||||
v VARCHAR(30) GENERATED ALWAYS AS (TRUNCATE(a,3)) VIRTUAL,
|
||||
KEY (v)
|
||||
);
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (
|
||||
a TIME(6),
|
||||
v VARCHAR(30) GENERATED ALWAYS AS (ROUND(a,3)) VIRTUAL,
|
||||
KEY (v)
|
||||
);
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# End of 10.4 tests
|
||||
#
|
||||
|
|
|
@ -103,6 +103,31 @@ UPDATE IGNORE t1 SET d = NOW();
|
|||
DROP TABLE t1;
|
||||
SET sql_mode=DEFAULT;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-20423 Assertion `0' failed or `btr_validate_index(index, 0, false)' in row_upd_sec_index_entry or error code 126: Index is corrupted upon DELETE with TIME_ROUND_FRACTIONAL
|
||||
--echo #
|
||||
|
||||
--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
|
||||
CREATE TABLE t1 (
|
||||
a DATETIME(6),
|
||||
v VARCHAR(30) GENERATED ALWAYS AS (CAST(a AS DATETIME(3))) VIRTUAL,
|
||||
KEY (v)
|
||||
);
|
||||
|
||||
CREATE TABLE t1 (
|
||||
a DATETIME(6),
|
||||
v VARCHAR(30) GENERATED ALWAYS AS (TRUNCATE(a,3)) VIRTUAL,
|
||||
KEY (v)
|
||||
);
|
||||
DROP TABLE t1;
|
||||
|
||||
CREATE TABLE t1 (
|
||||
a DATETIME(6),
|
||||
v VARCHAR(30) GENERATED ALWAYS AS (ROUND(a,3)) VIRTUAL,
|
||||
KEY (v)
|
||||
);
|
||||
DROP TABLE t1;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.4 tests
|
||||
|
|
|
@ -104,6 +104,32 @@ DROP TABLE t1;
|
|||
SET sql_mode=DEFAULT;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-20423 Assertion `0' failed or `btr_validate_index(index, 0, false)' in row_upd_sec_index_entry or error code 126: Index is corrupted upon DELETE with TIME_ROUND_FRACTIONAL
|
||||
--echo #
|
||||
|
||||
--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
|
||||
CREATE TABLE t1 (
|
||||
a TIME(6),
|
||||
v VARCHAR(30) GENERATED ALWAYS AS (CAST(a AS TIME(3))) VIRTUAL,
|
||||
KEY (v)
|
||||
);
|
||||
|
||||
CREATE TABLE t1 (
|
||||
a TIME(6),
|
||||
v VARCHAR(30) GENERATED ALWAYS AS (TRUNCATE(a,3)) VIRTUAL,
|
||||
KEY (v)
|
||||
);
|
||||
DROP TABLE t1;
|
||||
|
||||
CREATE TABLE t1 (
|
||||
a TIME(6),
|
||||
v VARCHAR(30) GENERATED ALWAYS AS (ROUND(a,3)) VIRTUAL,
|
||||
KEY (v)
|
||||
);
|
||||
DROP TABLE t1;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.4 tests
|
||||
--echo #
|
||||
|
|
|
@ -358,7 +358,7 @@ then
|
|||
cannot_find_file fill_help_tables.sql @pkgdata_locations@
|
||||
exit 1
|
||||
fi
|
||||
plugindir=`find_in_dirs --dir auth_pam.so $basedir/lib*/plugin $basedir/lib*/mysql/plugin`
|
||||
plugindir=`find_in_dirs --dir auth_pam.so $basedir/lib*/plugin $basedir/lib*/mysql/plugin $basedir/lib/*/mariadb19/plugin`
|
||||
pamtooldir=$plugindir
|
||||
# relative from where the script was run for a relocatable install
|
||||
elif test -n "$dirname0" -a -x "$rel_mysqld" -a ! "$rel_mysqld" -ef "@sbindir@/mysqld"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
-- Copyright (c) 2007, 2018, Oracle and/or its affiliates.
|
||||
-- Copyright (c) 2008, 2014, Monty Program Ab & SkySQL Ab
|
||||
--
|
||||
-- Copyright (c) 2008, 2019, MariaDB Corporation.
|
||||
--
|
||||
-- This program is free software; you can redistribute it and/or modify
|
||||
-- it under the terms of the GNU General Public License as published by
|
||||
-- the Free Software Foundation; version 2 of the License.
|
||||
|
@ -96,7 +96,7 @@ CREATE TABLE IF NOT EXISTS func ( name char(64) binary DEFAULT '' NOT NULL, ret
|
|||
CREATE TABLE IF NOT EXISTS plugin ( name varchar(64) DEFAULT '' NOT NULL, dl varchar(128) DEFAULT '' NOT NULL, PRIMARY KEY (name) ) engine=Aria transactional=1 CHARACTER SET utf8 COLLATE utf8_general_ci comment='MySQL plugins';
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS servers ( Server_name char(64) NOT NULL DEFAULT '', Host char(64) NOT NULL DEFAULT '', Db char(64) NOT NULL DEFAULT '', Username char(80) NOT NULL DEFAULT '', Password char(64) NOT NULL DEFAULT '', Port INT(4) NOT NULL DEFAULT '0', Socket char(64) NOT NULL DEFAULT '', Wrapper char(64) NOT NULL DEFAULT '', Owner char(64) NOT NULL DEFAULT '', PRIMARY KEY (Server_name)) engine=Aria transactional=1 CHARACTER SET utf8 comment='MySQL Foreign Servers table';
|
||||
CREATE TABLE IF NOT EXISTS servers ( Server_name char(64) NOT NULL DEFAULT '', Host varchar(2048) NOT NULL DEFAULT '', Db char(64) NOT NULL DEFAULT '', Username char(80) NOT NULL DEFAULT '', Password char(64) NOT NULL DEFAULT '', Port INT(4) NOT NULL DEFAULT '0', Socket char(64) NOT NULL DEFAULT '', Wrapper char(64) NOT NULL DEFAULT '', Owner varchar(512) NOT NULL DEFAULT '', PRIMARY KEY (Server_name)) engine=Aria transactional=1 CHARACTER SET utf8 comment='MySQL Foreign Servers table';
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS tables_priv ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(80) binary DEFAULT '' NOT NULL, Table_name char(64) binary DEFAULT '' NOT NULL, Grantor char(141) DEFAULT '' NOT NULL, Timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, Table_priv set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger','Delete versioning rows') COLLATE utf8_general_ci DEFAULT '' NOT NULL, Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL, PRIMARY KEY (Host,Db,User,Table_name), KEY Grantor (Grantor) ) engine=Aria transactional=1 CHARACTER SET utf8 COLLATE utf8_bin comment='Table privileges';
|
||||
|
|
|
@ -938,7 +938,13 @@ do
|
|||
cmd="$cmd "`shell_quote_string "$i"`
|
||||
done
|
||||
cmd="$cmd $args"
|
||||
[ $dry_run -eq 1 ] && return
|
||||
|
||||
if [ $dry_run -eq 1 ]
|
||||
then
|
||||
# RETURN or EXIT depending if the script is being sourced or not.
|
||||
(return 2> /dev/null) && return || exit
|
||||
fi
|
||||
|
||||
|
||||
# Avoid 'nohup: ignoring input' warning
|
||||
test -n "$NOHUP_NICENESS" && cmd="$cmd < /dev/null"
|
||||
|
|
53
sql/field.cc
53
sql/field.cc
|
@ -64,7 +64,7 @@ inline bool Field::marked_for_read() const
|
|||
(!table->read_set ||
|
||||
bitmap_is_set(table->read_set, field_index) ||
|
||||
(!(ptr >= table->record[0] &&
|
||||
ptr < table->record[0] + table->s->reclength)));
|
||||
ptr < table->record[0] + table->s->reclength)));
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -75,7 +75,7 @@ inline bool Field::marked_for_read() const
|
|||
|
||||
inline bool Field::marked_for_write_or_computed() const
|
||||
{
|
||||
return (is_stat_field || !table ||
|
||||
return (!table ||
|
||||
(!table->write_set ||
|
||||
bitmap_is_set(table->write_set, field_index) ||
|
||||
(!(ptr >= table->record[0] &&
|
||||
|
@ -2439,31 +2439,19 @@ Field *Field::clone(MEM_ROOT *root, TABLE *new_table)
|
|||
}
|
||||
|
||||
|
||||
|
||||
Field *Field::clone(MEM_ROOT *root, TABLE *new_table, my_ptrdiff_t diff,
|
||||
bool stat_flag)
|
||||
{
|
||||
Field *tmp;
|
||||
if ((tmp= (Field*) memdup_root(root,(char*) this,size_of())))
|
||||
{
|
||||
tmp->init(new_table);
|
||||
tmp->move_field_offset(diff);
|
||||
}
|
||||
tmp->is_stat_field= stat_flag;
|
||||
return tmp;
|
||||
}
|
||||
|
||||
|
||||
Field *Field::clone(MEM_ROOT *root, my_ptrdiff_t diff)
|
||||
Field *Field::clone(MEM_ROOT *root, TABLE *new_table, my_ptrdiff_t diff)
|
||||
{
|
||||
Field *tmp;
|
||||
if ((tmp= (Field*) memdup_root(root,(char*) this,size_of())))
|
||||
{
|
||||
if (new_table)
|
||||
tmp->init(new_table);
|
||||
tmp->move_field_offset(diff);
|
||||
}
|
||||
return tmp;
|
||||
}
|
||||
|
||||
|
||||
int Field::set_default()
|
||||
{
|
||||
if (default_value)
|
||||
|
@ -2896,7 +2884,7 @@ int Field_decimal::store(const char *from_arg, size_t len, CHARSET_INFO *cs)
|
|||
|
||||
/*
|
||||
Write digits of the frac_% parts ;
|
||||
Depending on get_thd()->count_cutted_fields, we may also want
|
||||
Depending on get_thd()->count_cuted_fields, we may also want
|
||||
to know if some non-zero tail of these parts will
|
||||
be truncated (for example, 0.002->0.00 will generate a warning,
|
||||
while 0.000->0.00 will not)
|
||||
|
@ -7040,7 +7028,8 @@ Field_longstr::check_string_copy_error(const String_copier *copier,
|
|||
if (likely(!(pos= copier->most_important_error_pos())))
|
||||
return FALSE;
|
||||
|
||||
if (!is_stat_field)
|
||||
/* Ignore errors from internal expressions */
|
||||
if (get_thd()->count_cuted_fields > CHECK_FIELD_EXPRESSION)
|
||||
{
|
||||
DBUG_ASSERT(sizeof(tmp) >= convert_to_printable_required_length(6));
|
||||
convert_to_printable(tmp, sizeof(tmp), pos, (end - pos), cs, 6);
|
||||
|
@ -7074,8 +7063,9 @@ int
|
|||
Field_longstr::report_if_important_data(const char *pstr, const char *end,
|
||||
bool count_spaces)
|
||||
{
|
||||
THD *thd= get_thd();
|
||||
if ((pstr < end) && thd->count_cuted_fields > CHECK_FIELD_EXPRESSION)
|
||||
THD *thd;
|
||||
if ((pstr < end) &&
|
||||
(thd= get_thd())->count_cuted_fields > CHECK_FIELD_EXPRESSION)
|
||||
{
|
||||
if (test_if_important_data(field_charset(), pstr, end))
|
||||
{
|
||||
|
@ -7086,7 +7076,8 @@ Field_longstr::report_if_important_data(const char *pstr, const char *end,
|
|||
return 2;
|
||||
}
|
||||
else if (count_spaces)
|
||||
{ /* If we lost only spaces then produce a NOTE, not a WARNING */
|
||||
{
|
||||
/* If we lost only spaces then produce a NOTE, not a WARNING */
|
||||
set_note(WARN_DATA_TRUNCATED, 1);
|
||||
return 2;
|
||||
}
|
||||
|
@ -10938,13 +10929,17 @@ void Field::set_warning_truncated_wrong_value(const char *type_arg,
|
|||
const char *value)
|
||||
{
|
||||
THD *thd= get_thd();
|
||||
const char *db_name= table->s->db.str;
|
||||
const char *table_name= table->s->table_name.str;
|
||||
const char *db_name;
|
||||
const char *table_name;
|
||||
/*
|
||||
table has in the past been 0 in case of wrong calls when processing
|
||||
statistics tables. Let's protect against that.
|
||||
*/
|
||||
DBUG_ASSERT(table);
|
||||
|
||||
if (!db_name)
|
||||
db_name= "";
|
||||
if (!table_name)
|
||||
table_name= "";
|
||||
db_name= (table && table->s->db.str) ? table->s->db.str : "";
|
||||
table_name= ((table && table->s->table_name.str) ? table->s->table_name.str :
|
||||
"");
|
||||
|
||||
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
|
||||
ER_TRUNCATED_WRONG_VALUE_FOR_FIELD,
|
||||
|
|
|
@ -1396,9 +1396,7 @@ public:
|
|||
return create_tmp_field(root, new_table, maybe_null());
|
||||
}
|
||||
Field *clone(MEM_ROOT *mem_root, TABLE *new_table);
|
||||
Field *clone(MEM_ROOT *mem_root, TABLE *new_table, my_ptrdiff_t diff,
|
||||
bool stat_flag= FALSE);
|
||||
Field *clone(MEM_ROOT *mem_root, my_ptrdiff_t diff);
|
||||
Field *clone(MEM_ROOT *mem_root, TABLE *new_table, my_ptrdiff_t diff);
|
||||
inline void move_field(uchar *ptr_arg,uchar *null_ptr_arg,uchar null_bit_arg)
|
||||
{
|
||||
ptr=ptr_arg; null_ptr=null_ptr_arg; null_bit=null_bit_arg;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue