1
0
mirror of https://github.com/MariaDB/server.git synced 2026-10-23 18:49:29 +03:00

Merge branch '12.2' into 12.3

This commit is contained in:
Sergei Golubchik
2026-01-08 21:40:52 +01:00
318 changed files with 10057 additions and 4086 deletions

1
.gitignore vendored
View File

@@ -31,6 +31,7 @@ Docs/INFO_BIN
Docs/INFO_SRC
Makefile
TAGS
mariadb-plugin-columnstore.install.generated
Testing/
tmp/
VERSION.dep

View File

@@ -34,9 +34,10 @@ typedef struct st_line_buffer
bool truncated;
} LINE_BUFFER;
extern LINE_BUFFER *batch_readline_init(ulong max_size,FILE *file);
extern LINE_BUFFER *batch_readline_command(LINE_BUFFER *buffer, char * str);
extern char *batch_readline(LINE_BUFFER *buffer, bool binary_mode);
extern void batch_readline_end(LINE_BUFFER *buffer);
extern bool init_line_buffer(LINE_BUFFER *buffer, File file, ulong size,
ulong max_size);
#endif /* CLIENT_MY_READLINE_INCLUDED */

View File

@@ -1216,6 +1216,88 @@ inline int get_command_index(char cmd_char)
return -1;
}
static LINE_BUFFER *batch_readline_init(ulong max_size, const char *path)
{
LINE_BUFFER *line_buff;
File file;
MY_STAT input_file_stat;
char buff[FN_REFLEN + 512];
if (path)
{
file= my_open(path, O_RDONLY | O_BINARY, MYF(0));
if (file < 0 && my_errno == ENOENT && script_dir)
{
char full_path[FN_REFLEN];
strxnmov(full_path, sizeof(full_path)-1, script_dir, "/", path, NULL);
file= my_open(full_path, O_RDONLY | O_BINARY, MYF(0));
}
if (file < 0)
{
#ifdef _WIN32
if (my_errno == EACCES && my_stat(path, &input_file_stat, MYF(0)) &&
MY_S_ISDIR(input_file_stat.st_mode))
my_snprintf(buff, sizeof(buff), "Can't read from a directory '%.*s'",
FN_REFLEN, path);
else
#endif
my_snprintf(buff, sizeof(buff), "Failed to open file '%.*s', error: %d",
FN_REFLEN, path, my_errno);
put_info(buff, INFO_ERROR, 0);
return 0;
}
}
else
{
file= my_fileno(stdin);
}
if (my_fstat(file, &input_file_stat, MYF(0)))
{
my_snprintf(buff, sizeof(buff), "Failed to stat file '%.*s', error: %d",
FN_REFLEN, path ? path : "stdin", my_errno);
goto err1;
}
if (MY_S_ISDIR(input_file_stat.st_mode))
{
my_snprintf(buff, sizeof(buff), "Can't read from a directory '%.*s'",
FN_REFLEN, path ? path : "stdin");
goto err1;
}
#ifndef _WIN32
if (MY_S_ISBLK(input_file_stat.st_mode))
{
my_snprintf(buff, sizeof(buff), "Can't read from a block device '%.*s'",
FN_REFLEN, path ? path : "stdin");
goto err1;
}
#endif
if (!(line_buff= (LINE_BUFFER*) my_malloc(PSI_NOT_INSTRUMENTED,
sizeof(*line_buff),
MYF(MY_WME | MY_ZEROFILL))))
{
goto err;
}
if (init_line_buffer(line_buff, file, IO_SIZE, max_size))
{
my_free(line_buff);
goto err;
}
return line_buff;
err1:
put_info(buff, INFO_ERROR, 0);
err:
if (path)
my_close(file, MYF(0));
return 0;
}
static int delimiter_index= -1;
static int charset_index= -1;
static int sandbox_index= -1;
@@ -1290,10 +1372,8 @@ int main(int argc,char *argv[])
}
if (status.batch && !status.line_buff &&
!(status.line_buff= batch_readline_init(MAX_BATCH_BUFFER_SIZE, stdin)))
!(status.line_buff= batch_readline_init(MAX_BATCH_BUFFER_SIZE, NULL)))
{
put_info("Can't initialize batch_readline - may be the input source is "
"a directory or a block device.", INFO_ERROR, 0);
free_defaults(defaults_argv);
my_end(0);
exit(1);
@@ -4742,11 +4822,9 @@ static int com_connect(String *buffer, char *line)
static int com_source(String *, char *line)
{
char source_name[FN_REFLEN], *end, *param;
char full_path[FN_REFLEN];
LINE_BUFFER *line_buff;
int error;
STATUS old_status;
FILE *sql_file;
my_bool save_ignore_errors;
if (status.sandbox)
@@ -4766,27 +4844,10 @@ static int com_source(String *, char *line)
end--;
end[0]=0;
unpack_filename(source_name,source_name);
/* open file name */
if (!(sql_file = my_fopen(source_name, O_RDONLY | O_BINARY,MYF(0))))
{
if (script_dir)
{
snprintf(full_path, sizeof(full_path), "%s/%s", script_dir, source_name);
sql_file = my_fopen(full_path, O_RDONLY | O_BINARY, MYF(0));
}
}
if (!sql_file)
if (!(line_buff= batch_readline_init(MAX_BATCH_BUFFER_SIZE, source_name)))
{
char buff[FN_REFLEN + 60];
sprintf(buff, "Failed to open file '%s', error: %d", source_name, errno);
return put_info(buff, INFO_ERROR, 0);
}
if (!(line_buff= batch_readline_init(MAX_BATCH_BUFFER_SIZE, sql_file)))
{
my_fclose(sql_file,MYF(0));
return put_info("Can't initialize batch_readline", INFO_ERROR, 0);
return ignore_errors ? -1 : 1;
}
/* Save old status */
@@ -4805,7 +4866,7 @@ static int com_source(String *, char *line)
ignore_errors= save_ignore_errors;
status=old_status; // Continue as before
in_com_source= aborted= 0;
my_fclose(sql_file,MYF(0));
my_close(line_buff->file, MYF(0));
batch_readline_end(line_buff);
/*
If we got an error during source operation, don't abort the client

View File

@@ -7311,6 +7311,85 @@ static void init_connection_pool(uint n_connections)
connection_pool.init(conn, n_connections);
}
/*
Fix permissions and ownership of given directory to be the same
as the root output directory.
The function is used for newly created database directories,
together with --dir option
This function is not thread-safe, nor does it need to be, because
it is called from the main thread only.
chmod/chown errors are ignored after the first one, with a warning printed,
so it is really the best effort attempt. We might see an error later
if the server can't write into the directory, and this will be the
real error.
On Windows, this function does nothing, because the permissions are
inherited from the parent directory anyway.
@param dirpath Directory path
*/
static void fix_permissions_and_owner(const char *dirpath)
{
#ifndef _WIN32
// Permissions and ownership of output directory (--dir)
static struct stat st_out_dir;
static bool fix_perms= true; // Try fixing permission bits
static bool fix_ownership_uid= true; // Try fixing user+group ownership
static bool fix_ownership_gid= false; // Try fixing group ownership only
static bool first_time= true;
if (first_time)
{
/* Find out permissions and ownership of output directory */
first_time= false;
if (stat(opt_dir, &st_out_dir) != 0)
{
die(EX_CONSCHECK, "Error: cannot stat output directory %s, errno %d",
opt_dir, errno);
}
}
/* Change permissions to be the same as for the output directory*/
if (fix_perms &&
chmod(dirpath, st_out_dir.st_mode & (S_IRWXU|S_IRWXG|S_IRWXO)))
{
fprintf(stderr,
"Warning: cannot set permissions on directory %s, errno %d\n",
dirpath, errno);
fix_perms= false;
}
/*
Change ownership to be the same as backup root dir.
If user can't be changed, try changing owner group only.
*/
if (fix_ownership_uid &&
chown(dirpath, st_out_dir.st_uid, st_out_dir.st_gid))
{
// No warning, error is expected, unless current user is root.
fix_ownership_uid= false;
fix_ownership_gid= true;
}
if (fix_ownership_gid && chown(dirpath, -1, st_out_dir.st_gid))
{
if (!(st_out_dir.st_mode & S_IWOTH))
{
/* Only warn if directory is not world-writable (group ownership
matters more in this case), to avoid spamming stderr.*/
fprintf(stderr,
"Warning: cannot set group ownership on directory %s, errno %d\n",
dirpath, errno);
}
fix_ownership_gid= false;
}
#endif
}
/*
If --dir option is in use, ensure that output directory for given db
exists.
@@ -7330,6 +7409,7 @@ static void ensure_out_dir_exists(const char *db)
}
if (my_mkdir(outdir, 0777, MYF(MY_WME)))
die(EX_MYSQLERR, "Error creating directory %s", outdir);
fix_permissions_and_owner(outdir);
}

View File

@@ -23,38 +23,11 @@
#include <my_dir.h>
#include "my_readline.h"
static bool init_line_buffer(LINE_BUFFER *buffer,File file,ulong size,
ulong max_size);
static bool init_line_buffer_from_string(LINE_BUFFER *buffer,char * str);
static size_t fill_buffer(LINE_BUFFER *buffer);
static char *intern_read_line(LINE_BUFFER *buffer, ulong *out_length);
LINE_BUFFER *batch_readline_init(ulong max_size,FILE *file)
{
LINE_BUFFER *line_buff;
#ifndef _WIN32
MY_STAT input_file_stat;
if (my_fstat(fileno(file), &input_file_stat, MYF(MY_WME)) ||
MY_S_ISDIR(input_file_stat.st_mode) ||
MY_S_ISBLK(input_file_stat.st_mode))
return 0;
#endif
if (!(line_buff=(LINE_BUFFER*)
my_malloc(PSI_NOT_INSTRUMENTED, sizeof(*line_buff),
MYF(MY_WME | MY_ZEROFILL))))
return 0;
if (init_line_buffer(line_buff,my_fileno(file),IO_SIZE,max_size))
{
my_free(line_buff);
return 0;
}
return line_buff;
}
char *batch_readline(LINE_BUFFER *line_buff, bool binary_mode)
{
char *pos;
@@ -105,8 +78,7 @@ LINE_BUFFER *batch_readline_command(LINE_BUFFER *line_buff, char * str)
Functions to handle buffered readings of lines from a stream
******************************************************************************/
static bool
init_line_buffer(LINE_BUFFER *buffer,File file,ulong size,ulong max_buffer)
bool init_line_buffer(LINE_BUFFER *buffer,File file,ulong size,ulong max_buffer)
{
buffer->file=file;
buffer->bufread=size;

View File

@@ -120,8 +120,8 @@ ELSEIF(DEB)
SET(WITH_ZLIB system CACHE STRING "")
SET(WITH_LIBWRAP ON)
SET(HAVE_EMBEDDED_PRIVILEGE_CONTROL ON)
# No hurd implementation
IF(NOT CMAKE_SYSTEM_PROCESSOR STREQUAL "i686-AT386")
# On Hurd systems (GNU) there is no auth socket implementation
IF(NOT CMAKE_SYSTEM_NAME STREQUAL "GNU")
SET(PLUGIN_AUTH_SOCKET YES CACHE STRING "")
ENDIF()
SET(WITH_EMBEDDED_SERVER ON CACHE BOOL "")

View File

@@ -7,12 +7,7 @@ ENDIF()
SET(CONC_WITH_SIGNCODE ${SIGNCODE})
SET(SIGN_OPTIONS ${SIGNTOOL_PARAMETERS})
SET(CONC_WITH_EXTERNAL_ZLIB ON)
SET(CLIENT_PLUGIN_PARSEC OFF)
CHECK_INCLUDE_FILES (threads.h HAVE_THREADS_H)
IF(HAVE_THREADS_H)
SET(CLIENT_PLUGIN_PARSEC DYNAMIC)
ENDIF()
IF(NOT CONC_WITH_SSL)
IF(SSL_DEFINES MATCHES "WOLFSSL")

View File

@@ -1237,7 +1237,7 @@ static void backup_file_op_fail(uint32_t space_id, int type,
msg("DDL tracking : create %" PRIu32 " \"%.*s\"",
space_id, int(len), name);
fail = !check_if_skip_table(spacename.c_str());
if (!opt_no_lock && fail &&
if (fail && !opt_no_lock &&
check_if_fts_table(spacename.c_str())) {
/* Ignore the FTS internal table because InnoDB does
create intermediate table and their associative FTS
@@ -1264,6 +1264,11 @@ static void backup_file_op_fail(uint32_t space_id, int type,
break;
case FILE_DELETE:
fail = !check_if_skip_table(spacename.c_str())
/* Ignore the FTS internal table because InnoDB may
drop intermediate table and their associative FTS
internal table as a part of inplace rollback operation.
backup_set_alter_copy_lock() downgrades the
MDL_BACKUP_DDL before inplace phase of alter */
&& !check_if_fts_table(spacename.c_str());
msg("DDL tracking : delete %" PRIu32 " \"%.*s\"",
space_id, int(len), name);
@@ -5877,6 +5882,8 @@ void CorruptedPages::backup_fix_ddl(ds_ctxt *ds_data, ds_ctxt *ds_meta)
node, 0, dest_name.c_str(),
wf_write_through, *this);
}
DBUG_MARIABACKUP_EVENT("after_backup_fix_ddl", {});
}
@@ -6120,16 +6127,12 @@ exit:
ut_ad(fil_space_t::physical_size(flags) == info.page_size);
mysql_mutex_lock(&fil_system.mutex);
fil_space_t* space = fil_space_t::create(uint32_t(info.space_id),
flags, false, 0,
FIL_ENCRYPTION_DEFAULT, true);
std::ignore = fil_space_t::create(uint32_t(info.space_id),
flags, false, 0,
FIL_ENCRYPTION_DEFAULT, true);
mysql_mutex_unlock(&fil_system.mutex);
if (space) {
*success = xb_space_create_file(real_name, info.space_id,
flags, &file);
} else {
msg("Can't create tablespace %s\n", dest_space_name);
}
*success = xb_space_create_file(real_name, info.space_id,
flags, &file);
goto exit;
}

View File

@@ -189,6 +189,9 @@ public:
ListNode *prev= pos.node_->prev;
ListNode *next= pos.node_->next;
DBUG_ASSERT(prev->next == pos.node_);
DBUG_ASSERT(next->prev == pos.node_);
prev->next= next;
next->prev= prev;
@@ -202,7 +205,7 @@ public:
}
void push_back(reference value) noexcept { insert(end(), value); }
void pop_back() noexcept { erase(end()); }
void pop_back() noexcept { erase(--end()); }
void push_front(reference value) noexcept { insert(begin(), value); }
void pop_front() noexcept { erase(begin()); }

View File

@@ -186,6 +186,15 @@ typedef struct my_uca_level_booster_t
This array is used for prefix optimization.
*/
MY_UCA_WEIGHT2 weight_strings_2bytes_to_1_or_2_weights[0x10000];
/*
A helper array to process one-character ASCII strings.
Suitable only for stand-alone characters,
which are known not to be contraction parts,
e.g. the very last character of a string.
*/
uint16 weight_1byte_to_1weight_standalone[0x100];
} MY_UCA_LEVEL_BOOSTER;

View File

@@ -75,6 +75,7 @@ extern int (*dbug_sanity)(void);
#define DBUG_PRINT(keyword,arglist) \
do if (_db_pargs_(__LINE__,keyword)) _db_doprnt_ arglist; while(0)
#define DBUG_DUMP(keyword,a1,a2) _db_dump_(__LINE__,keyword,a1,a2)
#ifdef HAVE_ATTRIBUTE_CLEANUP
#define DBUG_ENTER(a) struct _db_stack_frame_ _db_stack_frame_ __attribute__((cleanup(_db_return_))); \
@@ -94,6 +95,7 @@ extern int (*dbug_sanity)(void);
#define DBUG_RETURN(a1) return(a1)
#define DBUG_VOID_RETURN return
#define DBUG_PRINT(keyword,arglist) do{} while(0)
#define DBUG_DUMP(keyword,a1,a2) do{} while(0)
#endif
#define DBUG_EXECUTE(keyword,a1) \
@@ -111,7 +113,6 @@ extern int (*dbug_sanity)(void);
#define DBUG_SET_INITIAL(a1) _db_set_init_ (a1)
#define DBUG_PROCESS(a1) _db_process_(a1)
#define DBUG_FILE _db_fp_()
#define DBUG_DUMP(keyword,a1,a2) _db_dump_(__LINE__,keyword,a1,a2)
#define DBUG_END() _db_end_ ()
#define DBUG_LOCK_FILE _db_lock_file_()
#define DBUG_UNLOCK_FILE _db_unlock_file_()
@@ -230,7 +231,7 @@ void debug_sync_point(const char* lock_name, uint lock_timeout);
one should #include <sstream>. We intentionally avoid including it here to save
compilation time.
*/
# ifdef DBUG_OFF
# if defined DBUG_OFF || !defined DBUG_TRACE
# define DBUG_LOG(keyword, v) do {} while (0)
# else
# define DBUG_LOG(keyword, v) do { \

View File

@@ -406,6 +406,13 @@ enum mariadb_field_attr_t
#define SERVER_STATUS_ANSI_QUOTES 32768U
/*
Set for stored procedures if the select query returned a row
To check for an empty query, one must also check thd::get_sent_row_count()
*/
#define SERVER_STATUS_RETURNED_ROW (1U << 16)
/**
Server status flags that must be cleared when starting
execution of a new SQL statement.
@@ -422,7 +429,8 @@ enum mariadb_field_attr_t
SERVER_STATUS_DB_DROPPED |\
SERVER_STATUS_CURSOR_EXISTS|\
SERVER_STATUS_LAST_ROW_SENT|\
SERVER_SESSION_STATE_CHANGED)
SERVER_SESSION_STATE_CHANGED|\
SERVER_STATUS_RETURNED_ROW)
#define MYSQL_ERRMSG_SIZE 512
#define NET_READ_TIMEOUT 30 /* Timeout on read */

View File

@@ -0,0 +1 @@
#File is generated by ColumnstoreLibrary.cmake, do not edit

View File

@@ -0,0 +1,6 @@
# Check if connect engine is loaded and enabled
if (`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'CONNECT' AND support IN ('YES', 'DEFAULT', 'ENABLED')`)
{
--skip Test requires connect engine
}

View File

@@ -5,7 +5,7 @@ if (!$_galera_variables_delta) {
--let $galera_variables_delta=0
}
--let $galera_variables_expected=`SELECT 51 + $galera_variables_delta`
--let $galera_variables_expected=`SELECT 50 + $galera_variables_delta`
--let $galera_variables_count=`SELECT COUNT(*) FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME LIKE 'wsrep%'`

View File

@@ -67,3 +67,156 @@ rm -fv crldir/*
cp -v client-cert.crl crldir/`openssl x509 -in client-cert.pem -noout -issuer_hash`.r0
rm -rf demoCA
# --- Certificate Chain ---
# These tests are inspired from the following commit from MySQL Server
# https://github.com/mysql/mysql-server/commit/969afef933f1872c5f38ea93047ef05c4509c335
#
# Credits to salman.s.khan@oracle.com
#
# -------------------------------------------------------------------------------------
#
# STEPS TO GENERATE THE FOLLOWING CHAINED CERTIFICATES WHICH IS USED IN THE TEST CASE :
#
# +---------+
# | Root CA |
# +---------+
# |
# /------------+-----------\
# | |
# +------------------+ +------------------+
# | Intermediate CA1 | | Intermediate CA2 |
# +------------------+ +------------------+
# | |
# +-------------+ +-------------+
# | Server | | Client |
# | certificate | | certificate |
# +-------------+ +-------------+
cd cachain
mkdir ca
mkdir server
mkdir clients
mkdir ca/root.certs
touch ca/root.index.txt
touch ca/root.index.txt.attr
echo '01' > ca/root.serial
cat > ca/root.cfg << EOF
[ ca ]
default_ca = CA_default
[ CA_default ]
dir = $PWD/ca
certs = \$dir/certs
database = \$dir/root.index.txt
serial = \$dir/root.serial
policy= policy_match
[ policy_match ]
organizationName = match
organizationalUnitName = optional
commonName = supplied
emailAddress = optional
[ v3_ca ]
subjectKeyIdentifier=hash
authorityKeyIdentifier=keyid:always,issuer
basicConstraints = critical,CA:TRUE
keyUsage = critical,keyCertSign,cRLSign
[ v3_ca_intermediate ]
subjectKeyIdentifier=hash
authorityKeyIdentifier=keyid:always,issuer
basicConstraints = critical,CA:TRUE,pathlen:0
keyUsage = critical,keyCertSign,cRLSign
EOF
# Generate Root CA key and cert
openssl genrsa -out ca/root.key 4096
openssl req -new -x509 '-sha256' -key ca/root.key -out ca/root.crt -days 7200 -subj "/O=MariaDB/OU=MariaDB/CN=Root CA" -config ca/root.cfg -extensions v3_ca
# Generate Intermediate CA1 key and cert
openssl genrsa -out ca/intermediate_ca1.key 4096
openssl req -new '-sha256' -key ca/intermediate_ca1.key -out ca/intermediate_ca1.csr -subj "/O=MariaDB/OU=MariaDB/CN=Intermediate CA1"
openssl ca -batch -days 7200 -notext -md sha256 -in ca/intermediate_ca1.csr -out ca/intermediate_ca1.crt -keyfile ca/root.key -cert ca/root.crt -outdir ca/root.certs/ -config ca/root.cfg -extensions v3_ca_intermediate
mkdir ca/intermediate_ca1.certs
touch ca/intermediate_ca1.index.txt
touch ca/intermediate_ca1.index.txt.attr
echo '01' > ca/intermediate_ca1.serial
cat > ca/intermediate_ca1.cfg << EOF
[ ca ]
default_ca = CA_default
[ CA_default ]
dir = $PWD/ca
certs = \$dir/intermediate_ca1.certs
database = \$dir/intermediate_ca1.index.txt
serial = \$dir/intermediate_ca1.serial
policy= policy_match
[ policy_match ]
commonName = supplied
[ alt_names ]
DNS.1 = localhost
IP.1 = 127.0.0.1
[ server_cert ]
basicConstraints = CA:FALSE
keyUsage = critical,digitalSignature,keyEncipherment
extendedKeyUsage = serverAuth
subjectAltName = @alt_names
EOF
# Generate Server key and cert
openssl genrsa -out server/server.key 4096
openssl req -new '-sha256' -key server/server.key -out server/server.csr -subj "/CN=localhost"
openssl ca -batch -days 7200 -notext -md sha256 -in server/server.csr -out server/server.crt -keyfile ca/intermediate_ca1.key -cert ca/intermediate_ca1.crt -outdir ca/intermediate_ca1.certs/ -config ca/intermediate_ca1.cfg -extensions server_cert
# Generate Intermediate CA2 key and cert
openssl genrsa -out ca/intermediate_ca2.key 4096
openssl req -new '-sha256' -key ca/intermediate_ca2.key -out ca/intermediate_ca2.csr -subj "/O=MariaDB/OU=MariaDB/CN=Intermediate CA2"
openssl ca -batch -days 7200 -notext -md sha256 -in ca/intermediate_ca2.csr -out ca/intermediate_ca2.crt -keyfile ca/root.key -cert ca/root.crt -outdir ca/root.certs/ -config ca/root.cfg -extensions v3_ca_intermediate
mkdir ca/intermediate_ca2.certs
touch ca/intermediate_ca2.index.txt
touch ca/intermediate_ca2.index.txt.attr
echo '01' > ca/intermediate_ca2.serial
cat > ca/intermediate_ca2.cfg << EOF
[ ca ]
default_ca = CA_default
[ CA_default ]
dir = $PWD/ca
certs = \$dir/intermediate_ca2.certs
database = \$dir/intermediate_ca2.index.txt
serial = \$dir/intermediate_ca2.serial
policy= policy_match
[ policy_match ]
commonName = supplied
[ client_cert ]
basicConstraints = CA:FALSE
keyUsage = critical,digitalSignature,keyEncipherment
extendedKeyUsage = clientAuth
EOF
# Generate Client key and cert
openssl genrsa -out clients/client.key 4096
openssl req -new '-sha256' -key clients/client.key -out clients/client.csr -subj "/CN=client"
openssl ca -batch -days 7200 -notext -md sha256 -in clients/client.csr -out clients/client.crt -keyfile ca/intermediate_ca2.key -cert ca/intermediate_ca2.crt -outdir ca/intermediate_ca2.certs/ -config ca/intermediate_ca2.cfg -extensions client_cert
cat server/server.crt ca/intermediate_ca1.crt > server/server.cachain
cat clients/client.crt ca/intermediate_ca2.crt > clients/client.cachain
cat ca/root.crt ca/intermediate_ca1.crt > ca/root_intermediate_ca1.crt
# Generate Unrelated Root CA key and cert
openssl genrsa -out ca/unrelated_root.key 4096
openssl req -new -x509 '-sha256' -key ca/unrelated_root.key -out ca/unrelated_root.crt -days 7200 -subj "/O=MariaDB/OU=MariaDB/CN=Root CA" -config ca/root.cfg -extensions v3_ca
cp -v ca/root.crt ca/root_intermediate_ca1.crt ca/unrelated_root.crt server/server.key server/server.cachain clients/client.key clients/client.cachain ./
rm -rf ca server clients
cd ..

View File

@@ -0,0 +1,3 @@
--ssl-ca=$MYSQL_TEST_DIR/std_data/cachain/root.crt
--ssl-key=$MYSQL_TEST_DIR/std_data/cachain/server.key
--ssl-cert=$MYSQL_TEST_DIR/std_data/cachain/server.cachain

View File

@@ -0,0 +1,12 @@
call mtr.add_suppression("Server SSL certificate doesn't verify");
CREATE USER 'user1'@'%' REQUIRE SSL;
Variable_name Value
Ssl_version TLS
Restart server and provide ssl-ca comprising intermediate_ca1 in addition to the root ca.
Variable_name Value
Ssl_version TLS
Restart server and provide unrelated ssl-ca at server startup
ERROR 2026 (HY000): TLS/SSL error:
DROP USER 'user1';

View File

@@ -0,0 +1,74 @@
# These tests are inspired from the following commit from MySQL Server
# https://github.com/mysql/mysql-server/commit/969afef933f1872c5f38ea93047ef05c4509c335
# Credits to salman.s.khan@oracle.com
#####################################################################################
# This test verifies MariaDB can handle chained ssl certificate
# This test uses chained ssl certificates which is depicted as
# below:-
#
# +---------+
# | Root CA |
# +---------+
# |
# /------------+-----------\
# | |
# +------------------+ +------------------+
# | Intermediate CA1 | | Intermediate CA2 |
# +------------------+ +------------------+
# | |
# +-------------+ +-------------+
# | Server | | Client |
# | certificate | | certificate |
# +-------------+ +-------------+
#
# certificates that may be helpful for chain construction.
# In order to validate server cert correctly, we need to
# provide the trusted root certificate and the untrusted
# intermediate certificates as part of ssl-ca. Hence
# root_intermediate_ca1.crt (trusted root certificate +
# untrusted intermediate ca1 certificate) is passed as with
# --ssl-ca option
--source include/not_embedded.inc
--source include/have_ssl_communication.inc
#Suppress warning by the server certificate verification check: unrelated CA
call mtr.add_suppression("Server SSL certificate doesn't verify");
CREATE USER 'user1'@'%' REQUIRE SSL;
--replace_result TLSv1.3 TLS TLSv1.2 TLS
--exec $MYSQL --host=localhost -P $MASTER_MYPORT --user=user1 --ssl-verify-server-cert --ssl-ca=$MYSQL_TEST_DIR/std_data/cachain/root.crt --ssl-cert=$MYSQL_TEST_DIR/std_data/cachain/client.cachain --ssl-key=$MYSQL_TEST_DIR/std_data/cachain/client.key -e "SHOW STATUS LIKE 'ssl_version'"
--echo
--echo Restart server and provide ssl-ca comprising intermediate_ca1 in addition to the root ca.
--write_line wait $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--shutdown_server
--source include/wait_until_disconnected.inc
--write_line "restart:--ssl-ca=$MYSQL_TEST_DIR/std_data/cachain/root_intermediate_ca1.crt --ssl-key=$MYSQL_TEST_DIR/std_data/cachain/server.key --ssl-cert=$MYSQL_TEST_DIR/std_data/cachain/server.cachain" $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--enable_reconnect
--source include/wait_until_connected_again.inc
--replace_result TLSv1.3 TLS TLSv1.2 TLS
--exec $MYSQL --host=localhost -P $MASTER_MYPORT --user=user1 --ssl-verify-server-cert --ssl-ca=$MYSQL_TEST_DIR/std_data/cachain/root.crt --ssl-cert=$MYSQL_TEST_DIR/std_data/cachain/client.cachain --ssl-key=$MYSQL_TEST_DIR/std_data/cachain/client.key -e "SHOW STATUS LIKE 'ssl_version'"
--echo
--echo Restart server and provide unrelated ssl-ca at server startup
--write_line wait $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--shutdown_server
--source include/wait_until_disconnected.inc
--write_line "restart:--ssl-ca=$MYSQL_TEST_DIR/std_data/cachain/unrelated_root.crt --ssl-key=$MYSQL_TEST_DIR/std_data/cachain/server.key --ssl-cert=$MYSQL_TEST_DIR/std_data/cachain/server.cachain" $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--enable_reconnect
--source include/wait_until_connected_again.inc
--replace_regex /(ERROR 2026 \(HY000\): TLS\/SSL error:).*/\1/
--error 1
--exec $MYSQL --host=localhost -P $MASTER_MYPORT --user=user1 --ssl-verify-server-cert --ssl-ca=$MYSQL_TEST_DIR/std_data/cachain/unrelated_root.crt --ssl-cert=$MYSQL_TEST_DIR/std_data/cachain/client.cachain --ssl-key=$MYSQL_TEST_DIR/std_data/cachain/client.key -e "SHOW STATUS LIKE 'ssl_version'" 2>&1
--echo
# Cleanup
DROP USER 'user1';

View File

@@ -470,7 +470,7 @@ t1 CREATE TABLE `t1` (
KEY `a126_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`),
KEY `a127_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`),
KEY `a128_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
flush tables;
show create table t1;
Table Create Table
@@ -619,7 +619,7 @@ t1 CREATE TABLE `t1` (
KEY `a126_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`),
KEY `a127_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`),
KEY `a128_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
drop table t1;
create table t1 (c1 int, c2 int, c3 int, c4 int, c5 int, c6 int, c7 int,
c8 int, c9 int, c10 int, c11 int, c12 int, c13 int, c14 int, c15 int, c16 int);
@@ -1092,7 +1092,7 @@ t1 CREATE TABLE `t1` (
KEY `a126_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`),
KEY `a127_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`),
KEY `a128_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
flush tables;
show create table t1;
Table Create Table
@@ -1241,7 +1241,7 @@ t1 CREATE TABLE `t1` (
KEY `a126_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`),
KEY `a127_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`),
KEY `a128_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
alter table t1 add key
a129_long_123456789_123456789_123456789_123456789_123456789_1234 (
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16);

View File

@@ -6058,4 +6058,111 @@ drop table t1;
#
SELECT ( WITH RECURSIVE x AS ( WITH x AS ( SELECT 1 FROM t14 ) SELECT x ) , t14 AS ( SELECT 1 UNION SELECT 'x' FROM x ) SELECT x FROM x WHERE ( SELECT x FROM x ) ) ;
ERROR 42S22: Unknown column 'x' in 'SELECT'
#
# MDEV-32299 Segfault when preparing unreferenced select in recursive CTE
#
SELECT ( WITH RECURSIVE x AS ( SELECT * FROM ( SELECT UTC_TIMESTAMP FROM ( SELECT ( WITH x AS ( WITH x AS ( SELECT * FROM x ) SELECT 1 ) SELECT 1 ) ) x ) x UNION SELECT NULL ) ( SELECT x FROM x ) ) ;
ERROR 42S22: Unknown column 'x' in 'SELECT'
select (
with recursive x as (
select * from (
select utc_timestamp
from (
select (
with x as (
with x as (
select * from x
)
select 1
)
select 1
) s
) y
) z
union
select null
)
(select x from x)
);
ERROR 42S22: Unknown column 'x' in 'SELECT'
select (
with recursive r as (
select * from (
with a as (
select * from r
)
select 1
) y
union
select 1
)
(select * from r)
);
(
with recursive r as (
select * from (
with a as (
select * from r
)
select 1
) y
union
select 1
)
(select * from r)
)
1
create table t1 (x int);
with recursive r as (
select f1 from (
with a as (
select x from t1
)
select 1 as f1
) y
union
select null
)
(select * from r);
f1
1
NULL
with recursive r as (
select f1 from (
with a as (
select f2 from t1
)
select 1 as f1
) y
union
select null
)
(select * from r);
ERROR 42S22: Unknown column 'f2' in 'SELECT'
drop table t1;
with recursive r as (
select 1 as f1
union
select f1 from (
with a as (
select f1 from r
)
select 1 as f1
) y
)
(select f1 from r);
f1
1
with recursive r as (
select 1 as f1
union
select f1 from (
with a as (
select f2 from r
)
select 1 as f1
) y
)
(select f1 from r);
ERROR 42S22: Unknown column 'f2' in 'SELECT'
# End of 10.6 tests

View File

@@ -3,6 +3,8 @@
--source include/no_msan_without_big.inc
--source include/not_valgrind.inc
--source include/have_innodb.inc
# --view-protocol fails due to MDEV-37119 for MDEV-32299
--source include/no_view_protocol.inc
create table t1 (a int, b varchar(32));
insert into t1 values
@@ -4066,4 +4068,121 @@ drop table t1;
--error ER_BAD_FIELD_ERROR
SELECT ( WITH RECURSIVE x AS ( WITH x AS ( SELECT 1 FROM t14 ) SELECT x ) , t14 AS ( SELECT 1 UNION SELECT 'x' FROM x ) SELECT x FROM x WHERE ( SELECT x FROM x ) ) ;
--echo #
--echo # MDEV-32299 Segfault when preparing unreferenced select in recursive CTE
--echo #
# As in bug report
--error ER_BAD_FIELD_ERROR
SELECT ( WITH RECURSIVE x AS ( SELECT * FROM ( SELECT UTC_TIMESTAMP FROM ( SELECT ( WITH x AS ( WITH x AS ( SELECT * FROM x ) SELECT 1 ) SELECT 1 ) ) x ) x UNION SELECT NULL ) ( SELECT x FROM x ) ) ;
#0 0x00005555569dff7b in TABLE_LIST::reset_const_table (this=0x7fffe0019938) at ../src/sql/table.cc:9615
#1 0x00005555569dffd4 in TABLE_LIST::reset_const_table (this=0x7fffe001a8c0) at ../src/sql/table.cc:9622
--error ER_BAD_FIELD_ERROR
select (
with recursive x as (
select * from (
select utc_timestamp
from (
select (
with x as (
with x as (
select * from x
)
select 1
)
select 1
) s
) y
) z
union
select null
)
(select x from x)
);
#6 0x00007ffff7639206 in __assert_fail (assertion=0x555555e121b6 "table_ref->table || table_ref->view", file=0x555555cdf138 "../src/sql/table.cc", line=7305, function=0x555555e30e24 "void Field_iterator_table_ref::set_field_iterator()") at ./assert/assert.c:101
#7 0x00005555569da013 in Field_iterator_table_ref::set_field_iterator (this=0x7ffff0a9afc0) at ../src/sql/table.cc:7305
select (
with recursive r as (
select * from (
with a as (
select * from r
)
select 1
) y
union
select 1
)
(select * from r)
);
# Field resolution in unreferenced:
create table t1 (x int);
with recursive r as (
select f1 from (
with a as (
select x from t1
)
select 1 as f1
) y
union
select null
)
(select * from r);
--error ER_BAD_FIELD_ERROR
with recursive r as (
select f1 from (
with a as (
select f2 from t1
)
select 1 as f1
) y
union
select null
)
(select * from r);
drop table t1;
with recursive r as (
select 1 as f1
union
select f1 from (
with a as (
select f1 from r
)
select 1 as f1
) y
)
(select f1 from r);
--error ER_BAD_FIELD_ERROR
with recursive r as (
select 1 as f1
union
select f1 from (
with a as (
select f2 from r
)
select 1 as f1
) y
)
(select f1 from r);
--echo # End of 10.6 tests

View File

@@ -225,3 +225,4 @@ show status like "Feature_vector_index";
Variable_name Value
Feature_vector_index 2
drop table t1;
# End of 11.8 tests

View File

@@ -171,6 +171,7 @@ show status like "feature_into_%";
--echo # Feature vector index
--echo #
--disable_service_connection
create table t1 (id int auto_increment primary key,
u vector(5) not null, vector index (u));
select * from t1;
@@ -178,3 +179,6 @@ select * from t1;
select * from t1;
show status like "Feature_vector_index";
drop table t1;
--enable_service_connection
--echo # End of 11.8 tests

View File

@@ -5371,9 +5371,10 @@ SET CHARACTER SET default;
SELECT json_array_intersect(@a,@b);
json_array_intersect(@a,@b)
NULL
#
# MDEV-36809: json_array_intersect crashs when unused table ref provided
#
select json_array_intersect('[["1", "7"], ["2", "6"], ["4", "5"], ["3", "8"]]', '[["2","6"],["3","8"],["4","5"],["1","7"]]') as result from mysql.user;
select json_array_intersect('[["1", "7"], ["2", "6"], ["4", "5"], ["3", "8"]]', '[["2","6"],["3","8"],["4","5"],["1","7"]]') as result from (values (1),(2),(3),(4),(5)) x;
result
[["2", "6"], ["3", "8"], ["4", "5"], ["1", "7"]]
[["2", "6"], ["3", "8"], ["4", "5"], ["1", "7"]]
@@ -5386,11 +5387,16 @@ result
#
# MDEV-37864: mysql-test/mtr --cursor main.func_json fails
#
select json_array_intersect('[["1", "7"], ["2", "6"], ["4", "5"], ["3", "8"]]', '[["2","6"],["3","8"],["4","5"],["1","7"]]') as result from mysql.user;
select json_array_intersect('[["1", "7"], ["2", "6"], ["4", "5"], ["3", "8"]]', '[["2","6"],["3","8"],["4","5"],["1","7"]]') as result from (values (1),(2),(3),(4),(5)) x;
result
[["2", "6"], ["3", "8"], ["4", "5"], ["1", "7"]]
[["2", "6"], ["3", "8"], ["4", "5"], ["1", "7"]]
[["2", "6"], ["3", "8"], ["4", "5"], ["1", "7"]]
[["2", "6"], ["3", "8"], ["4", "5"], ["1", "7"]]
[["2", "6"], ["3", "8"], ["4", "5"], ["1", "7"]]
#
# MDEV-33640: Server crashes at my_hash_free
#
SELECT JSON_SCHEMA_VALID('{"properties": "a_string": {"pattern": "^[5-9]$"}}}', '{"a_string": "8"}');
ERROR HY000: Invalid value for keyword properties
# End of 11.4 Test

View File

@@ -4265,15 +4265,24 @@ SET CHARACTER SET default;
SELECT json_array_intersect(@a,@b);
--echo #
--echo # MDEV-36809: json_array_intersect crashs when unused table ref provided
--echo #
select json_array_intersect('[["1", "7"], ["2", "6"], ["4", "5"], ["3", "8"]]', '[["2","6"],["3","8"],["4","5"],["1","7"]]') as result from mysql.user;
select json_array_intersect('[["1", "7"], ["2", "6"], ["4", "5"], ["3", "8"]]', '[["2","6"],["3","8"],["4","5"],["1","7"]]') as result from (values (1),(2),(3),(4),(5)) x;
SELECT ( WITH x AS ( WITH x ( x ) AS ( SELECT ( 1.000000 ) ) SELECT x FROM x ) SELECT * FROM x WHERE ( SELECT AVG ( x ) OVER ( ORDER BY JSON_ARRAY_INTERSECT ( '[["1", "7"], ["2", "6"], ["3", "8"]]' , '[["2","6"],["3","8"],["4","5"],["1","7"]]' ) ) FROM x ) ) as result;
--echo #
--echo # MDEV-37864: mysql-test/mtr --cursor main.func_json fails
--echo #
select json_array_intersect('[["1", "7"], ["2", "6"], ["4", "5"], ["3", "8"]]', '[["2","6"],["3","8"],["4","5"],["1","7"]]') as result from mysql.user;
select json_array_intersect('[["1", "7"], ["2", "6"], ["4", "5"], ["3", "8"]]', '[["2","6"],["3","8"],["4","5"],["1","7"]]') as result from (values (1),(2),(3),(4),(5)) x;
--echo #
--echo # MDEV-33640: Server crashes at my_hash_free
--echo #
--error ER_JSON_INVALID_VALUE_FOR_KEYWORD
SELECT JSON_SCHEMA_VALID('{"properties": "a_string": {"pattern": "^[5-9]$"}}}', '{"a_string": "8"}');
--echo # End of 11.4 Test

View File

@@ -791,7 +791,7 @@ SELECT 'AB' RLIKE 'A# this is a comment\nB';
'AB' RLIKE 'A B'
1
SELECT 'AB' RLIKE 'A# this is a comment\nB';
'AB' RLIKE 'A# this is a comment\nB'
'AB' RLIKE 'A# this is a comment\nB'
1
SET default_regex_flags=DEFAULT;
SELECT 'Aq' RLIKE 'A\\q';

View File

@@ -382,6 +382,8 @@ SELECT 'AB' RLIKE 'A B';
SELECT 'AB' RLIKE 'A# this is a comment\nB';
SET default_regex_flags=DEFAULT;
# pcre2 versions differ in the reported error offset for invalid escapes
--replace_regex /offset 2/offset 3/
--error ER_REGEXP_ERROR
SELECT 'Aq' RLIKE 'A\\q';

View File

@@ -371,7 +371,7 @@ insert into t1 values ('85984',GeomFromText('MULTIPOLYGON(((-115.006363
# Expected results are 115.2970604672862 and 36.23335610879993, but IA64 returns
# slightly different values due to fused multiply-add instructions.
--replace_result 115.29706047613604 115.2970604672862 36.23335611157958 36.23335610879993
--replace_regex /115.2970604[67]\d+/115.2970604672862/ /36.233356111579\d+/36.23335610879993/
select object_id, geometrytype(geo), ISSIMPLE(GEO), ASTEXT(centroid(geo)) from
t1 where object_id=85998;

View File

@@ -14,11 +14,9 @@ GRANT ALL PRIVILEGES ON *.* TO bar@localhost;
REVOKE CONNECTION ADMIN ON *.* FROM bar@localhost;
connect foo,localhost,foo,,;
connect bar,localhost,bar,,;
SELECT user FROM information_schema.processlist ORDER BY user;
SELECT user FROM information_schema.processlist WHERE id=$id;
user
bar
foo
root
KILL ID;
ERROR HY000: You are not owner of thread ID
disconnect foo;
@@ -35,11 +33,9 @@ CREATE USER bar@localhost;
GRANT PROCESS, CONNECTION ADMIN ON *.* TO bar@localhost;
connect foo,localhost,foo,,;
connect bar,localhost,bar,,;
SELECT user FROM information_schema.processlist ORDER BY user;
SELECT user FROM information_schema.processlist WHERE id=$id;
user
bar
foo
root
KILL ID;
connection default;
disconnect foo;

View File

@@ -19,9 +19,9 @@ CREATE USER bar@localhost;
GRANT ALL PRIVILEGES ON *.* TO bar@localhost;
REVOKE CONNECTION ADMIN ON *.* FROM bar@localhost;
--connect (foo,localhost,foo,,)
let $id=`(SELECT id FROM INFORMATION_SCHEMA.PROCESSLIST WHERE user='foo')`;
let $id=`select connection_id()`;
--connect (bar,localhost,bar,,)
SELECT user FROM information_schema.processlist ORDER BY user;
evalp SELECT user FROM information_schema.processlist WHERE id=$id;
--replace_result $id ID
--error ER_KILL_DENIED_ERROR
--eval KILL $id
@@ -40,9 +40,9 @@ GRANT SELECT ON *.* TO foo@localhost;
CREATE USER bar@localhost;
GRANT PROCESS, CONNECTION ADMIN ON *.* TO bar@localhost;
--connect (foo,localhost,foo,,)
let $id=`(SELECT id FROM INFORMATION_SCHEMA.PROCESSLIST WHERE user='foo')`;
let $id=`select connection_id()`;
--connect (bar,localhost,bar,,)
SELECT user FROM information_schema.processlist ORDER BY user;
evalp SELECT user FROM information_schema.processlist WHERE id=$id;
--replace_result $id ID
--eval KILL $id
--connection default

View File

@@ -180,7 +180,7 @@ F 17
EXPLAIN SELECT c1, max(i2) FROM t1 WHERE (c1 = 'C' OR c1 = 'F' ) AND ( i2 = 17 )
GROUP BY c1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range k1 k1 5 NULL 2 Using where
1 SIMPLE t1 range k1 k1 5 NULL 2 Using where; Using index for group-by
SELECT c1, max(i2) FROM t1 WHERE (c1 = 'C' OR c1 = 'F' ) AND ( i2 = 17 )
GROUP BY c1;
c1 max(i2)
@@ -438,6 +438,43 @@ disconnect con1;
connection default;
DROP TABLE t1;
SET GLOBAL innodb_lru_scan_depth= @lru_depth.save;
#
# MDEV-38426: Clustered PK not used for Loose Index Scan optimization
#
create table t1 (
col1 int not null,
col2 int not null,
col3 int,
primary key(col1, col2)
) engine=innodb;
insert into t1 select
A.seq,
B.seq,
A.seq
from
seq_1_to_10 A,
seq_1_to_1000 B;
analyze table t1;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
# This must use Loose Scan:
explain select distinct col1 from t1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range NULL PRIMARY 4 NULL 11 Using index for group-by
# This must use Loose Scan:
explain select col1 from t1 group by col1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range NULL PRIMARY 4 NULL 11 Using index for group-by
# This must use Loose Scan:
explain select col1, min(col2) from t1 group by col1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range NULL PRIMARY 4 NULL 11 Using index for group-by
# This will not use Loose Index Scan as col3 is not in PK:
explain select col1, min(col2), col3 from t1 group by col1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index NULL PRIMARY 8 NULL 10000
drop table t1;
set global innodb_stats_persistent= @innodb_stats_persistent_save;
set global innodb_stats_persistent_sample_pages=
@innodb_stats_persistent_sample_pages_save;

View File

@@ -323,6 +323,40 @@ while ($run)
DROP TABLE t1;
SET GLOBAL innodb_lru_scan_depth= @lru_depth.save;
--echo #
--echo # MDEV-38426: Clustered PK not used for Loose Index Scan optimization
--echo #
--source include/have_sequence.inc
create table t1 (
col1 int not null,
col2 int not null,
col3 int,
primary key(col1, col2)
) engine=innodb;
insert into t1 select
A.seq,
B.seq,
A.seq
from
seq_1_to_10 A,
seq_1_to_1000 B;
analyze table t1;
--echo # This must use Loose Scan:
explain select distinct col1 from t1;
--echo # This must use Loose Scan:
explain select col1 from t1 group by col1;
--echo # This must use Loose Scan:
explain select col1, min(col2) from t1 group by col1;
--echo # This will not use Loose Index Scan as col3 is not in PK:
explain select col1, min(col2), col3 from t1 group by col1;
drop table t1;
set global innodb_stats_persistent= @innodb_stats_persistent_save;
set global innodb_stats_persistent_sample_pages=
@innodb_stats_persistent_sample_pages_save;

View File

@@ -485,7 +485,7 @@ SELECT * FROM City
WHERE ID BETWEEN 3701 AND 4000 AND Population > 1000000
AND Country BETWEEN 'S' AND 'Z';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Population 4,4 NULL # Using sort_intersect(PRIMARY,Population); Using where
1 SIMPLE City range PRIMARY,Population,Country PRIMARY 4 NULL # Using where
EXPLAIN
SELECT * FROM City
WHERE ID BETWEEN 3001 AND 4000 AND Population > 600000

View File

@@ -5,7 +5,7 @@
select count(*) from lineitem where l_orderkey=130 and l_shipdate='1992-07-01';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity i_l_shipdate 8 const,const 1 Using index
+1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity i_l_shipdate 4 const 6 Using where; Using index
+1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 const 5 Using where
flush status;
select count(*) from lineitem where l_orderkey=130 and l_shipdate='1992-07-01';
count(*)
@@ -14,7 +14,7 @@
Handler_read_key 1
Handler_read_last 0
-Handler_read_next 1
+Handler_read_next 6
+Handler_read_next 5
Handler_read_prev 0
Handler_read_retry 0
Handler_read_rnd 0
@@ -95,7 +95,7 @@
where l_shipdate='1992-07-01' and l_orderkey=130;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
+1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity i_l_shipdate 4 const 6 Using where; Using index
+1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 const 5 Using where
flush status;
select max(l_linenumber) from lineitem
where l_shipdate='1992-07-01' and l_orderkey=130;
@@ -104,7 +104,7 @@
Handler_read_key 1
Handler_read_last 0
-Handler_read_next 0
+Handler_read_next 6
+Handler_read_next 5
Handler_read_prev 0
Handler_read_retry 0
Handler_read_rnd 0

View File

@@ -121,3 +121,48 @@ connection default;
DROP DATABASE meow;
set local sql_mode=default;
set global sql_mode=default;
#
# MDEV-37950: INSERT ... RETURNING exposes columns for which
# the user lacks SELECT privilege
#
CREATE USER regular;
GRANT INSERT ON *.* TO regular;
GRANT DELETE ON *.* TO regular;
CREATE DATABASE test1;
DROP TABLE IF EXISTS test1.t_trigger_test1;
Warnings:
Note 1051 Unknown table 'test1.t_trigger_test1'
CREATE TABLE test1.t_trigger_test1 (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(50),
note VARCHAR(100)
);
CREATE TRIGGER test1.trg_before_insert
BEFORE INSERT ON test1.t_trigger_test1
FOR EACH ROW
BEGIN
SET NEW.name = CONCAT('BEFORE_', NEW.name);
END |
change_user regular,,;
INSERT INTO test1.t_trigger_test1 (name) VALUES ('Alice') RETURNING *;
ERROR 42000: SELECT command denied to user 'regular'@'localhost' for column 'id' in table 't_trigger_test1'
INSERT INTO test1.t_trigger_test1 (name) VALUES ('Alice') RETURNING id, name, note;
ERROR 42000: SELECT command denied to user 'regular'@'localhost' for column 'id' in table 't_trigger_test1'
# same for DELETE because delete with "WHERE" still requires to
# read from the table, which basically means having select privileges
DELETE FROM test1.t_trigger_test1 WHERE id=1;
ERROR 42000: SELECT command denied to user 'regular'@'localhost' for column 'id' in table 't_trigger_test1'
DELETE FROM test1.t_trigger_test1 WHERE id=1 RETURNING id;
ERROR 42000: SELECT command denied to user 'regular'@'localhost' for column 'id' in table 't_trigger_test1'
DELETE FROM test1.t_trigger_test1 WHERE id=1 RETURNING *;
ERROR 42000: SELECT command denied to user 'regular'@'localhost' for column 'id' in table 't_trigger_test1'
DELETE FROM test1.t_trigger_test1 RETURNING *;
ERROR 42000: SELECT command denied to user 'regular'@'localhost' for column 'id' in table 't_trigger_test1'
DELETE FROM test1.t_trigger_test1 RETURNING id;
ERROR 42000: SELECT command denied to user 'regular'@'localhost' for column 'id' in table 't_trigger_test1'
DELETE FROM test1.t_trigger_test1;
change_user root,,;
DROP TRIGGER test1.trg_before_insert;
DROP TABLE test1.t_trigger_test1;
DROP USER regular;
DROP DATABASE test1;

View File

@@ -158,3 +158,60 @@ DROP DATABASE meow;
set local sql_mode=default;
set global sql_mode=default;
--echo #
--echo # MDEV-37950: INSERT ... RETURNING exposes columns for which
--echo # the user lacks SELECT privilege
--echo #
CREATE USER regular;
GRANT INSERT ON *.* TO regular;
GRANT DELETE ON *.* TO regular;
CREATE DATABASE test1;
DROP TABLE IF EXISTS test1.t_trigger_test1;
CREATE TABLE test1.t_trigger_test1 (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(50),
note VARCHAR(100)
);
DELIMITER |;
CREATE TRIGGER test1.trg_before_insert
BEFORE INSERT ON test1.t_trigger_test1
FOR EACH ROW
BEGIN
SET NEW.name = CONCAT('BEFORE_', NEW.name);
END |
DELIMITER ;|
change_user regular;
--error ER_COLUMNACCESS_DENIED_ERROR
INSERT INTO test1.t_trigger_test1 (name) VALUES ('Alice') RETURNING *;
--error ER_COLUMNACCESS_DENIED_ERROR
INSERT INTO test1.t_trigger_test1 (name) VALUES ('Alice') RETURNING id, name, note;
--echo # same for DELETE because delete with "WHERE" still requires to
--echo # read from the table, which basically means having select privileges
--error ER_COLUMNACCESS_DENIED_ERROR
DELETE FROM test1.t_trigger_test1 WHERE id=1;
--error ER_COLUMNACCESS_DENIED_ERROR
DELETE FROM test1.t_trigger_test1 WHERE id=1 RETURNING id;
--error ER_COLUMNACCESS_DENIED_ERROR
DELETE FROM test1.t_trigger_test1 WHERE id=1 RETURNING *;
--error ER_COLUMNACCESS_DENIED_ERROR
DELETE FROM test1.t_trigger_test1 RETURNING *;
--error ER_COLUMNACCESS_DENIED_ERROR
DELETE FROM test1.t_trigger_test1 RETURNING id;
DELETE FROM test1.t_trigger_test1;
change_user root;
DROP TRIGGER test1.trg_before_insert;
DROP TABLE test1.t_trigger_test1;
DROP USER regular;
DROP DATABASE test1;

View File

@@ -1094,23 +1094,31 @@ NULL UNION RESULT <union1,4> ALL NULL NULL NULL NULL NULL
set sql_mode= 'oracle';
explain SELECT * from t3 union select * from u3 intersect all select * from i3;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t3 system NULL NULL NULL NULL 0 Const row not found
2 UNION u3 system NULL NULL NULL NULL 0 Const row not found
3 INTERSECT i3 system NULL NULL NULL NULL 0 Const row not found
NULL UNIT RESULT <unit1,2,3> ALL NULL NULL NULL NULL NULL
select * from t3 union select * from u3 intersect select * from i3;
1 PRIMARY <derived4> ALL NULL NULL NULL NULL 2
4 DERIVED <derived2> ALL NULL NULL NULL NULL 2
2 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table
3 UNION NULL NULL NULL NULL NULL NULL NULL no matching row in const table
NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL
5 INTERSECT NULL NULL NULL NULL NULL NULL NULL no matching row in const table
NULL INTERSECT RESULT <intersect4,5> ALL NULL NULL NULL NULL NULL
select x from t3 union select x from u3 intersect select x from i3;
x
SELECT * from t3 union select * from u3 intersect all select * from i3;
SELECT x from t3 union select x from u3 intersect all select x from i3;
x
insert into t3 values (0);
insert into i3 values (0);
Select * from t3 union select * from u3 intersect select * from i3;
Select x from t3 union select x from u3 intersect select x from i3;
x
0
SELECT * FROM t3 UNION SELECT * FROM u3 INTERSECT ALL SELECT * FROM i3;
SELECT x FROM t3 UNION SELECT x FROM u3 INTERSECT ALL SELECT x FROM i3;
x
0
create view v as select * from t3 union select * from u3 intersect select * from i3;
select * from v;
x
0
drop tables t3, u3, i3;
drop view v;
# First line of these results is column names, not the result
# (pay attention to "affected rows")
values (1, 2) union all values (1, 2);
@@ -1136,10 +1144,47 @@ values (1, 2) union all values (1, 2) union values (4, 3) union all values (4, 3
1 2
4 3
affected rows: 2
set sql_mode= default;
create table t1 (a int, b int);
create table t2 like t1;
insert t1 values (1, 2), (1, 2), (1, 2), (2, 3), (2, 3), (3, 4), (3, 4);
insert t2 values (1, 2), (1, 2), (2, 3), (2, 3), (2, 3), (2, 3), (4, 5);
select * from t1 intersect all select * from t2;
a b
1 2
2 3
1 2
2 3
select * from t1 intersect all select * from t2 union values (1, 2);
a b
1 2
2 3
select * from t1 intersect all (select * from t2 union values (1, 2));
a b
1 2
2 3
(select * from t1 intersect all select * from t2) union values (1, 2);
a b
1 2
2 3
create view v1 as select * from t1 intersect all select * from t2 union values (1, 2);
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 select `t1`.`a` AS `a`,`t1`.`b` AS `b` from `t1` intersect all select `t2`.`a` AS `a`,`t2`.`b` AS `b` from `t2` union values (1,2) latin1 latin1_swedish_ci
select * from v1;
a b
1 2
2 3
create view v2 as select * from t1 union values (1, 2) intersect all select * from t2;
show create view v2;
View Create View character_set_client collation_connection
v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS select `t1`.`a` AS `a`,`t1`.`b` AS `b` from `t1` union select `__5`.`1` AS `1`,`__5`.`2` AS `2` from (values (1,2) intersect all select `t2`.`a` AS `a`,`t2`.`b` AS `b` from `t2`) `__5` latin1 latin1_swedish_ci
select * from v2;
a b
1 2
2 3
3 4
set sql_mode= 'oracle';
select * from t1 intersect select * from t2;
a b
1 2
@@ -1169,8 +1214,6 @@ select * from t1 intersect all select * from t2 union values (1, 2);
a b
1 2
2 3
1 2
2 3
select * from t1 intersect all (select * from t2 union values (1, 2));
a b
1 2
@@ -1181,9 +1224,209 @@ a b
2 3
explain select * from t1 intersect all select * from t2 union values (1, 2);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 7
2 INTERSECT t2 ALL NULL NULL NULL NULL 7
3 UNION NULL NULL NULL NULL NULL NULL NULL No tables used
NULL UNIT RESULT <unit1,2,3> ALL NULL NULL NULL NULL NULL
1 PRIMARY <derived4> ALL NULL NULL NULL NULL 8
4 DERIVED <derived2> ALL NULL NULL NULL NULL 7
2 DERIVED t1 ALL NULL NULL NULL NULL 7
3 INTERSECT t2 ALL NULL NULL NULL NULL 7
NULL INTERSECT RESULT <intersect2,3> ALL NULL NULL NULL NULL NULL
5 UNION NULL NULL NULL NULL NULL NULL NULL No tables used
NULL UNION RESULT <union4,5> ALL NULL NULL NULL NULL NULL
show create view v1;
View Create View character_set_client collation_connection
v1 CREATE VIEW "v1" AS select "__6"."a" AS "a","__6"."b" AS "b" from (select "__4"."a" AS "a","__4"."b" AS "b" from (select "t1"."a" AS "a","t1"."b" AS "b" from "t1" intersect all select "t2"."a" AS "a","t2"."b" AS "b" from "t2") "__4" union values (1,2)) "__6" latin1 latin1_swedish_ci
select * from v1;
a b
1 2
2 3
show create view v2;
View Create View character_set_client collation_connection
v2 CREATE VIEW "v2" AS select "__7"."a" AS "a","__7"."b" AS "b" from (select "t1"."a" AS "a","t1"."b" AS "b" from "t1" union select "__5"."1" AS "1","__5"."2" AS "2" from (select "__6"."1" AS "1","__6"."2" AS "2" from (values (1,2) intersect all select "t2"."a" AS "a","t2"."b" AS "b" from "t2") "__6") "__5") "__7" latin1 latin1_swedish_ci
select * from v2;
a b
1 2
2 3
3 4
create view v3 as select * from t1 union values (1, 2) intersect all select * from t2;
show create view v3;
View Create View character_set_client collation_connection
v3 CREATE VIEW "v3" AS select "__6"."a" AS "a","__6"."b" AS "b" from (select "__8"."a" AS "a","__8"."b" AS "b" from (select "__4"."a" AS "a","__4"."b" AS "b" from (select "__6"."a" AS "a","__6"."b" AS "b" from (select "t1"."a" AS "a","t1"."b" AS "b" from "t1" union values (1,2)) "__6") "__4" intersect all select "t2"."a" AS "a","t2"."b" AS "b" from "t2") "__8") "__6" latin1 latin1_swedish_ci
select * from v3;
a b
1 2
2 3
drop tables t1, t2;
drop view v1, v2, v3;
create table t3 (x int);
create table u3 (x int);
create table i3 (x int);
create view v4 as SELECT * from t3 union select * from u3 intersect all select * from i3;
select * from v4;
x
drop tables t3, u3, i3;
drop view v4;
set sql_mode= default;
#
# MDEV-37325 Incorrect results for INTERSECT ALL in ORACLE mode
#
create table t1 (a int, b int);
create table t2 like t1;
insert t1 values (1, 2), (1, 2), (1, 2), (1, 2);
insert t2 values (1, 2), (1, 2);
select * from t1 except all select * from t2 intersect all values (1, 2);
a b
1 2
1 2
1 2
explain select * from t1 except all select * from t2 intersect all values (1, 2);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 4
4 EXCEPT <derived2> ALL NULL NULL NULL NULL 2
2 DERIVED t2 ALL NULL NULL NULL NULL 2
3 INTERSECT NULL NULL NULL NULL NULL NULL NULL No tables used
NULL INTERSECT RESULT <intersect2,3> ALL NULL NULL NULL NULL NULL
NULL EXCEPT RESULT <except1,4> ALL NULL NULL NULL NULL NULL
Explain select * from (select * from (select * from t1 except all select * from t2) __3 intersect all values (1,2)) __5;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 2
2 DERIVED <derived3> ALL NULL NULL NULL NULL 4
3 DERIVED t1 ALL NULL NULL NULL NULL 4
4 EXCEPT t2 ALL NULL NULL NULL NULL 2
NULL EXCEPT RESULT <except3,4> ALL NULL NULL NULL NULL NULL
5 INTERSECT NULL NULL NULL NULL NULL NULL NULL No tables used
NULL INTERSECT RESULT <intersect2,5> ALL NULL NULL NULL NULL NULL
create view v1 as select * from t1 except all select * from t2 intersect all values (1, 2);
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 select `t1`.`a` AS `a`,`t1`.`b` AS `b` from `t1` except all select `__5`.`a` AS `a`,`__5`.`b` AS `b` from (select `t2`.`a` AS `a`,`t2`.`b` AS `b` from `t2` intersect all values (1,2)) `__5` latin1 latin1_swedish_ci
select * from v1;
a b
1 2
1 2
1 2
drop view v1;
create view v1 as ((select * from t1 except all select * from t2) intersect all values (1, 2));
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 select `__5`.`a` AS `a`,`__5`.`b` AS `b` from (select `t1`.`a` AS `a`,`t1`.`b` AS `b` from `t1` except all select `t2`.`a` AS `a`,`t2`.`b` AS `b` from `t2`) `__5` intersect all values (1,2) latin1 latin1_swedish_ci
select * from v1;
a b
1 2
drop view v1;
explain select * from ((select * from t1 except all select * from t2) intersect all values (1, 2)) v;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY <derived5> ALL NULL NULL NULL NULL 2
5 DERIVED <derived2> ALL NULL NULL NULL NULL 4
2 DERIVED t1 ALL NULL NULL NULL NULL 4
3 EXCEPT t2 ALL NULL NULL NULL NULL 2
NULL EXCEPT RESULT <except2,3> ALL NULL NULL NULL NULL NULL
4 INTERSECT NULL NULL NULL NULL NULL NULL NULL No tables used
NULL INTERSECT RESULT <intersect5,4> ALL NULL NULL NULL NULL NULL
# Oracle: first UNION, then INTERSECT ALL
set sql_mode= 'oracle';
create view v2 as select * from t1 except all select * from t2 intersect all values (1, 2);
show create view v2;
View Create View character_set_client collation_connection
v2 CREATE VIEW "v2" AS select "__6"."a" AS "a","__6"."b" AS "b" from (select "__8"."a" AS "a","__8"."b" AS "b" from (select "__4"."a" AS "a","__4"."b" AS "b" from (select "__6"."a" AS "a","__6"."b" AS "b" from (select "t1"."a" AS "a","t1"."b" AS "b" from "t1" except all select "t2"."a" AS "a","t2"."b" AS "b" from "t2") "__6") "__4" intersect all values (1,2)) "__8") "__6" latin1 latin1_swedish_ci
select * from v2;
a b
1 2
drop view v2;
EXPLAIN select * from t1 except all select * from t2 intersect all values (1, 2);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY <derived4> ALL NULL NULL NULL NULL 2
4 DERIVED <derived2> ALL NULL NULL NULL NULL 4
2 DERIVED t1 ALL NULL NULL NULL NULL 4
3 EXCEPT t2 ALL NULL NULL NULL NULL 2
NULL EXCEPT RESULT <except2,3> ALL NULL NULL NULL NULL NULL
5 INTERSECT NULL NULL NULL NULL NULL NULL NULL No tables used
NULL INTERSECT RESULT <intersect4,5> ALL NULL NULL NULL NULL NULL
select * from t2 union all select * from t2;
a b
1 2
1 2
1 2
1 2
select * from t1 except all select * from t2 intersect all values (1, 2) union values (2, 3);
a b
1 2
2 3
select * from t2 union all select * from t2 except all select * from t2 intersect all values (1, 2) union values (2, 3);
a b
1 2
2 3
select * from t1 except all select * from t2 union values (2, 3);
a b
1 2
2 3
# Default: first INTERSECT ALL, then UNION
select * from t1 union values (1, 2) intersect all select * from t2;
a b
1 2
select * from t1 union (values (1, 2) intersect all select * from t2);
a b
1 2
set sql_mode= default;
select * from t1 union values (1, 2) intersect all select * from t2;
a b
1 2
select * from t1 union (values (1, 2) intersect all select * from t2);
a b
1 2
set sql_mode= 'oracle';
create or replace table t2 like t1;
insert t2 values (1, 2), (2, 3);
create table t3 select * from t1 except all select * from t2;
select * from t3;
a b
1 2
1 2
1 2
select * from t3 intersect all select * from t1;
a b
1 2
1 2
1 2
show create table t2;
Table Create Table
t2 CREATE TABLE "t2" (
"a" int(11) DEFAULT NULL,
"b" int(11) DEFAULT NULL
)
select * from t2 order by a desc;
a b
2 3
1 2
select * from t1 except all select * from t2;
a b
1 2
1 2
1 2
select * from t1 except all select * from t2 union all values (0, 1);
a b
1 2
1 2
1 2
0 1
select * from t1 except all select * from t2 union all values (0, 1) order by a limit 2;
a b
0 1
1 2
select * from t1 except all select * from t2 intersect all select * from t1;
a b
1 2
1 2
1 2
select * from t1 except all select * from t2 intersect all select * from t1 union all select * from t2;
a b
1 2
1 2
1 2
1 2
2 3
select * from t1 except all select * from t2 intersect all select * from t1 union all select * from t2 order by a desc limit 3;
a b
2 3
1 2
1 2
drop tables t1, t2, t3;
set sql_mode= default;

View File

@@ -338,13 +338,22 @@ create table i3 (x int);
explain SELECT * from t3 union select * from u3 intersect all select * from i3;
set sql_mode= 'oracle';
explain SELECT * from t3 union select * from u3 intersect all select * from i3;
# TODO: there is a bug in --view protocol, it displays column name as '*' instead of 'x'
--replace_result * x
select * from t3 union select * from u3 intersect select * from i3;
--replace_result * x
SELECT * from t3 union select * from u3 intersect all select * from i3;
insert into t3 values (0);
insert into i3 values (0);
--replace_result * x
Select * from t3 union select * from u3 intersect select * from i3;
--replace_result * x
SELECT * FROM t3 UNION SELECT * FROM u3 INTERSECT ALL SELECT * FROM i3;
# CREATE VIEW still works good
create view v as select * from t3 union select * from u3 intersect select * from i3;
select * from v;
drop tables t3, u3, i3;
drop view v;
--enable_info
--echo # First line of these results is column names, not the result
@@ -374,10 +383,26 @@ values (1, 2) union all values (1, 2) union values (4, 3) union all values (4, 3
values (1, 2) union all values (1, 2) union values (4, 3) union all values (4, 3) union all values (1, 2) union values (1, 2);
--disable_info
set sql_mode= default;
create table t1 (a int, b int);
create table t2 like t1;
insert t1 values (1, 2), (1, 2), (1, 2), (2, 3), (2, 3), (3, 4), (3, 4);
insert t2 values (1, 2), (1, 2), (2, 3), (2, 3), (2, 3), (2, 3), (4, 5);
select * from t1 intersect all select * from t2;
select * from t1 intersect all select * from t2 union values (1, 2);
select * from t1 intersect all (select * from t2 union values (1, 2));
(select * from t1 intersect all select * from t2) union values (1, 2);
create view v1 as select * from t1 intersect all select * from t2 union values (1, 2);
show create view v1;
select * from v1;
create view v2 as select * from t1 union values (1, 2) intersect all select * from t2;
show create view v2;
select * from v2;
set sql_mode= 'oracle';
select * from t1 intersect select * from t2;
select * from t1 intersect all select * from t2;
--echo # Default: first INTERSECT ALL, then UNION
@@ -392,5 +417,85 @@ select * from t1 intersect all select * from t2 union values (1, 2);
select * from t1 intersect all (select * from t2 union values (1, 2));
(select * from t1 intersect all select * from t2) union values (1, 2);
explain select * from t1 intersect all select * from t2 union values (1, 2);
show create view v1;
select * from v1;
show create view v2;
select * from v2;
create view v3 as select * from t1 union values (1, 2) intersect all select * from t2;
show create view v3;
select * from v3;
drop tables t1, t2;
drop view v1, v2, v3;
create table t3 (x int);
create table u3 (x int);
create table i3 (x int);
create view v4 as SELECT * from t3 union select * from u3 intersect all select * from i3;
select * from v4;
drop tables t3, u3, i3;
drop view v4;
set sql_mode= default;
--echo #
--echo # MDEV-37325 Incorrect results for INTERSECT ALL in ORACLE mode
--echo #
create table t1 (a int, b int);
create table t2 like t1;
insert t1 values (1, 2), (1, 2), (1, 2), (1, 2);
insert t2 values (1, 2), (1, 2);
select * from t1 except all select * from t2 intersect all values (1, 2);
explain select * from t1 except all select * from t2 intersect all values (1, 2);
Explain select * from (select * from (select * from t1 except all select * from t2) __3 intersect all values (1,2)) __5;
create view v1 as select * from t1 except all select * from t2 intersect all values (1, 2);
show create view v1;
select * from v1;
drop view v1;
create view v1 as ((select * from t1 except all select * from t2) intersect all values (1, 2));
show create view v1;
select * from v1;
drop view v1;
explain select * from ((select * from t1 except all select * from t2) intersect all values (1, 2)) v;
--echo # Oracle: first UNION, then INTERSECT ALL
set sql_mode= 'oracle';
create view v2 as select * from t1 except all select * from t2 intersect all values (1, 2);
show create view v2;
select * from v2;
drop view v2;
EXPLAIN select * from t1 except all select * from t2 intersect all values (1, 2);
select * from t2 union all select * from t2;
select * from t1 except all select * from t2 intersect all values (1, 2) union values (2, 3);
select * from t2 union all select * from t2 except all select * from t2 intersect all values (1, 2) union values (2, 3);
select * from t1 except all select * from t2 union values (2, 3);
--echo # Default: first INTERSECT ALL, then UNION
select * from t1 union values (1, 2) intersect all select * from t2;
select * from t1 union (values (1, 2) intersect all select * from t2);
set sql_mode= default;
select * from t1 union values (1, 2) intersect all select * from t2;
select * from t1 union (values (1, 2) intersect all select * from t2);
set sql_mode= 'oracle';
create or replace table t2 like t1;
insert t2 values (1, 2), (2, 3);
create table t3 select * from t1 except all select * from t2;
select * from t3;
select * from t3 intersect all select * from t1;
show create table t2;
select * from t2 order by a desc;
select * from t1 except all select * from t2;
select * from t1 except all select * from t2 union all values (0, 1);
select * from t1 except all select * from t2 union all values (0, 1) order by a limit 2;
select * from t1 except all select * from t2 intersect all select * from t1;
select * from t1 except all select * from t2 intersect all select * from t1 union all select * from t2;
select * from t1 except all select * from t2 intersect all select * from t1 union all select * from t2 order by a desc limit 3;
drop tables t1, t2, t3;
set sql_mode= default;

View File

@@ -4,10 +4,9 @@
create user foo@'127.0.0.1';
connect con1,127.0.0.1,foo,,;
connection default;
select user from information_schema.processlist;
select user from information_schema.processlist where id=$con1_id;
user
foo
root
kill user foo@'127.0.0.1';
drop user foo@'127.0.0.1';
#
@@ -28,11 +27,11 @@ Id User Host db Command Time State Info Progress
kill user a;
kill user x;
connection a;
show processlist;
Id User Host db Command Time State Info Progress
# root # test # # # # #
# a # NULL # # # # #
# b # test # # # # #
select user from information_schema.processlist where id in (connection_id(), $b_id, $default_id) order by user;
user
a
b
root
kill user b;
ERROR HY000: Operation KILL USER failed for b@%
connection default;

View File

@@ -16,9 +16,10 @@
create user foo@'127.0.0.1';
--connect (con1,127.0.0.1,foo,,)
let $con1_id= `select connection_id()`;
--connection default
select user from information_schema.processlist;
evalp select user from information_schema.processlist where id=$con1_id;
kill user foo@'127.0.0.1';
let $wait_condition=
@@ -31,6 +32,7 @@ drop user foo@'127.0.0.1';
--echo #
--echo # KILL USER and missing privileges
--echo #
let $default_id= `select connection_id()`;
create user a@'127.0.0.1';
create user b@'127.0.0.1';
grant process on *.* to a@'127.0.0.1';
@@ -38,13 +40,13 @@ grant select on *.* to b@'127.0.0.1';
--connect a,127.0.0.1,a
show grants;
--connect b,127.0.0.1,b
let $b_id= `select connection_id()`;
--replace_column 1 # 3 # 5 # 6 # 9 #
show processlist;
kill user a; # existing connection, but not visible to current_user
kill user x; # not existing connection
--connection a
--replace_column 1 # 3 # 5 # 6 # 7 # 8 # 9 #
show processlist;
evalp select user from information_schema.processlist where id in (connection_id(), $b_id, $default_id) order by user;
--error ER_KILL_DENIED_ERROR
kill user b;
--connection default

View File

@@ -45,6 +45,15 @@ REPAIR LOCAL TABLE t1 USE_FRM;
REPAIR LOCAL TABLE t1;
DROP TABLE t1;
SET max_session_mem_used=default;
#
# MDEV-38005 Assertion `(yyvsp[-3].simple_string) < (yyvsp[-1].simple_string)' failed
#
SET max_session_mem_used=1;
Warnings:
Warning 1292 Truncated incorrect max_session_mem_used value: '1'
CREATE TABLE t SELECT 1000000000000000000000000000000000000000000000000000000000000000000000000000000001 AS c;
ERROR HY000: The MariaDB server is running with the --max-session-mem-used=8192 option so it cannot execute this statement
SET max_session_mem_used=default;
# End of 10.6 tests
#
# MDEV-37489: SIGSEGV in get_param_default_value | store_schema_params

View File

@@ -83,6 +83,14 @@ REPAIR LOCAL TABLE t1;
DROP TABLE t1;
SET max_session_mem_used=default;
--echo #
--echo # MDEV-38005 Assertion `(yyvsp[-3].simple_string) < (yyvsp[-1].simple_string)' failed
--echo #
SET max_session_mem_used=1;
--error ER_OPTION_PREVENTS_STATEMENT
CREATE TABLE t SELECT 1000000000000000000000000000000000000000000000000000000000000000000000000000000001 AS c;
SET max_session_mem_used=default;
--echo # End of 10.6 tests
--echo #

View File

@@ -262,3 +262,9 @@ SET @@global.collation_server= @save_collation_server;
SET @@global.character_set_client= @save_character_set_client;
SET @@global.collation_connection= @save_collation_connection;
FOUND 1 /Aborted connection.*'u' host: '192.0.2.1' real ip: '(localhost|::1)'/ in mysqld.1.err
#
# MDEV-36269: Improve error handling for SOURCE command
# Test that SOURCE on an existent directory returns a clear error
#
ERROR at line 1: Can't read from a directory '.'
End of 10.11 tests

View File

@@ -63,3 +63,13 @@ SET @@global.collation_connection= @save_collation_connection;
let SEARCH_FILE=$MYSQLTEST_VARDIR/log/mysqld.1.err;
let SEARCH_PATTERN= Aborted connection.*'u' host: '192.0.2.1' real ip: '(localhost|::1)';
source include/search_pattern_in_file.inc;
--echo #
--echo # MDEV-36269: Improve error handling for SOURCE command
--echo # Test that SOURCE on an existent directory returns a clear error
--echo #
--error 1
--exec $MYSQL -e "source ." 2>&1
--echo End of 10.11 tests

View File

@@ -14,6 +14,8 @@ drop table t1,t2;
#
# Test that SHOW PROCESSLIST doesn't have the Progress column
#
let $count_sessions= 1;
source include/wait_until_count_sessions.inc;
--replace_column 1 <Id> 3 <Host> 6 <Time> 7 <State>
# Embedded server is hardcoded to show "Writing to net" as STATE.

View File

@@ -108,9 +108,8 @@ explain select * from t1 where pk1 != 0 and key1 = 1 {
"using_mrr": false,
"index_only": false,
"rows": 1000,
"cost": 0.19598856,
"chosen": false,
"cause": "cost"
"cost": 0.16706826,
"chosen": true
},
{
"index": "key1",

View File

@@ -0,0 +1,36 @@
#
# MDEV-38164: Poor cost calculations for index access cause bad query plans for big VARCHARs in 11.x
#
create table t1 (
pk1 int not null,
pk2 int not null,
filler1 varchar(500),
filler2 varchar(500),
filler3 varchar(500),
filler4 varchar(500),
filler5 varchar(500),
filler6 varchar(500),
filler7 varchar(500),
filler8 varchar(500),
filler9 varchar(500),
fillerA varchar(500),
fillerB varchar(500),
fillerC varchar(500),
fillerD varchar(500),
fillerE varchar(500),
fillerF varchar(500),
primary key(pk1, pk2)
) collate utf8mb4_general_ci engine=innodb;
insert into t1 (pk1, pk2) select
mod(seq, 8), seq
from
seq_1_to_10000;
analyze table t1;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
# This should use ref access, not full scan:
explain select * from t1 where pk1=1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref PRIMARY PRIMARY 4 # 1250
drop table t1;

View File

@@ -0,0 +1,38 @@
--source include/have_innodb.inc
--source include/have_sequence.inc
--echo #
--echo # MDEV-38164: Poor cost calculations for index access cause bad query plans for big VARCHARs in 11.x
--echo #
create table t1 (
pk1 int not null,
pk2 int not null,
filler1 varchar(500),
filler2 varchar(500),
filler3 varchar(500),
filler4 varchar(500),
filler5 varchar(500),
filler6 varchar(500),
filler7 varchar(500),
filler8 varchar(500),
filler9 varchar(500),
fillerA varchar(500),
fillerB varchar(500),
fillerC varchar(500),
fillerD varchar(500),
fillerE varchar(500),
fillerF varchar(500),
primary key(pk1, pk2)
) collate utf8mb4_general_ci engine=innodb;
insert into t1 (pk1, pk2) select
mod(seq, 8), seq
from
seq_1_to_10000;
analyze table t1;
--echo # This should use ref access, not full scan:
--replace_column 8 #
explain select * from t1 where pk1=1;
drop table t1;

View File

@@ -44,9 +44,11 @@ EXPLAIN SELECT * FROM t2 USE INDEX(ux_pk1_fd5) WHERE pk1=9 AND fd5 < 500 ORDER B
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 range ux_pk1_fd5 ux_pk1_fd5 13 NULL 138 Using index condition
# This also must use range, not ref. key_len must be 13
# Note: this uses "Using where" instead of "Using index condition"
# due to effect described in MDEV-38231
EXPLAIN SELECT * FROM t2 WHERE pk1=9 AND fd5 < 500 ORDER BY fd5 DESC LIMIT 10;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 range PRIMARY,ux_pk1_fd5 ux_pk1_fd5 13 NULL 138 Using index condition
1 SIMPLE t2 range PRIMARY,ux_pk1_fd5 ux_pk1_fd5 13 NULL 138 Using where
drop table t2;
#
# MDEV-6814: Server crashes in calculate_key_len on query with ORDER BY

View File

@@ -34,6 +34,8 @@ select pk1, count(*) from t2 group by pk1;
--echo # The following should use range(ux_pk1_fd5), two key parts (key_len=5+8=13)
EXPLAIN SELECT * FROM t2 USE INDEX(ux_pk1_fd5) WHERE pk1=9 AND fd5 < 500 ORDER BY fd5 DESC LIMIT 10;
--echo # This also must use range, not ref. key_len must be 13
--echo # Note: this uses "Using where" instead of "Using index condition"
--echo # due to effect described in MDEV-38231
EXPLAIN SELECT * FROM t2 WHERE pk1=9 AND fd5 < 500 ORDER BY fd5 DESC LIMIT 10;
drop table t2;

View File

@@ -391,3 +391,25 @@ partitio values in (2, 3, 4),
pn values in (52, 53, 54));
drop table t1;
# End of 10.7 tests
#
# MDEV-35562 On partitionen tables algorithm is not supported
# throw "no such file or directory" error
#
CREATE TABLE t1par (
f1 datetime ,
f2 VARCHAR(2) ,
f3 VARCHAR(200) NOT NULL ,
f4 VARCHAR(100) charset utf8
)
PARTITION BY RANGE COLUMNS(f2)
(
PARTITION p_01 VALUES LESS THAN ('02') ENGINE = InnoDB,
PARTITION p_31 VALUES LESS THAN (MAXVALUE) ENGINE = InnoDB
);
ALTER online TABLE t1par MODIFY COLUMN f3 VARCHAR(201) NULL, ALGORITHM=NOCOPY , LOCK=NONE;
ERROR 0A000: ALGORITHM=NOCOPY is not supported for this operation. Try ALGORITHM=INPLACE
show warnings;
Level Code Message
Error 1845 ALGORITHM=NOCOPY is not supported for this operation. Try ALGORITHM=INPLACE
drop table t1par;
# End of 10.11 tests

View File

@@ -323,3 +323,26 @@ partition by list(x) (
drop table t1;
--echo # End of 10.7 tests
--echo #
--echo # MDEV-35562 On partitionen tables algorithm is not supported
--echo # throw "no such file or directory" error
--echo #
CREATE TABLE t1par (
f1 datetime ,
f2 VARCHAR(2) ,
f3 VARCHAR(200) NOT NULL ,
f4 VARCHAR(100) charset utf8
)
PARTITION BY RANGE COLUMNS(f2)
(
PARTITION p_01 VALUES LESS THAN ('02') ENGINE = InnoDB,
PARTITION p_31 VALUES LESS THAN (MAXVALUE) ENGINE = InnoDB
);
--error ER_ALTER_OPERATION_NOT_SUPPORTED
ALTER online TABLE t1par MODIFY COLUMN f3 VARCHAR(201) NULL, ALGORITHM=NOCOPY , LOCK=NONE;
show warnings;
drop table t1par;
--echo # End of 10.11 tests

View File

@@ -1015,5 +1015,45 @@ ERROR HY000: The target table v of the UPDATE is not updatable
DROP VIEW v;
DROP TABLE t;
#
# rownum in having without group by
#
create table t1 (a int primary key, b int);
insert into t1 values (1, 1), (2, 1), (3, 1), (4, 2), (5, 2), (6, 2);
select * from (select * from t1 order by a, b) dt having rownum() = 4;
a b
4 2
drop table t1;
#
# rownum in subquery
#
create table t1 (a int primary key, b int);
insert into t1 values (1, 1), (2, 1), (3, 1), (4, 2), (5, 2), (6, 2);
explain select * from t1 where a in (select rownum() from t1);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 6
1 PRIMARY t1 eq_ref PRIMARY PRIMARY 4 <subquery2>.rownum() 1 Using index condition
2 MATERIALIZED t1 index NULL PRIMARY 4 NULL 6 Using index
select * from t1 where a in (select rownum() from t1);
a b
1 1
2 1
3 1
4 2
5 2
6 2
set optimizer_switch='materialization=off';
explain select * from t1 where a + 1 in (select rownum() from t1);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 6 Using where
2 DEPENDENT SUBQUERY t1 index NULL PRIMARY 4 NULL 6 Using index
select * from t1 where a + 1 in (select rownum() from t1);
a b
1 1
2 1
3 1
4 2
5 2
drop table t1;
#
# End of 10.6 tests
#

View File

@@ -617,6 +617,34 @@ UPDATE v SET f = 10 WHERE e > 42 LIMIT 1;
DROP VIEW v;
DROP TABLE t;
--echo #
--echo # rownum in having without group by
--echo #
create table t1 (a int primary key, b int);
insert into t1 values (1, 1), (2, 1), (3, 1), (4, 2), (5, 2), (6, 2);
select * from (select * from t1 order by a, b) dt having rownum() = 4;
drop table t1;
--echo #
--echo # rownum in subquery
--echo #
create table t1 (a int primary key, b int);
insert into t1 values (1, 1), (2, 1), (3, 1), (4, 2), (5, 2), (6, 2);
# When rownum used in subquery, the subquery shouldn't be transformed to semijoin
explain select * from t1 where a in (select rownum() from t1);
select * from t1 where a in (select rownum() from t1);
set optimizer_switch='materialization=off';
# When rownum used in IN-subquery and the subquery is transformed to EXISTS, the new condition should be added to HAVING clause.
explain select * from t1 where a + 1 in (select rownum() from t1);
select * from t1 where a + 1 in (select rownum() from t1);
drop table t1;
--echo #
--echo # End of 10.6 tests
--echo #

View File

@@ -2114,4 +2114,33 @@ a b c d e
2 NULL NULL NULL NULL
set join_cache_level= default;
DROP TABLE t1, t2, t3;
#
# MDEV-38240: Selectivity sampling not performed when the table has no indexed conditions
#
set use_stat_tables=PREFERABLY;
create table t1 (a varchar(100), b int);
insert into t1 select seq, seq from seq_1_to_1000;
analyze table t1;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
set optimizer_use_condition_selectivity=5;
# Must produce filtered=1% or so:
explain extended
select * from t1 where a like '%99%';
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 1000 1.00 Using where
Warnings:
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where `test`.`t1`.`a` like '%99%'
# Must have same filtered as above
explain extended
select * from t1 where a like '%99%' and (b is null or b is not null);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 1000 1.00 Using where
Warnings:
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where `test`.`t1`.`a` like '%99%' and (`test`.`t1`.`b` is null or `test`.`t1`.`b` is not null)
drop table t1;
set optimizer_use_condition_selectivity= @save_optimizer_use_condition_selectivity;
set use_stat_tables= @save_use_stat_tables;
# End of 11.4 tests
ALTER DATABASE test CHARACTER SET utf8mb4 COLLATE utf8mb4_uca1400_ai_ci;

View File

@@ -1456,4 +1456,27 @@ SELECT * FROM t1 LEFT JOIN (t2 JOIN t3 ON t2.b = t3.e) ON t2.c = 1;
set join_cache_level= default;
DROP TABLE t1, t2, t3;
--echo #
--echo # MDEV-38240: Selectivity sampling not performed when the table has no indexed conditions
--echo #
set use_stat_tables=PREFERABLY;
create table t1 (a varchar(100), b int);
insert into t1 select seq, seq from seq_1_to_1000;
analyze table t1;
set optimizer_use_condition_selectivity=5;
--echo # Must produce filtered=1% or so:
explain extended
select * from t1 where a like '%99%';
--echo # Must have same filtered as above
explain extended
select * from t1 where a like '%99%' and (b is null or b is not null);
drop table t1;
set optimizer_use_condition_selectivity= @save_optimizer_use_condition_selectivity;
set use_stat_tables= @save_use_stat_tables;
--echo # End of 11.4 tests
--source include/test_db_charset_restore.inc

View File

@@ -2121,6 +2121,35 @@ a b c d e
2 NULL NULL NULL NULL
set join_cache_level= default;
DROP TABLE t1, t2, t3;
#
# MDEV-38240: Selectivity sampling not performed when the table has no indexed conditions
#
set use_stat_tables=PREFERABLY;
create table t1 (a varchar(100), b int);
insert into t1 select seq, seq from seq_1_to_1000;
analyze table t1;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
set optimizer_use_condition_selectivity=5;
# Must produce filtered=1% or so:
explain extended
select * from t1 where a like '%99%';
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 1000 1.00 Using where
Warnings:
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where `test`.`t1`.`a` like '%99%'
# Must have same filtered as above
explain extended
select * from t1 where a like '%99%' and (b is null or b is not null);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 1000 1.00 Using where
Warnings:
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where `test`.`t1`.`a` like '%99%' and (`test`.`t1`.`b` is null or `test`.`t1`.`b` is not null)
drop table t1;
set optimizer_use_condition_selectivity= @save_optimizer_use_condition_selectivity;
set use_stat_tables= @save_use_stat_tables;
# End of 11.4 tests
ALTER DATABASE test CHARACTER SET utf8mb4 COLLATE utf8mb4_uca1400_ai_ci;
set optimizer_switch=@save_optimizer_switch_for_selectivity_test;
set @tmp_ust= @@use_stat_tables;

View File

@@ -289,7 +289,7 @@ JS
"rows": 5,
"rows_after_filter": 5,
"rows_out": 2.490196078,
"cost": 0.00948507,
"cost": 0.00935932,
"chosen": true
}
],
@@ -299,7 +299,7 @@ JS
"index": "PRIMARY",
"rows_read": 5,
"rows_out": 2.490196078,
"cost": 0.00948507,
"cost": 0.00935932,
"uses_join_buffering": false
}
}

View File

@@ -95,6 +95,7 @@ FLUSH PRIVILEGES;
ALTER TABLE mysql.servers ENGINE=Aria;
FLUSH PRIVILEGES;
drop server s1;
ALTER TABLE mysql.servers ENGINE=Aria;
#
# MDEV-35622 SEGV, ASAN use-after-poison when reading system table with less than expected number of columns
# MDEV-37777 upgrade from MySQL 5.7 regression, mysql.servers invalid structure

View File

@@ -99,6 +99,8 @@ FLUSH PRIVILEGES;
ALTER TABLE mysql.servers ENGINE=Aria;
FLUSH PRIVILEGES;
drop server s1;
# Restore the table back to original engine, to not disrupt following tests.
ALTER TABLE mysql.servers ENGINE=Aria;
--echo #
--echo # MDEV-35622 SEGV, ASAN use-after-poison when reading system table with less than expected number of columns

View File

@@ -7,34 +7,44 @@ insert into t3 values (1,1),(3,3);
set SQL_MODE=ORACLE;
(select a,b from t1) union (select c,d from t2) intersect (select e,f from t3) union (select 4,4);
a b
4 4
3 3
4 4
explain extended
(select a,b from t1) union (select c,d from t2) intersect (select e,f from t3) union (select 4,4);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00
2 UNION t2 ALL NULL NULL NULL NULL 2 100.00
3 INTERSECT t3 ALL NULL NULL NULL NULL 2 100.00
4 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used
NULL UNIT RESULT <unit1,2,3,4> ALL NULL NULL NULL NULL NULL NULL
1 PRIMARY <derived6> ALL NULL NULL NULL NULL 2 100.00
6 DERIVED <derived4> ALL NULL NULL NULL NULL 2 100.00
4 DERIVED <derived2> ALL NULL NULL NULL NULL 4 100.00
2 DERIVED t1 ALL NULL NULL NULL NULL 2 100.00
3 UNION t2 ALL NULL NULL NULL NULL 2 100.00
NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL NULL
5 INTERSECT t3 ALL NULL NULL NULL NULL 2 100.00
NULL INTERSECT RESULT <intersect4,5> ALL NULL NULL NULL NULL NULL NULL
7 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used
NULL UNION RESULT <union6,7> ALL NULL NULL NULL NULL NULL NULL
Warnings:
Note 1003 (/* select#1 */ select "test"."t1"."a" AS "a","test"."t1"."b" AS "b" from "test"."t1") union (/* select#2 */ select "test"."t2"."c" AS "c","test"."t2"."d" AS "d" from "test"."t2") intersect (/* select#3 */ select "test"."t3"."e" AS "e","test"."t3"."f" AS "f" from "test"."t3") union (/* select#4 */ select 4 AS "4",4 AS "4")
Note 1003 /* select#1 */ select "__7"."a" AS "a","__7"."b" AS "b" from (/* select#6 */ select "__5"."a" AS "a","__5"."b" AS "b" from (/* select#4 */ select "__3"."a" AS "a","__3"."b" AS "b" from ((/* select#2 */ select "test"."t1"."a" AS "a","test"."t1"."b" AS "b" from "test"."t1") union (/* select#3 */ select "test"."t2"."c" AS "c","test"."t2"."d" AS "d" from "test"."t2")) "__3" intersect (/* select#5 */ select "test"."t3"."e" AS "e","test"."t3"."f" AS "f" from "test"."t3")) "__5" union (/* select#7 */ select 4 AS "4",4 AS "4")) "__7"
(select e,f from t3) intersect (select c,d from t2) union (select a,b from t1) union (select 4,4);
e f
5 5
3 3
5 5
6 6
4 4
explain extended
(select e,f from t3) intersect (select c,d from t2) union (select a,b from t1) union (select 4,4);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t3 ALL NULL NULL NULL NULL 2 100.00
2 INTERSECT t2 ALL NULL NULL NULL NULL 2 100.00
3 UNION t1 ALL NULL NULL NULL NULL 2 100.00
4 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used
NULL UNIT RESULT <unit1,2,3,4> ALL NULL NULL NULL NULL NULL NULL
1 PRIMARY <derived6> ALL NULL NULL NULL NULL 4 100.00
6 DERIVED <derived4> ALL NULL NULL NULL NULL 4 100.00
4 DERIVED <derived2> ALL NULL NULL NULL NULL 2 100.00
2 DERIVED t3 ALL NULL NULL NULL NULL 2 100.00
3 INTERSECT t2 ALL NULL NULL NULL NULL 2 100.00
NULL INTERSECT RESULT <intersect2,3> ALL NULL NULL NULL NULL NULL NULL
5 UNION t1 ALL NULL NULL NULL NULL 2 100.00
NULL UNION RESULT <union4,5> ALL NULL NULL NULL NULL NULL NULL
7 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used
NULL UNION RESULT <union6,7> ALL NULL NULL NULL NULL NULL NULL
Warnings:
Note 1003 (/* select#1 */ select "test"."t3"."e" AS "e","test"."t3"."f" AS "f" from "test"."t3") intersect (/* select#2 */ select "test"."t2"."c" AS "c","test"."t2"."d" AS "d" from "test"."t2") union (/* select#3 */ select "test"."t1"."a" AS "a","test"."t1"."b" AS "b" from "test"."t1") union (/* select#4 */ select 4 AS "4",4 AS "4")
Note 1003 /* select#1 */ select "__7"."e" AS "e","__7"."f" AS "f" from (/* select#6 */ select "__5"."e" AS "e","__5"."f" AS "f" from (/* select#4 */ select "__3"."e" AS "e","__3"."f" AS "f" from ((/* select#2 */ select "test"."t3"."e" AS "e","test"."t3"."f" AS "f" from "test"."t3") intersect (/* select#3 */ select "test"."t2"."c" AS "c","test"."t2"."d" AS "d" from "test"."t2")) "__3" union (/* select#5 */ select "test"."t1"."a" AS "a","test"."t1"."b" AS "b" from "test"."t1")) "__5" union (/* select#7 */ select 4 AS "4",4 AS "4")) "__7"
create table t12(c1 int);
insert into t12 values(1);
insert into t12 values(2);
@@ -61,18 +71,21 @@ insert into t3 values (1,1),(3,3);
set SQL_MODE=ORACLE;
select a,b from t1 union all select c,d from t2 intersect select e,f from t3 union all select 4,'4' from dual;
a b
4 4
3 3
4 4
explain extended
select a,b from t1 union all select c,d from t2 intersect select e,f from t3 union all select 4,'4' from dual;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00
2 UNION t2 ALL NULL NULL NULL NULL 2 100.00
3 INTERSECT t3 ALL NULL NULL NULL NULL 2 100.00
4 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used
NULL UNIT RESULT <unit1,2,3,4> ALL NULL NULL NULL NULL NULL NULL
1 PRIMARY <derived6> ALL NULL NULL NULL NULL 2 100.00
6 DERIVED <derived4> ALL NULL NULL NULL NULL 2 100.00
4 DERIVED <derived2> ALL NULL NULL NULL NULL 4 100.00
2 DERIVED t1 ALL NULL NULL NULL NULL 2 100.00
3 UNION t2 ALL NULL NULL NULL NULL 2 100.00
5 INTERSECT t3 ALL NULL NULL NULL NULL 2 100.00
NULL INTERSECT RESULT <intersect4,5> ALL NULL NULL NULL NULL NULL NULL
7 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
Note 1003 /* select#1 */ select "test"."t1"."a" AS "a","test"."t1"."b" AS "b" from "test"."t1" union all /* select#2 */ select "test"."t2"."c" AS "c","test"."t2"."d" AS "d" from "test"."t2" intersect /* select#3 */ select "test"."t3"."e" AS "e","test"."t3"."f" AS "f" from "test"."t3" union all /* select#4 */ select 4 AS "4",'4' AS "4"
Note 1003 /* select#1 */ select "__7"."a" AS "a","__7"."b" AS "b" from (/* select#6 */ select "__5"."a" AS "a","__5"."b" AS "b" from (/* select#4 */ select "__3"."a" AS "a","__3"."b" AS "b" from (/* select#2 */ select "test"."t1"."a" AS "a","test"."t1"."b" AS "b" from "test"."t1" union all /* select#3 */ select "test"."t2"."c" AS "c","test"."t2"."d" AS "d" from "test"."t2") "__3" intersect /* select#5 */ select "test"."t3"."e" AS "e","test"."t3"."f" AS "f" from "test"."t3") "__5" union all /* select#7 */ select 4 AS "4",'4' AS "4") "__7"
select a,b from t1 union all select c,d from t2 intersect all select e,f from t3 union all select 4,'4' from dual;
a b
3 3
@@ -80,29 +93,35 @@ a b
explain extended
select a,b from t1 union all select c,d from t2 intersect all select e,f from t3 union all select 4,'4' from dual;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00
2 UNION t2 ALL NULL NULL NULL NULL 2 100.00
3 INTERSECT t3 ALL NULL NULL NULL NULL 2 100.00
4 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used
NULL UNIT RESULT <unit1,2,3,4> ALL NULL NULL NULL NULL NULL NULL
1 PRIMARY <derived6> ALL NULL NULL NULL NULL 2 100.00
6 DERIVED <derived4> ALL NULL NULL NULL NULL 2 100.00
4 DERIVED <derived2> ALL NULL NULL NULL NULL 4 100.00
2 DERIVED t1 ALL NULL NULL NULL NULL 2 100.00
3 UNION t2 ALL NULL NULL NULL NULL 2 100.00
5 INTERSECT t3 ALL NULL NULL NULL NULL 2 100.00
NULL INTERSECT RESULT <intersect4,5> ALL NULL NULL NULL NULL NULL NULL
7 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
Note 1003 /* select#1 */ select "test"."t1"."a" AS "a","test"."t1"."b" AS "b" from "test"."t1" union all /* select#2 */ select "test"."t2"."c" AS "c","test"."t2"."d" AS "d" from "test"."t2" intersect all /* select#3 */ select "test"."t3"."e" AS "e","test"."t3"."f" AS "f" from "test"."t3" union all /* select#4 */ select 4 AS "4",'4' AS "4"
Note 1003 /* select#1 */ select "__7"."a" AS "a","__7"."b" AS "b" from (/* select#6 */ select "__5"."a" AS "a","__5"."b" AS "b" from (/* select#4 */ select "__3"."a" AS "a","__3"."b" AS "b" from (/* select#2 */ select "test"."t1"."a" AS "a","test"."t1"."b" AS "b" from "test"."t1" union all /* select#3 */ select "test"."t2"."c" AS "c","test"."t2"."d" AS "d" from "test"."t2") "__3" intersect all /* select#5 */ select "test"."t3"."e" AS "e","test"."t3"."f" AS "f" from "test"."t3") "__5" union all /* select#7 */ select 4 AS "4",'4' AS "4") "__7"
select e,f from t3 intersect select c,d from t2 union all select a,b from t1 union all select 4,'4' from dual;
e f
5 5
3 3
5 5
6 6
4 4
explain extended
select e,f from t3 intersect select c,d from t2 union all select a,b from t1 union all select 4,'4' from dual;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t3 ALL NULL NULL NULL NULL 2 100.00
2 INTERSECT t2 ALL NULL NULL NULL NULL 2 100.00
3 UNION t1 ALL NULL NULL NULL NULL 2 100.00
4 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used
NULL UNIT RESULT <unit1,2,3,4> ALL NULL NULL NULL NULL NULL NULL
1 PRIMARY <derived6> ALL NULL NULL NULL NULL 4 100.00
6 DERIVED <derived4> ALL NULL NULL NULL NULL 4 100.00
4 DERIVED <derived2> ALL NULL NULL NULL NULL 2 100.00
2 DERIVED t3 ALL NULL NULL NULL NULL 2 100.00
3 INTERSECT t2 ALL NULL NULL NULL NULL 2 100.00
NULL INTERSECT RESULT <intersect2,3> ALL NULL NULL NULL NULL NULL NULL
5 UNION t1 ALL NULL NULL NULL NULL 2 100.00
7 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
Note 1003 /* select#1 */ select "test"."t3"."e" AS "e","test"."t3"."f" AS "f" from "test"."t3" intersect /* select#2 */ select "test"."t2"."c" AS "c","test"."t2"."d" AS "d" from "test"."t2" union all /* select#3 */ select "test"."t1"."a" AS "a","test"."t1"."b" AS "b" from "test"."t1" union all /* select#4 */ select 4 AS "4",'4' AS "4"
Note 1003 /* select#1 */ select "__7"."e" AS "e","__7"."f" AS "f" from (/* select#6 */ select "__5"."e" AS "e","__5"."f" AS "f" from (/* select#4 */ select "__3"."e" AS "e","__3"."f" AS "f" from (/* select#2 */ select "test"."t3"."e" AS "e","test"."t3"."f" AS "f" from "test"."t3" intersect /* select#3 */ select "test"."t2"."c" AS "c","test"."t2"."d" AS "d" from "test"."t2") "__3" union all /* select#5 */ select "test"."t1"."a" AS "a","test"."t1"."b" AS "b" from "test"."t1") "__5" union all /* select#7 */ select 4 AS "4",'4' AS "4") "__7"
select e,f from t3 intersect all select c,d from t2 union all select a,b from t1 union all select 4,'4' from dual;
e f
3 3
@@ -112,13 +131,16 @@ e f
explain extended
select e,f from t3 intersect all select c,d from t2 union all select a,b from t1 union all select 4,'4' from dual;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t3 ALL NULL NULL NULL NULL 2 100.00
2 INTERSECT t2 ALL NULL NULL NULL NULL 2 100.00
3 UNION t1 ALL NULL NULL NULL NULL 2 100.00
4 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used
NULL UNIT RESULT <unit1,2,3,4> ALL NULL NULL NULL NULL NULL NULL
1 PRIMARY <derived6> ALL NULL NULL NULL NULL 4 100.00
6 DERIVED <derived4> ALL NULL NULL NULL NULL 4 100.00
4 DERIVED <derived2> ALL NULL NULL NULL NULL 2 100.00
2 DERIVED t3 ALL NULL NULL NULL NULL 2 100.00
3 INTERSECT t2 ALL NULL NULL NULL NULL 2 100.00
NULL INTERSECT RESULT <intersect2,3> ALL NULL NULL NULL NULL NULL NULL
5 UNION t1 ALL NULL NULL NULL NULL 2 100.00
7 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
Note 1003 /* select#1 */ select "test"."t3"."e" AS "e","test"."t3"."f" AS "f" from "test"."t3" intersect all /* select#2 */ select "test"."t2"."c" AS "c","test"."t2"."d" AS "d" from "test"."t2" union all /* select#3 */ select "test"."t1"."a" AS "a","test"."t1"."b" AS "b" from "test"."t1" union all /* select#4 */ select 4 AS "4",'4' AS "4"
Note 1003 /* select#1 */ select "__7"."e" AS "e","__7"."f" AS "f" from (/* select#6 */ select "__5"."e" AS "e","__5"."f" AS "f" from (/* select#4 */ select "__3"."e" AS "e","__3"."f" AS "f" from (/* select#2 */ select "test"."t3"."e" AS "e","test"."t3"."f" AS "f" from "test"."t3" intersect all /* select#3 */ select "test"."t2"."c" AS "c","test"."t2"."d" AS "d" from "test"."t2") "__3" union all /* select#5 */ select "test"."t1"."a" AS "a","test"."t1"."b" AS "b" from "test"."t1") "__5" union all /* select#7 */ select 4 AS "4",'4' AS "4") "__7"
set SQL_MODE=default;
drop table t1,t2,t3;
set SQL_MODE=oracle;

View File

@@ -98,4 +98,48 @@ SHOW STATUS LIKE "Empty_queries";
Variable_name Value
Empty_queries 2
DROP TABLE t1, t2;
#
# MDEV-32266 All queries in stored procedures increment empty_queries counter
#
show status like "Empty_queries";
Variable_name Value
Empty_queries 2
CREATE TABLE t1 (id INT);
insert into t1 values (1),(2);
CREATE PROCEDURE proc1 (OUT cnt INT, id_var int)
BEGIN
SELECT COUNT(*) INTO cnt FROM t1 where id=id_var;
END$$
CREATE PROCEDURE proc2 (id_var int)
BEGIN
declare cnt int;
SELECT id INTO cnt FROM t1 where id=id_var;
END$$
create function f1(x int) returns int return (x in ((select id from t1 where id <= 4)));
flush status;
show status like "Empty_queries";
Variable_name Value
Empty_queries 0
CALL proc1(@cnt,1);
CALL proc1(@cnt,3);
CALL proc2(1);
select f1(1);
f1(1)
1
select f1(8);
f1(8)
0
show status like "Empty_queries";
Variable_name Value
Empty_queries 0
CALL proc2(4);
Warnings:
Warning 1329 No data - zero rows fetched, selected, or processed
show status like "Empty_queries";
Variable_name Value
Empty_queries 1
drop procedure proc1;
drop procedure proc2;
drop function f1;
drop table t1;
# End of 10.11 tests

View File

@@ -92,4 +92,46 @@ SHOW STATUS LIKE "Empty_queries";
DROP TABLE t1, t2;
--echo #
--echo # MDEV-32266 All queries in stored procedures increment empty_queries counter
--echo #
show status like "Empty_queries";
CREATE TABLE t1 (id INT);
insert into t1 values (1),(2);
DELIMITER $$;
CREATE PROCEDURE proc1 (OUT cnt INT, id_var int)
BEGIN
SELECT COUNT(*) INTO cnt FROM t1 where id=id_var;
END$$
CREATE PROCEDURE proc2 (id_var int)
BEGIN
declare cnt int;
SELECT id INTO cnt FROM t1 where id=id_var;
END$$
DELIMITER ;$$
create function f1(x int) returns int return (x in ((select id from t1 where id <= 4)));
flush status;
show status like "Empty_queries";
# These should not increase empty queries
CALL proc1(@cnt,1);
CALL proc1(@cnt,3);
CALL proc2(1);
select f1(1);
select f1(8);
show status like "Empty_queries";
# These should increase empty queries
CALL proc2(4);
show status like "Empty_queries";
drop procedure proc1;
drop procedure proc2;
drop function f1;
drop table t1;
--echo # End of 10.11 tests

View File

@@ -1,3 +1,4 @@
--source include/have_perfschema.inc
--echo #
--echo # MDEV-6610 Assertion `thd->is_error() || thd->killed' failed in mysql_execute_command on executing an SP with repeated CREATE TABLE .. SELECT
--echo #

View File

@@ -1,5 +1,5 @@
connect ssl_con,localhost,root,,,,,SSL;
select variable_name from performance_schema.status_by_thread where VARIABLE_NAME LIKE 'Ssl%';
select variable_name from performance_schema.status_by_thread where VARIABLE_NAME LIKE 'Ssl%' and thread_id in($default_id, $ssl_con_id);
variable_name
Ssl_cipher
Ssl_cipher_list

View File

@@ -10,9 +10,12 @@
--source include/have_perfschema.inc
--disable_service_connection
let $default_id=`select thread_id from performance_schema.threads where processlist_id=connection_id()`;
connect (ssl_con,localhost,root,,,,,SSL);
select variable_name from performance_schema.status_by_thread where VARIABLE_NAME LIKE 'Ssl%';
let $ssl_con_id=`select thread_id from performance_schema.threads where processlist_id=connection_id()`;
evalp select variable_name from performance_schema.status_by_thread where VARIABLE_NAME LIKE 'Ssl%' and thread_id in($default_id, $ssl_con_id);
# Check ssl turned on
SELECT (VARIABLE_VALUE <> '') AS have_ssl FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher';

View File

@@ -4,6 +4,10 @@
--source include/have_innodb.inc
--source include/not_embedded.inc
# Save the initial number of concurrent sessions
let $count_sessions=1;
--disable_service_connection
call mtr.add_suppression("Deadlock found when trying to get lock; try restarting transaction");
call mtr.add_suppression("InnoDB: Transaction was aborted due to ");
@@ -767,6 +771,7 @@ xa end 'r:foo';
xa prepare 'r:foo';
disconnect con1;
connection default;
--source include/wait_until_count_sessions.inc
xa recover;
xa start 'r:bar';

View File

@@ -0,0 +1,62 @@
-----BEGIN CERTIFICATE-----
MIIFPTCCAyWgAwIBAgIBATANBgkqhkiG9w0BAQsFADA/MRAwDgYDVQQKDAdNYXJp
YURCMRAwDgYDVQQLDAdNYXJpYURCMRkwFwYDVQQDDBBJbnRlcm1lZGlhdGUgQ0Ey
MB4XDTI1MTIxMjE2NTY0NFoXDTQ1MDgyOTE2NTY0NFowETEPMA0GA1UEAwwGY2xp
ZW50MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAtP9k21MRWxut47OV
CjK9jn+nJHnZ0agpAJbgdvsIFKrkV4v0VHb7m5dURaqV1lF1WhrSmc8k7gcSB32O
l+6Fo0OToe80KxH3NeYN5YscfnVOtrtbpwEkoYt4CFSn95TpjFrEaF0nZUwg5mJb
+ZZsXzYk60GBA1It9uLMbqWAioRHbLprV6bIn0yDqKlf5JTQRk4JORxw3J66ppWC
y+4OI8UmuOF4jJx3nWHTmPmtZEA7FgNisW9ReQC46+A8mdJCUqupIq6M7foG682+
eKarvX1kjlOhL60PeuzazCmaGYTnkYI1wFC6Js6nE9xRTzS0UWR2UhBfgf9/FB86
dqtD4qnwleW3VbnOim7XnXFrVq7yJ22sBO0KGRLRmBa2RCb8qvAogZ8zzYj/Jt4x
QBHoqjFjGreaXZod0/P1yxTqgZBAz526WtH5EP4sO7xiFPvQONmrDsWAkG7PBRbw
QZkpnYyH+IiGWQuL4Xsv8uSK6aKDvnXyvY97xKNQ3R4Nm/U5lsif9Uuw/dJHsIZl
FkqG5m9p++7Kj5lAfliFtUmOOIHp3Vb3pMWds3muiJ5BH5g/1Ba2pe69GArWPx6P
e63nhgUJ6DbUcS0xGX4lCeQg9/NPEimIk1CyqIcqSM6WN8//UUSiJuPArHxV1t5C
Cv1BFIn27BPrTWGfrSEf4YThpDcCAwEAAaNyMHAwCQYDVR0TBAIwADAOBgNVHQ8B
Af8EBAMCBaA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0wPPTJWkSeWh74e0Dd
mnnz0iDzkknguVwihvnuz0tFW5Cynsu4owVJpRSDd7C94f00S6lRQ10AWJiQLNhR
4370dVcbNCdIIwVOMQ0xA6fSKmOpLclIz1c6XHHuGR+klR1U8sX6dNOQMBRa8nZy
xGMXSQ0X05pqPnBBdZRmQDka1bWn/Uuk+2tY5CamWjF191EurtsZ1cJ7HQnPtheV
zdZxP+YSOvE5TJVnziqxlkIChxa+INBuaQoISxepBi2m2VPGj5SjAZcDPx9+uled
CzLan4jnrDW8d8HeiOleeWuQHp/mdKScKfsVD6yyoEQqVajBl4QV5QncgZQiH9LD
hzldPqgBh2P+MOiKGEPDPDe/+DSJOeASicDTeV5kFug7
-----END CERTIFICATE-----

View File

@@ -103,6 +103,10 @@ sub skip_combinations {
$skip{'include/check_windows_admin.inc'} = 'Requires admin privileges'
unless IS_WINDOWS and Win32::IsAdminUser();
# MDEV-38326. Chained TLS certificates fails verification for schannel clients
$skip{'main/chained_ssl_certificates.test'} = 'Skip if on Windows without OpenSSL'
unless !IS_WINDOWS || $openssl_ver;
%skip;
}

View File

@@ -0,0 +1,41 @@
create table t1 (a int primary key, b text) engine=innodb;
connect trx1_rollback,localhost,root,,;
CREATE TABLE t_x (a int) engine=MEMORY;
SET binlog_format=row;
CREATE TEMPORARY TABLE tt_tmp ( id INT ) ENGINE = Memory;
BEGIN;
insert into t_x values (1);
drop temporary table tt_tmp;
insert into t1 values (99, "gotta log first");
SET DEBUG_SYNC= 'reset';
SET DEBUG_SYNC= "before_group_commit_queue SIGNAL trx1_at_log WAIT_FOR trx1_go";
ROLLBACK;
connect trx2_commit,localhost,root,,;
insert into t1 values (99, "second best in binlog");
connection default;
SET DEBUG_SYNC= "now WAIT_FOR trx1_at_log";
SET DEBUG_SYNC= "now SIGNAL trx1_go";
connection trx2_commit;
select * from t1;
a b
99 second best in binlog
# Prove the logging order is Trx1, Trx2
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Annotate_rows # # insert into t_x values (1)
master-bin.000001 # Table_map # # table_id: # (test.t_x)
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Annotate_rows # # insert into t1 values (99, "gotta log first")
master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # ROLLBACK
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test`; insert into t1 values (99, "second best in binlog")
master-bin.000001 # Xid # # COMMIT /* XID */
drop table t_x, t1;
disconnect trx1_rollback;
disconnect trx2_commit;
# end of the tests

View File

@@ -0,0 +1,59 @@
--source include/have_debug_sync.inc
--source include/have_innodb.inc
--source include/have_binlog_format_mixed.inc
# MDEV-37541 Race of rolling back and committing transaction to binlog
# The tests reproduce a scenario of two conflicting transactions
# of which the dependency decides to rollback. In order to reproduce the bug
# the parent features side effects (produced by DROP TEMPORARY TABLE)
# and multiple engines.
# The tests prove that the child transaction can not win race to binlogging
# with its parent as it gets stuck at engine lock acquiring all time
# while the parent conducts binlogging on its own.
create table t1 (a int primary key, b text) engine=innodb;
connect(trx1_rollback,localhost,root,,);
CREATE TABLE t_x (a int) engine=MEMORY;
--let $master_file= query_get_value(SHOW MASTER STATUS, File, 1)
--let $binlog_start=query_get_value(SHOW MASTER STATUS, Position, 1)
SET binlog_format=row;
CREATE TEMPORARY TABLE tt_tmp ( id INT ) ENGINE = Memory;
BEGIN;
insert into t_x values (1);
drop temporary table tt_tmp;
insert into t1 values (99, "gotta log first");
SET DEBUG_SYNC= 'reset';
SET DEBUG_SYNC= "before_group_commit_queue SIGNAL trx1_at_log WAIT_FOR trx1_go";
--send ROLLBACK
connect(trx2_commit,localhost,root,,);
--send insert into t1 values (99, "second best in binlog")
connection default;
# Make sure ROLLBACK is in the binlogging phase ..
SET DEBUG_SYNC= "now WAIT_FOR trx1_at_log";
# .. and the contender trx2 in the locking phase ..
let $wait_condition=
select count(*) = 1 from information_schema.innodb_trx
where trx_state = "LOCK WAIT" and trx_query like "%insert into t1 values%";
source include/wait_condition.inc;
# .. when both provided unfreeze the trx:s ..
SET DEBUG_SYNC= "now SIGNAL trx1_go";
connection trx2_commit;
reap;
select * from t1;
# .. to observe proper binlogging.
--echo # Prove the logging order is Trx1, Trx2
--source include/show_binlog_events.inc
drop table t_x, t1;
disconnect trx1_rollback;
disconnect trx2_commit;
--echo # end of the tests

View File

@@ -156,7 +156,7 @@ c1 c2
1 one
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE VIEW "v1" AS select "t1"."c1" AS "c1","t1"."c2" AS "c2" from "t1" union select "t1"."c1" AS "c1",NULL AS "NULL" from "t1" order by 1,2 cp1250 latin2_general_ci
v1 CREATE VIEW "v1" AS select "__4"."c1" AS "c1","__4"."c2" AS "c2" from (select "__5"."c1" AS "c1","__5"."c2" AS "c2" from (select "t1"."c1" AS "c1","t1"."c2" AS "c2" from "t1" union select "t1"."c1" AS "c1",NULL AS "NULL" from "t1") "__5") "__4" order by 1,2 cp1250 latin2_general_ci
DROP VIEW v1;
DROP TABLE t1;
EXPLAIN EXTENDED SELECT '';

View File

@@ -37,9 +37,9 @@ c2
menny
SELECT c2 FROM tx1 MINUS SELECT c2 from tx2 UNION SELECT c2 from tx3;
c2
jim
menny
linda
jim
kris
create table MINUS (a int);
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 'MINUS (a int)' at line 1

File diff suppressed because it is too large Load Diff

View File

@@ -1172,21 +1172,25 @@ eval explain extended $q;
let $q=
select 2 union (values (5), (7), (1), (3), (4) limit 2);
--replace_result * 2
eval $q;
eval explain extended $q;
let $q=
select 2 union (values (5), (7), (1), (3), (4) limit 2 offset 1);
--replace_result * 2
eval $q;
eval explain extended $q;
let $q=
select 2 union (values (5), (7), (1), (3), (4) order by 1 limit 2);
--replace_result * 2
eval $q;
eval explain extended $q;
let $q=
select 2 union (values (5), (7), (1), (3), (4) order by 1 limit 2 offset 1);
--replace_result * 2
eval $q;
eval explain extended $q;
@@ -1194,6 +1198,7 @@ eval explain extended $q;
let $q=
(values (5), (7), (1), (3), (4) limit 2) union select 2;
eval $q;
--replace_result derived4 derived2
eval explain extended $q;
let $q=
@@ -1204,16 +1209,19 @@ eval explain extended $q;
let $q=
(values (5), (7), (1), (3), (4) order by 1 limit 2) union select 2;
eval $q;
--replace_result derived4 derived2
eval explain extended $q;
let $q=
(values (5), (7), (1), (3), (4) order by 1 limit 2 offset 1) union select 2;
eval $q;
--replace_result derived4 derived2
eval explain extended $q;
let $q=
select 3 union all (values (5), (7), (1), (3), (4) limit 2 offset 3);
--replace_result * 3
eval $q;
eval explain extended $q;
@@ -1224,12 +1232,14 @@ eval explain extended $q;
let $q=
select 3 union all (values (5), (7), (1), (3), (4) order by 1 limit 2);
--replace_result * 3
eval $q;
eval explain extended $q;
let $q=
(values (5), (7), (1), (3), (4) order by 1 limit 2) union all select 3;
eval $q;
--replace_result derived4 derived2
eval explain extended $q;
let $q=
@@ -1254,12 +1264,14 @@ eval explain extended $q;
let $q=
(values (5), (7), (1), (3), (4) order by 1 limit 3 offset 1) union all select 3 order by 1;
eval $q;
--replace_result derived4 derived2
eval explain extended $q;
let $q=
(values (5), (7), (1), (3), (4) order by 1 limit 3 offset 1) union all select 3
order by 1 limit 2 offset 1;
eval $q;
--replace_result derived4 derived2
eval explain extended $q;
--error ER_BAD_FIELD_ERROR

View File

@@ -1354,6 +1354,229 @@ federated.t12, federated.t13, federated.t14;
connection slave;
DROP TABLES federated.t1, federated.t2, federated.t11, federated.t12,
federated.t13, federated.t14;
#
# MDEV-37484: `Sql_cmd_dml::execute_inner`, `Sql_cmd_update::execute_inner` do not call Select handler for the engine involved
#
connection default;
set global federated_pushdown=1;
connection slave;
create table federated.product_tag (product_id bigint);
CREATE TABLE federated.product (
`product_id` bigint(20) DEFAULT NULL,
`price` bigint(20) DEFAULT NULL,
`short_description` varchar(7998) DEFAULT NULL,
`brand` varchar(254) DEFAULT NULL,
`modified_dtm` datetime DEFAULT NULL,
`created_dtm` datetime DEFAULT NULL,
`modified_by` int(11) DEFAULT NULL
) CHARSET=latin1;
connection master;
create table federated.product_tag (product_id bigint)
ENGINE="FEDERATED"
CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/federated/product_tag';
CREATE TABLE federated.product (
`product_id` bigint(20) DEFAULT NULL,
`price` bigint(20) DEFAULT NULL,
`short_description` varchar(7998) DEFAULT NULL,
`brand` varchar(254) DEFAULT NULL,
`modified_dtm` datetime DEFAULT NULL,
`created_dtm` datetime DEFAULT NULL,
`modified_by` int(11) DEFAULT NULL
)
ENGINE="FEDERATED" DEFAULT CHARSET=latin1
CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/federated/product';
insert into federated.product_tag values (1),(2),(3),(4);
insert into federated.product values (1,22,'fes','rets','2011-12-12 12:12:12','2011-12-13 1:1:10',343);
insert into federated.product values (3,22,'fes','rets','2011-12-12 12:12:12','2011-12-13 1:1:10',343);
select * from federated.product order by product_id;
product_id price short_description brand modified_dtm created_dtm modified_by
1 22 fes rets 2011-12-12 12:12:12 2011-12-13 01:01:10 343
3 22 fes rets 2011-12-12 12:12:12 2011-12-13 01:01:10 343
explain format=json update
federated.product p join
(select product_id from federated.product_tag limit 1000) t using (product_id)
set brand=p.product_id, price=555, modified_dtm='2011-12-15 15:15:30',
short_description=concat(short_description,modified_by);
EXPLAIN
{
"query_block": {
"select_id": 1,
"cost": 1000.010933,
"nested_loop": [
{
"table": {
"table_name": "p",
"access_type": "ALL",
"loops": 1,
"rows": 2,
"cost": 1000.010388,
"filtered": 100,
"attached_condition": "p.product_id is not null"
}
},
{
"table": {
"table_name": "<derived2>",
"access_type": "ref",
"possible_keys": ["key0"],
"key": "key0",
"key_length": "9",
"used_key_parts": ["product_id"],
"ref": ["federated.p.product_id"],
"loops": 2,
"rows": 1,
"cost": 0.000545388,
"filtered": 100,
"materialized": {
"query_block": {
"select_id": 2,
"table": {
"message": "Pushed derived"
}
}
}
}
}
]
}
}
update
federated.product p join
(select product_id from federated.product_tag limit 1000) t using (product_id)
set brand=p.product_id, price=555, modified_dtm='2011-12-15 15:15:30',
short_description=concat(short_description,modified_by);
select * from federated.product order by product_id;
product_id price short_description brand modified_dtm created_dtm modified_by
1 555 fes343 1 2011-12-15 15:15:30 2011-12-13 01:01:10 343
3 555 fes343 3 2011-12-15 15:15:30 2011-12-13 01:01:10 343
drop table federated.product_tag;
drop table federated.product;
connection slave;
drop table federated.product_tag;
drop table federated.product;
# Setup
create or replace table federated.t1 (id int);
create or replace table federated.t2 (id int, op varchar(10), op_count int DEFAULT 0) CHARSET=latin1;
connection master;
create or replace table federated.t1 (id int)
ENGINE="FEDERATED"
CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1';
create or replace table federated.t2 (id int, op varchar(10), op_count int DEFAULT 0)
ENGINE="FEDERATED" DEFAULT CHARSET=latin1
CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/federated/t2';
insert into federated.t1 values (1),(2),(3),(4);
insert into federated.t2 (id, op) values (1, 'inserted'), (2, 'inserted'), (3, 'inserted'), (4, 'inserted');
select * from federated.t2 order by id;
id op op_count
1 inserted 0
2 inserted 0
3 inserted 0
4 inserted 0
# Update tests
explain format=json update federated.t2 inner join federated.t1 on t2.id = t1.id
set t2.op = 'updated', t2.op_count = t2.op_count + 1
where t2.id in (1, 2);
EXPLAIN
{
"query_block": {
"select_id": 1,
"cost": 2000.022975,
"nested_loop": [
{
"table": {
"table_name": "t2",
"access_type": "ALL",
"loops": 1,
"rows": 4,
"cost": 1000.010655,
"filtered": 100,
"attached_condition": "t2.`id` in (1,2)"
}
},
{
"table": {
"table_name": "t1",
"access_type": "ALL",
"loops": 4,
"rows": 4,
"cost": 1000.012319,
"filtered": 100,
"attached_condition": "t1.`id` = t2.`id`"
}
}
]
}
}
update federated.t2 inner join federated.t1 on t2.id = t1.id
set t2.op = 'updated', t2.op_count = t2.op_count + 1
where t2.id in (1, 2);
select * from federated.t2 order by id;
id op op_count
1 updated 1
2 updated 1
3 inserted 0
4 inserted 0
# Prepared update stmt
PREPARE stmt_update FROM
'update federated.t2 inner join federated.t1 on t2.id = t1.id set t2.op_count = t2.op_count + 1, t2.op="updated" where t2.id in (1, 2)';
EXECUTE stmt_update;
DEALLOCATE PREPARE stmt_update;
select * from federated.t2 order by id;
id op op_count
1 updated 2
2 updated 2
3 inserted 0
4 inserted 0
# Delete tests
explain format=json
delete federated.t2 from federated.t2 inner join federated.t1 on t2.id = t1.id and t2.op = 'updated';
EXPLAIN
{
"query_block": {
"select_id": 1,
"cost": 2000.023025,
"nested_loop": [
{
"table": {
"table_name": "t2",
"access_type": "ALL",
"loops": 1,
"rows": 4,
"cost": 1000.010705,
"filtered": 100,
"attached_condition": "t2.op = 'updated'"
}
},
{
"table": {
"table_name": "t1",
"access_type": "ALL",
"loops": 4,
"rows": 4,
"cost": 1000.012319,
"filtered": 100,
"attached_condition": "t1.`id` = t2.`id`"
}
}
]
}
}
delete federated.t2 from federated.t2 inner join federated.t1 on t2.id = t1.id and t2.op = 'updated';
select * from federated.t2 order by id;
id op op_count
3 inserted 0
4 inserted 0
# Prepared delete stmt
PREPARE stmt_delete FROM
'delete federated.t2 from federated.t2 inner join federated.t1 on t2.id = t1.id where t2.id = 3';
EXECUTE stmt_delete;
DEALLOCATE PREPARE stmt_delete;
select * from federated.t2 order by id;
id op op_count
4 inserted 0
drop table federated.t1, federated.t2;
connection slave;
drop table federated.t1, federated.t2;
connection default;
set global federated_pushdown=0;
connection master;
@@ -1362,3 +1585,4 @@ DROP DATABASE IF EXISTS federated;
connection slave;
DROP TABLE IF EXISTS federated.t1;
DROP DATABASE IF EXISTS federated;
# End of 11.4 tests

View File

@@ -900,8 +900,133 @@ connection slave;
DROP TABLES federated.t1, federated.t2, federated.t11, federated.t12,
federated.t13, federated.t14;
--echo #
--echo # MDEV-37484: `Sql_cmd_dml::execute_inner`, `Sql_cmd_update::execute_inner` do not call Select handler for the engine involved
--echo #
connection default;
set global federated_pushdown=1;
connection slave;
create table federated.product_tag (product_id bigint);
CREATE TABLE federated.product (
`product_id` bigint(20) DEFAULT NULL,
`price` bigint(20) DEFAULT NULL,
`short_description` varchar(7998) DEFAULT NULL,
`brand` varchar(254) DEFAULT NULL,
`modified_dtm` datetime DEFAULT NULL,
`created_dtm` datetime DEFAULT NULL,
`modified_by` int(11) DEFAULT NULL
) CHARSET=latin1;
connection master;
--replace_result $SLAVE_MYPORT SLAVE_PORT
eval
create table federated.product_tag (product_id bigint)
ENGINE="FEDERATED"
CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/product_tag';
--replace_result $SLAVE_MYPORT SLAVE_PORT
eval
CREATE TABLE federated.product (
`product_id` bigint(20) DEFAULT NULL,
`price` bigint(20) DEFAULT NULL,
`short_description` varchar(7998) DEFAULT NULL,
`brand` varchar(254) DEFAULT NULL,
`modified_dtm` datetime DEFAULT NULL,
`created_dtm` datetime DEFAULT NULL,
`modified_by` int(11) DEFAULT NULL
)
ENGINE="FEDERATED" DEFAULT CHARSET=latin1
CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/product';
insert into federated.product_tag values (1),(2),(3),(4);
insert into federated.product values (1,22,'fes','rets','2011-12-12 12:12:12','2011-12-13 1:1:10',343);
insert into federated.product values (3,22,'fes','rets','2011-12-12 12:12:12','2011-12-13 1:1:10',343);
select * from federated.product order by product_id;
let $query=
update
federated.product p join
(select product_id from federated.product_tag limit 1000) t using (product_id)
set brand=p.product_id, price=555, modified_dtm='2011-12-15 15:15:30',
short_description=concat(short_description,modified_by);
eval explain format=json $query;
eval $query;
select * from federated.product order by product_id;
drop table federated.product_tag;
drop table federated.product;
connection slave;
drop table federated.product_tag;
drop table federated.product;
--echo # Setup
create or replace table federated.t1 (id int);
create or replace table federated.t2 (id int, op varchar(10), op_count int DEFAULT 0) CHARSET=latin1;
connection master;
--replace_result $SLAVE_MYPORT SLAVE_PORT
eval
create or replace table federated.t1 (id int)
ENGINE="FEDERATED"
CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1';
--replace_result $SLAVE_MYPORT SLAVE_PORT
eval
create or replace table federated.t2 (id int, op varchar(10), op_count int DEFAULT 0)
ENGINE="FEDERATED" DEFAULT CHARSET=latin1
CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t2';
insert into federated.t1 values (1),(2),(3),(4);
insert into federated.t2 (id, op) values (1, 'inserted'), (2, 'inserted'), (3, 'inserted'), (4, 'inserted');
select * from federated.t2 order by id;
--echo # Update tests
let $query=
update federated.t2 inner join federated.t1 on t2.id = t1.id
set t2.op = 'updated', t2.op_count = t2.op_count + 1
where t2.id in (1, 2);
eval explain format=json $query;
eval $query;
select * from federated.t2 order by id;
--echo # Prepared update stmt
PREPARE stmt_update FROM
'update federated.t2 inner join federated.t1 on t2.id = t1.id set t2.op_count = t2.op_count + 1, t2.op="updated" where t2.id in (1, 2)';
EXECUTE stmt_update;
DEALLOCATE PREPARE stmt_update;
select * from federated.t2 order by id;
--echo # Delete tests
explain format=json
delete federated.t2 from federated.t2 inner join federated.t1 on t2.id = t1.id and t2.op = 'updated';
delete federated.t2 from federated.t2 inner join federated.t1 on t2.id = t1.id and t2.op = 'updated';
select * from federated.t2 order by id;
--echo # Prepared delete stmt
PREPARE stmt_delete FROM
'delete federated.t2 from federated.t2 inner join federated.t1 on t2.id = t1.id where t2.id = 3';
EXECUTE stmt_delete;
DEALLOCATE PREPARE stmt_delete;
select * from federated.t2 order by id;
drop table federated.t1, federated.t2;
connection slave;
drop table federated.t1, federated.t2;
# cleanup
connection default;
set global federated_pushdown=0;
source include/federated_cleanup.inc;
--echo # End of 11.4 tests

View File

@@ -2430,10 +2430,6 @@ CREATE PROCEDURE low_priority()
SELECT * from t1 where f2=f1;
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 'low_priority()
SELECT * from t1 where f2=f1' at line 1
CREATE PROCEDURE master_ssl_verify_server_cert()
SELECT * from t1 where f2=f1;
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 'master_ssl_verify_server_cert()
SELECT * from t1 where f2=f1' at line 1
CREATE PROCEDURE match()
SELECT * from t1 where f2=f1;
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 'match()
@@ -4907,13 +4903,6 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
SELECT @x;
END' at line 2
DROP PROCEDURE IF EXISTS sp1;
CREATE PROCEDURE sp1()
master_ssl_verify_server_cert:BEGIN
SELECT @x;
END//
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 'master_ssl_verify_server_cert:BEGIN
SELECT @x;
END' at line 2
DROP PROCEDURE IF EXISTS sp1;
CREATE PROCEDURE sp1()
match:BEGIN
@@ -8437,12 +8426,6 @@ END//
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 'low_priority char;
END' at line 3
DROP PROCEDURE IF EXISTS sp1;
CREATE PROCEDURE sp1()
BEGIN
declare master_ssl_verify_server_cert char;
END//
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 'master_ssl_verify_server_cert char;
END' at line 3
DROP PROCEDURE IF EXISTS sp1;
CREATE PROCEDURE sp1()
BEGIN
@@ -10596,16 +10579,6 @@ Warnings:
Note 1305 PROCEDURE db_storedproc.sp1 does not exist
CREATE PROCEDURE sp1( )
BEGIN
declare master_ssl_verify_server_cert condition for sqlstate '02000';
declare exit handler for int set @var2 = 1;
END//
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 'master_ssl_verify_server_cert condition for sqlstate '02000';
declare exit ha...' at line 3
DROP PROCEDURE IF EXISTS sp1;
Warnings:
Note 1305 PROCEDURE db_storedproc.sp1 does not exist
CREATE PROCEDURE sp1( )
BEGIN
declare match condition for sqlstate '02000';
declare exit handler for match set @var2 = 1;
END//
@@ -12782,15 +12755,6 @@ Warnings:
Note 1305 PROCEDURE db_storedproc.sp1 does not exist
CREATE PROCEDURE sp1( )
BEGIN
declare master_ssl_verify_server_cert handler for sqlstate '02000' set @var2 = 1;
END//
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 'master_ssl_verify_server_cert handler for sqlstate '02000' set @var2 = 1;
END' at line 3
DROP PROCEDURE IF EXISTS sp1;
Warnings:
Note 1305 PROCEDURE db_storedproc.sp1 does not exist
CREATE PROCEDURE sp1( )
BEGIN
declare match handler for sqlstate '02000' set @var2 = 1;
END//
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 'match handler for sqlstate '02000' set @var2 = 1;
@@ -17247,8 +17211,7 @@ set f1 = f1;
return f1;
END//
SELECT fn104('\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0?\0\0\0\0\0\0?\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@');
fn104('\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0?\0\0\0\0\0\0?\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@')
??@@@@
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
DROP FUNCTION IF EXISTS fn105;
CREATE FUNCTION fn105( f1 point) returns point
BEGIN
@@ -18382,8 +18345,7 @@ set f1 = f1;
SELECT f1;
END//
CALL sp104('\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0?\0\0\0\0\0\0?\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@');
f1
??@@@@
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
DROP PROCEDURE IF EXISTS sp105;
CREATE PROCEDURE sp105( f1 point)
BEGIN

View File

@@ -1450,10 +1450,6 @@ CREATE PROCEDURE loop()
CREATE PROCEDURE low_priority()
SELECT * from t1 where f2=f1;
--error ER_PARSE_ERROR
CREATE PROCEDURE master_ssl_verify_server_cert()
SELECT * from t1 where f2=f1;
--error ER_PARSE_ERROR
CREATE PROCEDURE match()
SELECT * from t1 where f2=f1;
@@ -4543,14 +4539,6 @@ delimiter ;//
DROP PROCEDURE IF EXISTS sp1;
--enable_warnings
delimiter //;
--error ER_PARSE_ERROR
CREATE PROCEDURE sp1()
master_ssl_verify_server_cert:BEGIN
SELECT @x;
END//
delimiter ;//
--disable_warnings
DROP PROCEDURE IF EXISTS sp1;
--enable_warnings
@@ -10031,14 +10019,6 @@ delimiter ;//
DROP PROCEDURE IF EXISTS sp1;
--enable_warnings
delimiter //;
--error ER_PARSE_ERROR
CREATE PROCEDURE sp1()
BEGIN
declare master_ssl_verify_server_cert char;
END//
delimiter ;//
--disable_warnings
DROP PROCEDURE IF EXISTS sp1;
--enable_warnings
@@ -12663,17 +12643,6 @@ delimiter ;//
DROP PROCEDURE IF EXISTS sp1;
delimiter //;
--error ER_PARSE_ERROR
CREATE PROCEDURE sp1( )
BEGIN
declare master_ssl_verify_server_cert condition for sqlstate '02000';
declare exit handler for int set @var2 = 1;
END//
delimiter ;//
DROP PROCEDURE IF EXISTS sp1;
delimiter //;
--error ER_PARSE_ERROR
CREATE PROCEDURE sp1( )
@@ -15163,16 +15132,6 @@ delimiter ;//
DROP PROCEDURE IF EXISTS sp1;
delimiter //;
--error ER_PARSE_ERROR
CREATE PROCEDURE sp1( )
BEGIN
declare master_ssl_verify_server_cert handler for sqlstate '02000' set @var2 = 1;
END//
delimiter ;//
DROP PROCEDURE IF EXISTS sp1;
delimiter //;
--error ER_PARSE_ERROR
CREATE PROCEDURE sp1( )

View File

@@ -0,0 +1,627 @@
connection node_2;
connection node_1;
SET GLOBAL sql_mode=0;
SET sql_mode=DEFAULT;
CREATE TABLE t (c INT,c2 BLOB NOT NULL,KEY k2 (c2 (1),c)) DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;
INSERT INTO t (c) VALUES (1),(1),(1),(1),(1);
Warnings:
Warning 1364 Field 'c2' doesn't have a default value
SELECT * from t;
c c2
1
1
1
1
1
DROP TABLE t;
CREATE TABLE t (c INT,c2 BLOB NOT NULL,UNIQUE KEY k2 (c2 (1),c)) DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;
INSERT INTO t (c) VALUES (1),(2),(3),(4),(5);
Warnings:
Warning 1364 Field 'c2' doesn't have a default value
UPDATE t SET c2=NULL WHERE c = 1;
Warnings:
Warning 1048 Column 'c2' cannot be null
UPDATE t SET c2="" WHERE c=1;
UPDATE t SET c2="TESTtest" WHERE c = 1;
UPDATE t SET c2="BUGbug" WHERE c2 = "TESTtest";
DELETE FROM t WHERE c2="BUGbug";
SELECT * from t;
c c2
2
3
4
5
DROP TABLE t;
CREATE TABLE t (c INT,c2 BLOB NOT NULL,KEY k2 (c, c2 (1))) DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;
INSERT INTO t (c) VALUES (1),(2),(3),(4),(5);
Warnings:
Warning 1364 Field 'c2' doesn't have a default value
UPDATE t SET c2=NULL WHERE c = 1;
Warnings:
Warning 1048 Column 'c2' cannot be null
UPDATE t SET c2="" WHERE c=1;
UPDATE t SET c2="TESTtest" WHERE c = 1;
UPDATE t SET c2="BUGbug" WHERE c2 = "TESTtest";
DELETE FROM t WHERE c2="BUGbug";
SELECT * from t;
c c2
2
3
4
5
DROP TABLE t;
CREATE TABLE t (c INT,c2 VARCHAR(270) NOT NULL,UNIQUE KEY k2 (c2 (1),c)) DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;
INSERT INTO t (c) VALUES (1),(2),(3),(4),(5);
Warnings:
Warning 1364 Field 'c2' doesn't have a default value
UPDATE t SET c2=NULL WHERE c = 1;
Warnings:
Warning 1048 Column 'c2' cannot be null
UPDATE t SET c2="" WHERE c=1;
UPDATE t SET c2="TESTtest" WHERE c = 1;
UPDATE t SET c2="BUGbug" WHERE c2 = "TESTtest";
DELETE FROM t WHERE c2="BUGbug";
SELECT * from t;
c c2
2
3
4
5
DROP TABLE t;
CREATE TABLE t (c INT,c2 VARCHAR(270) NOT NULL,KEY k2 (c, c2 (1))) DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;
INSERT INTO t (c) VALUES (1),(2),(3),(4),(5);
Warnings:
Warning 1364 Field 'c2' doesn't have a default value
UPDATE t SET c2=NULL WHERE c = 1;
Warnings:
Warning 1048 Column 'c2' cannot be null
UPDATE t SET c2="" WHERE c=1;
UPDATE t SET c2="TESTtest" WHERE c = 1;
UPDATE t SET c2="BUGbug" WHERE c2 = "TESTtest";
DELETE FROM t WHERE c2="BUGbug";
SELECT * from t;
c c2
2
3
4
5
DROP TABLE t;
CREATE TABLE t (c INT,c2 CHAR(80) NOT NULL,UNIQUE KEY k2 (c2 (1),c)) DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;
UPDATE t SET c2=NULL WHERE c = 1;
UPDATE t SET c2="" WHERE c=1;
UPDATE t SET c2="TESTtest" WHERE c = 1;
UPDATE t SET c2="BUGbug" WHERE c2 = "TESTtest";
DELETE FROM t WHERE c2="BUGbug";
INSERT INTO t (c) VALUES (1),(2),(3),(4),(5);
Warnings:
Warning 1364 Field 'c2' doesn't have a default value
SELECT * from t;
c c2
1
2
3
4
5
DROP TABLE t;
CREATE TABLE t (c INT,c2 CHAR(80) NOT NULL,KEY k2 (c, c2 (1))) DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;
UPDATE t SET c2=NULL WHERE c = 1;
UPDATE t SET c2="" WHERE c=1;
UPDATE t SET c2="TESTtest" WHERE c = 1;
UPDATE t SET c2="BUGbug" WHERE c2 = "TESTtest";
DELETE FROM t WHERE c2="BUGbug";
INSERT INTO t (c) VALUES (1),(2),(3),(4),(5);
Warnings:
Warning 1364 Field 'c2' doesn't have a default value
SELECT * from t;
c c2
1
2
3
4
5
DROP TABLE t;
CREATE TABLE t (c INT,c2 TEXT NOT NULL,UNIQUE KEY k2 (c2 (1),c)) DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;
INSERT INTO t (c) VALUES (1),(2),(3),(4),(5);
Warnings:
Warning 1364 Field 'c2' doesn't have a default value
UPDATE t SET c2=NULL WHERE c = 1;
Warnings:
Warning 1048 Column 'c2' cannot be null
UPDATE t SET c2="" WHERE c=1;
UPDATE t SET c2="TESTtest" WHERE c = 1;
UPDATE t SET c2="BUGbug" WHERE c2 = "TESTtest";
DELETE FROM t WHERE c2="BUGbug";
SELECT * from t;
c c2
2
3
4
5
DROP TABLE t;
CREATE TABLE t (c INT,c2 TEXT NOT NULL,KEY k2 (c, c2 (1))) DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;
INSERT INTO t (c) VALUES (1),(2),(3),(4),(5);
Warnings:
Warning 1364 Field 'c2' doesn't have a default value
UPDATE t SET c2=NULL WHERE c = 1;
Warnings:
Warning 1048 Column 'c2' cannot be null
UPDATE t SET c2="" WHERE c=1;
UPDATE t SET c2="TESTtest" WHERE c = 1;
UPDATE t SET c2="BUGbug" WHERE c2 = "TESTtest";
DELETE FROM t WHERE c2="BUGbug";
SELECT * from t;
c c2
2
3
4
5
DROP TABLE t;
CREATE TABLE t (c INT PRIMARY KEY,c2 BLOB NOT NULL,UNIQUE KEY k2 (c2 (1),c)) DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;
INSERT INTO t (c) VALUES (1),(2),(3),(4),(5);
Warnings:
Warning 1364 Field 'c2' doesn't have a default value
UPDATE t SET c2=NULL WHERE c = 1;
Warnings:
Warning 1048 Column 'c2' cannot be null
UPDATE t SET c2="" WHERE c=1;
UPDATE t SET c2="TESTtest" WHERE c = 1;
UPDATE t SET c2="BUGbug" WHERE c2 = "TESTtest";
DELETE FROM t WHERE c2="BUGbug";
SELECT * from t;
c c2
2
3
4
5
DROP TABLE t;
CREATE TABLE t (c INT PRIMARY KEY,c2 BLOB NOT NULL,KEY k2 (c, c2 (1))) DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;
INSERT INTO t (c) VALUES (1),(2),(3),(4),(5);
Warnings:
Warning 1364 Field 'c2' doesn't have a default value
UPDATE t SET c2=NULL WHERE c = 1;
Warnings:
Warning 1048 Column 'c2' cannot be null
UPDATE t SET c2="" WHERE c=1;
UPDATE t SET c2="TESTtest" WHERE c = 1;
UPDATE t SET c2="BUGbug" WHERE c2 = "TESTtest";
DELETE FROM t WHERE c2="BUGbug";
SELECT * from t;
c c2
2
3
4
5
DROP TABLE t;
CREATE TABLE t (c INT PRIMARY KEY,c2 VARCHAR(270) NOT NULL,UNIQUE KEY k2 (c2 (1),c)) DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;
INSERT INTO t (c) VALUES (1),(2),(3),(4),(5);
Warnings:
Warning 1364 Field 'c2' doesn't have a default value
UPDATE t SET c2=NULL WHERE c = 1;
Warnings:
Warning 1048 Column 'c2' cannot be null
UPDATE t SET c2="" WHERE c=1;
UPDATE t SET c2="TESTtest" WHERE c = 1;
UPDATE t SET c2="BUGbug" WHERE c2 = "TESTtest";
DELETE FROM t WHERE c2="BUGbug";
SELECT * from t;
c c2
2
3
4
5
DROP TABLE t;
CREATE TABLE t (c INT PRIMARY KEY,c2 VARCHAR(270) NOT NULL,KEY k2 (c, c2 (1))) DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;
INSERT INTO t (c) VALUES (1),(2),(3),(4),(5);
Warnings:
Warning 1364 Field 'c2' doesn't have a default value
UPDATE t SET c2=NULL WHERE c = 1;
Warnings:
Warning 1048 Column 'c2' cannot be null
UPDATE t SET c2="" WHERE c=1;
UPDATE t SET c2="TESTtest" WHERE c = 1;
UPDATE t SET c2="BUGbug" WHERE c2 = "TESTtest";
DELETE FROM t WHERE c2="BUGbug";
SELECT * from t;
c c2
2
3
4
5
DROP TABLE t;
CREATE TABLE t (c INT PRIMARY KEY,c2 CHAR(80) NOT NULL,UNIQUE KEY k2 (c2 (1),c)) DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;
UPDATE t SET c2=NULL WHERE c = 1;
UPDATE t SET c2="" WHERE c=1;
UPDATE t SET c2="TESTtest" WHERE c = 1;
UPDATE t SET c2="BUGbug" WHERE c2 = "TESTtest";
DELETE FROM t WHERE c2="BUGbug";
INSERT INTO t (c) VALUES (1),(2),(3),(4),(5);
Warnings:
Warning 1364 Field 'c2' doesn't have a default value
SELECT * from t;
c c2
1
2
3
4
5
DROP TABLE t;
CREATE TABLE t (c INT PRIMARY KEY,c2 CHAR(80) NOT NULL,KEY k2 (c, c2 (1))) DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;
UPDATE t SET c2=NULL WHERE c = 1;
UPDATE t SET c2="" WHERE c=1;
UPDATE t SET c2="TESTtest" WHERE c = 1;
UPDATE t SET c2="BUGbug" WHERE c2 = "TESTtest";
DELETE FROM t WHERE c2="BUGbug";
INSERT INTO t (c) VALUES (1),(2),(3),(4),(5);
Warnings:
Warning 1364 Field 'c2' doesn't have a default value
SELECT * from t;
c c2
1
2
3
4
5
DROP TABLE t;
CREATE TABLE t (c INT PRIMARY KEY,c2 TEXT NOT NULL,UNIQUE KEY k2 (c2 (1),c)) DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;
INSERT INTO t (c) VALUES (1),(2),(3),(4),(5);
Warnings:
Warning 1364 Field 'c2' doesn't have a default value
UPDATE t SET c2=NULL WHERE c = 1;
Warnings:
Warning 1048 Column 'c2' cannot be null
UPDATE t SET c2="" WHERE c=1;
UPDATE t SET c2="TESTtest" WHERE c = 1;
UPDATE t SET c2="BUGbug" WHERE c2 = "TESTtest";
DELETE FROM t WHERE c2="BUGbug";
SELECT * from t;
c c2
2
3
4
5
DROP TABLE t;
CREATE TABLE t (c INT PRIMARY KEY,c2 TEXT NOT NULL,KEY k2 (c, c2 (1))) DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;
INSERT INTO t (c) VALUES (1),(2),(3),(4),(5);
Warnings:
Warning 1364 Field 'c2' doesn't have a default value
UPDATE t SET c2=NULL WHERE c = 1;
Warnings:
Warning 1048 Column 'c2' cannot be null
UPDATE t SET c2="" WHERE c=1;
UPDATE t SET c2="TESTtest" WHERE c = 1;
UPDATE t SET c2="BUGbug" WHERE c2 = "TESTtest";
DELETE FROM t WHERE c2="BUGbug";
SELECT * from t;
c c2
2
3
4
5
DROP TABLE t;
SET GLOBAL sql_mode=0;
SET sql_mode=DEFAULT;
CREATE TABLE t (c INT,c2 BLOB,KEY k2 (c2 (6),c)) DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;
INSERT INTO t (c) VALUES (1),(1),(1),(1),(1);
UPDATE t SET c2=NULL WHERE c = 1;
UPDATE t SET c2="" WHERE c=1;
UPDATE t SET c2="TESTtest" WHERE c = 1;
UPDATE t SET c2="BUGbug" WHERE c2 = "TESTtest";
DELETE FROM t WHERE c2="BUGbug";
SELECT * FROM t;
c c2
DROP TABLE t;
CREATE TABLE t (c INT,c2 BLOB NOT NULL,KEY k2 (c2 (6),c)) DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;
INSERT INTO t (c) VALUES (1),(1),(1),(1),(1);
Warnings:
Warning 1364 Field 'c2' doesn't have a default value
UPDATE t SET c2=NULL WHERE c = 1;
Warnings:
Warning 1048 Column 'c2' cannot be null
Warning 1048 Column 'c2' cannot be null
Warning 1048 Column 'c2' cannot be null
Warning 1048 Column 'c2' cannot be null
Warning 1048 Column 'c2' cannot be null
UPDATE t SET c2="" WHERE c=1;
UPDATE t SET c2="TESTtest" WHERE c = 1;
UPDATE t SET c2="BUGbug" WHERE c2 = "TESTtest";
DELETE FROM t WHERE c2="BUGbug";
SELECT * FROM t;
c c2
DROP TABLE t;
CREATE TABLE t (c INT NOT NULL PRIMARY KEY,c2 BLOB,KEY k2 (c2 (6),c)) DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;
INSERT INTO t (c) VALUES (1),(2),(3),(4),(5);
UPDATE t SET c2=NULL WHERE c = 1;
UPDATE t SET c2="" WHERE c=1;
UPDATE t SET c2="TESTtest" WHERE c = 1;
UPDATE t SET c2="BUGbug" WHERE c2 = "TESTtest";
DELETE FROM t WHERE c2="BUGbug";
SELECT * FROM t;
c c2
2 NULL
3 NULL
4 NULL
5 NULL
DROP TABLE t;
CREATE TABLE t (c INT NOT NULL PRIMARY KEY,c2 BLOB NOT NULL,KEY k2 (c2 (6),c)) DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;
INSERT INTO t (c) VALUES (1),(2),(3),(4),(5);
Warnings:
Warning 1364 Field 'c2' doesn't have a default value
UPDATE t SET c2=NULL WHERE c = 1;
Warnings:
Warning 1048 Column 'c2' cannot be null
UPDATE t SET c2="" WHERE c=1;
UPDATE t SET c2="TESTtest" WHERE c = 1;
UPDATE t SET c2="BUGbug" WHERE c2 = "TESTtest";
DELETE FROM t WHERE c2="BUGbug";
SELECT * FROM t;
c c2
2
3
4
5
DROP TABLE t;
CREATE TABLE t (c INT,c2 VARCHAR(270),KEY k2 (c2 (6),c)) DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;
INSERT INTO t (c) VALUES (1),(1),(1),(1),(1);
UPDATE t SET c2=NULL WHERE c = 1;
UPDATE t SET c2="" WHERE c=1;
UPDATE t SET c2="TESTtest" WHERE c = 1;
UPDATE t SET c2="BUGbug" WHERE c2 = "TESTtest";
DELETE FROM t WHERE c2="BUGbug";
SELECT * FROM t;
c c2
DROP TABLE t;
CREATE TABLE t (c INT,c2 VARCHAR(270) NOT NULL,KEY k2 (c2 (6),c)) DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;
INSERT INTO t (c) VALUES (1),(1),(1),(1),(1);
Warnings:
Warning 1364 Field 'c2' doesn't have a default value
UPDATE t SET c2=NULL WHERE c = 1;
Warnings:
Warning 1048 Column 'c2' cannot be null
Warning 1048 Column 'c2' cannot be null
Warning 1048 Column 'c2' cannot be null
Warning 1048 Column 'c2' cannot be null
Warning 1048 Column 'c2' cannot be null
UPDATE t SET c2="" WHERE c=1;
UPDATE t SET c2="TESTtest" WHERE c = 1;
UPDATE t SET c2="BUGbug" WHERE c2 = "TESTtest";
DELETE FROM t WHERE c2="BUGbug";
SELECT * FROM t;
c c2
DROP TABLE t;
CREATE TABLE t (c INT NOT NULL PRIMARY KEY,c2 VARCHAR(270),KEY k2 (c2 (6),c)) DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;
INSERT INTO t (c) VALUES (1),(2),(3),(4),(5);
UPDATE t SET c2=NULL WHERE c = 1;
UPDATE t SET c2="" WHERE c=1;
UPDATE t SET c2="TESTtest" WHERE c = 1;
UPDATE t SET c2="BUGbug" WHERE c2 = "TESTtest";
DELETE FROM t WHERE c2="BUGbug";
SELECT * FROM t;
c c2
2 NULL
3 NULL
4 NULL
5 NULL
DROP TABLE t;
CREATE TABLE t (c INT NOT NULL PRIMARY KEY,c2 VARCHAR(270) NOT NULL,KEY k2 (c2 (6),c)) DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;
INSERT INTO t (c) VALUES (1),(2),(3),(4),(5);
Warnings:
Warning 1364 Field 'c2' doesn't have a default value
UPDATE t SET c2=NULL WHERE c = 1;
Warnings:
Warning 1048 Column 'c2' cannot be null
UPDATE t SET c2="" WHERE c=1;
UPDATE t SET c2="TESTtest" WHERE c = 1;
UPDATE t SET c2="BUGbug" WHERE c2 = "TESTtest";
DELETE FROM t WHERE c2="BUGbug";
SELECT * FROM t;
c c2
2
3
4
5
DROP TABLE t;
CREATE TABLE t (c INT,c2 CHAR(80),KEY k2 (c2 (6),c)) DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;
INSERT INTO t (c) VALUES (1),(1),(1),(1),(1);
UPDATE t SET c2=NULL WHERE c = 1;
UPDATE t SET c2="" WHERE c=1;
UPDATE t SET c2="TESTtest" WHERE c = 1;
UPDATE t SET c2="BUGbug" WHERE c2 = "TESTtest";
DELETE FROM t WHERE c2="BUGbug";
SELECT * FROM t;
c c2
DROP TABLE t;
CREATE TABLE t (c INT,c2 CHAR(80) NOT NULL,KEY k2 (c2 (6),c)) DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;
INSERT INTO t (c) VALUES (1),(1),(1),(1),(1);
Warnings:
Warning 1364 Field 'c2' doesn't have a default value
UPDATE t SET c2=NULL WHERE c = 1;
Warnings:
Warning 1048 Column 'c2' cannot be null
Warning 1048 Column 'c2' cannot be null
Warning 1048 Column 'c2' cannot be null
Warning 1048 Column 'c2' cannot be null
Warning 1048 Column 'c2' cannot be null
UPDATE t SET c2="" WHERE c=1;
UPDATE t SET c2="TESTtest" WHERE c = 1;
UPDATE t SET c2="BUGbug" WHERE c2 = "TESTtest";
DELETE FROM t WHERE c2="BUGbug";
SELECT * FROM t;
c c2
DROP TABLE t;
CREATE TABLE t (c INT NOT NULL PRIMARY KEY,c2 CHAR(80),KEY k2 (c2 (6),c)) DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;
INSERT INTO t (c) VALUES (1),(2),(3),(4),(5);
UPDATE t SET c2=NULL WHERE c = 1;
UPDATE t SET c2="" WHERE c=1;
UPDATE t SET c2="TESTtest" WHERE c = 1;
UPDATE t SET c2="BUGbug" WHERE c2 = "TESTtest";
DELETE FROM t WHERE c2="BUGbug";
SELECT * FROM t;
c c2
2 NULL
3 NULL
4 NULL
5 NULL
DROP TABLE t;
CREATE TABLE t (c INT NOT NULL PRIMARY KEY,c2 CHAR(80) NOT NULL,KEY k2 (c2 (6),c)) DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;
INSERT INTO t (c) VALUES (1),(2),(3),(4),(5);
Warnings:
Warning 1364 Field 'c2' doesn't have a default value
UPDATE t SET c2=NULL WHERE c = 1;
Warnings:
Warning 1048 Column 'c2' cannot be null
UPDATE t SET c2="" WHERE c=1;
UPDATE t SET c2="TESTtest" WHERE c = 1;
UPDATE t SET c2="BUGbug" WHERE c2 = "TESTtest";
DELETE FROM t WHERE c2="BUGbug";
SELECT * FROM t;
c c2
2
3
4
5
DROP TABLE t;
CREATE TABLE t (c INT,c2 TEXT,KEY k2 (c2 (6),c)) DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;
INSERT INTO t (c) VALUES (1),(1),(1),(1),(1);
UPDATE t SET c2=NULL WHERE c = 1;
UPDATE t SET c2="TESTtest" WHERE c = 1;
UPDATE t SET c2="BUGbug" WHERE c2 = "TESTtest";
DELETE FROM t WHERE c2="BUGbug";
SELECT * FROM t;
c c2
DROP TABLE t;
CREATE TABLE t (c INT,c2 TEXT NOT NULL,KEY k2 (c2 (6),c)) DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;
INSERT INTO t (c) VALUES (1),(1),(1),(1),(1);
Warnings:
Warning 1364 Field 'c2' doesn't have a default value
UPDATE t SET c2=NULL WHERE c = 1;
Warnings:
Warning 1048 Column 'c2' cannot be null
Warning 1048 Column 'c2' cannot be null
Warning 1048 Column 'c2' cannot be null
Warning 1048 Column 'c2' cannot be null
Warning 1048 Column 'c2' cannot be null
UPDATE t SET c2="TESTtest" WHERE c = 1;
UPDATE t SET c2="BUGbug" WHERE c2 = "TESTtest";
DELETE FROM t WHERE c2="BUGbug";
SELECT * FROM t;
c c2
DROP TABLE t;
CREATE TABLE t (c INT NOT NULL PRIMARY KEY,c2 TEXT,KEY k2 (c2 (6),c)) DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;
INSERT INTO t (c) VALUES (1),(2),(3),(4),(5);
UPDATE t SET c2=NULL WHERE c = 1;
UPDATE t SET c2="TESTtest" WHERE c = 1;
UPDATE t SET c2="BUGbug" WHERE c2 = "TESTtest";
DELETE FROM t WHERE c2="BUGbug";
SELECT * FROM t;
c c2
2 NULL
3 NULL
4 NULL
5 NULL
DROP TABLE t;
CREATE TABLE t (c INT NOT NULL PRIMARY KEY,c2 TEXT NOT NULL,KEY k2 (c2 (6),c)) DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;
INSERT INTO t (c) VALUES (1),(2),(3),(4),(5);
Warnings:
Warning 1364 Field 'c2' doesn't have a default value
UPDATE t SET c2=NULL WHERE c = 1;
Warnings:
Warning 1048 Column 'c2' cannot be null
UPDATE t SET c2="TESTtest" WHERE c = 1;
UPDATE t SET c2="BUGbug" WHERE c2 = "TESTtest";
DELETE FROM t WHERE c2="BUGbug";
SELECT * FROM t;
c c2
2
3
4
5
DROP TABLE t;
SET GLOBAL sql_mode=DEFAULT;
CREATE TABLE t (c INT,c2 BLOB,KEY k2 (c2 (6),c)) DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;
INSERT INTO t (c) VALUES (1),(1),(1),(1),(1);
UPDATE t SET c2=NULL WHERE c = 1;
UPDATE t SET c2="TESTtest" WHERE c = 1;
UPDATE t SET c2="BUGbug" WHERE c2 = "TESTtest";
DELETE FROM t WHERE c2="BUGbug";
SELECT * FROM t;
c c2
DROP TABLE t;
CREATE TABLE t (c INT,c2 VARCHAR(270),KEY k2 (c2 (6),c)) DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;
INSERT INTO t (c) VALUES (1),(1),(1),(1),(1);
UPDATE t SET c2=NULL WHERE c = 1;
UPDATE t SET c2="TESTtest" WHERE c = 1;
UPDATE t SET c2="BUGbug" WHERE c2 = "TESTtest";
DELETE FROM t WHERE c2="BUGbug";
SELECT * FROM t;
c c2
DROP TABLE t;
CREATE TABLE t (c INT,c2 CHAR(80),KEY k2 (c2 (6),c)) DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;
INSERT INTO t (c) VALUES (1),(1),(1),(1),(1);
UPDATE t SET c2=NULL WHERE c = 1;
UPDATE t SET c2="TESTtest" WHERE c = 1;
UPDATE t SET c2="BUGbug" WHERE c2 = "TESTtest";
DELETE FROM t WHERE c2="BUGbug";
SELECT * FROM t;
c c2
DROP TABLE t;
CREATE TABLE t (c INT,c2 TEXT,KEY k2 (c2 (6),c)) DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;
INSERT INTO t (c) VALUES (1),(1),(1),(1),(1);
UPDATE t SET c2=NULL WHERE c = 1;
UPDATE t SET c2="TESTtest" WHERE c = 1;
UPDATE t SET c2="BUGbug" WHERE c2 = "TESTtest";
DELETE FROM t WHERE c2="BUGbug";
SELECT * FROM t;
c c2
DROP TABLE t;
CREATE TABLE t (c INT NOT NULL PRIMARY KEY,c2 BLOB,KEY k2 (c2 (6),c)) DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;
INSERT INTO t (c) VALUES (1),(2),(3),(4),(5);
UPDATE t SET c2=NULL WHERE c = 1;
UPDATE t SET c2="TESTtest" WHERE c = 1;
UPDATE t SET c2="BUGbug" WHERE c2 = "TESTtest";
DELETE FROM t WHERE c2="BUGbug";
SELECT * FROM t;
c c2
2 NULL
3 NULL
4 NULL
5 NULL
DROP TABLE t;
CREATE TABLE t (c INT NOT NULL PRIMARY KEY,c2 VARCHAR(270),KEY k2 (c2 (6),c)) DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;
INSERT INTO t (c) VALUES (1),(2),(3),(4),(5);
UPDATE t SET c2=NULL WHERE c = 1;
UPDATE t SET c2="TESTtest" WHERE c = 1;
UPDATE t SET c2="BUGbug" WHERE c2 = "TESTtest";
DELETE FROM t WHERE c2="BUGbug";
SELECT * FROM t;
c c2
2 NULL
3 NULL
4 NULL
5 NULL
DROP TABLE t;
CREATE TABLE t (c INT NOT NULL PRIMARY KEY,c2 CHAR(80),KEY k2 (c2 (6),c)) DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;
INSERT INTO t (c) VALUES (1),(2),(3),(4),(5);
UPDATE t SET c2=NULL WHERE c = 1;
UPDATE t SET c2="TESTtest" WHERE c = 1;
UPDATE t SET c2="BUGbug" WHERE c2 = "TESTtest";
DELETE FROM t WHERE c2="BUGbug";
SELECT * FROM t;
c c2
2 NULL
3 NULL
4 NULL
5 NULL
DROP TABLE t;
CREATE TABLE t (c INT NOT NULL PRIMARY KEY,c2 TEXT,KEY k2 (c2 (6),c)) DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;
INSERT INTO t (c) VALUES (1),(2),(3),(4),(5);
UPDATE t SET c2=NULL WHERE c = 1;
UPDATE t SET c2="TESTtest" WHERE c = 1;
UPDATE t SET c2="BUGbug" WHERE c2 = "TESTtest";
DELETE FROM t WHERE c2="BUGbug";
SELECT * FROM t;
c c2
2 NULL
3 NULL
4 NULL
5 NULL
DROP TABLE t;

View File

@@ -0,0 +1,127 @@
connection node_2;
connection node_1;
connection node_1;
CREATE TABLE t1 (c INT);
INSERT INTO t1 VALUES (0),(0);
CREATE TABLE t2 (c INT);
SET SESSION wsrep_trx_fragment_unit='STATEMENTS';
SET SESSION wsrep_trx_fragment_size=2;
DROP TABLE mysql.wsrep_streaming_log;
ERROR 42000: DROP command denied to user 'root'@'localhost' for table `mysql`.`wsrep_streaming_log`
CREATE TRIGGER tgr AFTER INSERT ON t2 FOR EACH ROW UPDATE t1 SET c=c+1;
INSERT INTO t2 VALUES (1),(2);
SELECT * FROM t1;
c
2
2
SELECT * FROM t2;
c
1
2
SET wsrep_trx_fragment_unit=DEFAULT;
SET GLOBAL wsrep_trx_fragment_size=DEFAULT;
DROP TRIGGER tgr;
DROP TABLE t1, t2;
connection node_2;
SET GLOBAL wsrep_on=OFF;
SET SESSION wsrep_trx_fragment_unit='STATEMENTS';
ERROR 42000: Variable 'wsrep_trx_fragment_unit' can't be set to the value of 'STATEMENTS'
SELECT @@wsrep_trx_fragment_unit;
@@wsrep_trx_fragment_unit
bytes
SELECT @@wsrep_trx_fragment_size;
@@wsrep_trx_fragment_size
0
SET SESSION wsrep_trx_fragment_size = 2;
ERROR 42000: Variable 'wsrep_trx_fragment_size' can't be set to the value of '2'
SHOW WARNINGS;
Level Code Message
Warning 1231 Cannot set 'wsrep_trx_fragment_size' to a value other than 0 because wsrep is switched off.
Error 1231 Variable 'wsrep_trx_fragment_size' can't be set to the value of '2'
SELECT @@wsrep_trx_fragment_unit;
@@wsrep_trx_fragment_unit
bytes
SELECT @@wsrep_trx_fragment_size;
@@wsrep_trx_fragment_size
0
DROP TABLE mysql.wsrep_streaming_log;
SET SESSION wsrep_trx_fragment_unit='STATEMENTS';
ERROR 42000: Variable 'wsrep_trx_fragment_unit' can't be set to the value of 'STATEMENTS'
SET SESSION wsrep_trx_fragment_size = 2;
ERROR 42000: Variable 'wsrep_trx_fragment_size' can't be set to the value of '2'
SHOW WARNINGS;
Level Code Message
Warning 1231 Cannot set 'wsrep_trx_fragment_size' to a value other than 0 because wsrep is switched off.
Error 1231 Variable 'wsrep_trx_fragment_size' can't be set to the value of '2'
SELECT @@wsrep_trx_fragment_unit;
@@wsrep_trx_fragment_unit
bytes
SELECT @@wsrep_trx_fragment_size;
@@wsrep_trx_fragment_size
0
SET SESSION wsrep_trx_fragment_size = 0;
SELECT @@wsrep_trx_fragment_unit;
@@wsrep_trx_fragment_unit
bytes
SELECT @@wsrep_trx_fragment_size;
@@wsrep_trx_fragment_size
0
SET GLOBAL wsrep_on=ON;
SET SESSION wsrep_trx_fragment_unit='STATEMENTS';
ERROR 42000: Variable 'wsrep_trx_fragment_unit' can't be set to the value of 'STATEMENTS'
SET SESSION wsrep_trx_fragment_size = 2;
ERROR 42000: Variable 'wsrep_trx_fragment_size' can't be set to the value of '2'
SHOW WARNINGS;
Level Code Message
Warning 1231 Cannot set 'wsrep_trx_fragment_size' to a value other than 0 because streaming table mysql.wsrep_streaming_log does not exists.
Error 1231 Variable 'wsrep_trx_fragment_size' can't be set to the value of '2'
SELECT @@wsrep_trx_fragment_unit;
@@wsrep_trx_fragment_unit
bytes
SELECT @@wsrep_trx_fragment_size;
@@wsrep_trx_fragment_size
0
SET GLOBAL wsrep_on=OFF;
CREATE TABLE IF NOT EXISTS mysql.wsrep_streaming_log
(
node_uuid CHAR(36),
trx_id BIGINT,
seqno BIGINT,
flags INT NOT NULL,
frag LONGBLOB NOT NULL,
PRIMARY KEY (node_uuid, trx_id, seqno)
) ENGINE=InnoDB STATS_PERSISTENT=0 CHARSET=latin1;
SET GLOBAL wsrep_on=ON;
connection node_1;
CREATE TABLE t1 (c INT);
INSERT INTO t1 VALUES (0),(0);
CREATE TABLE t2 (c INT);
SET SESSION wsrep_trx_fragment_unit='STATEMENTS';
SET SESSION wsrep_trx_fragment_size=2;
CREATE TRIGGER tgr AFTER INSERT ON t2 FOR EACH ROW UPDATE t1 SET c=c+1;
INSERT INTO t2 VALUES (1),(2);
SELECT * FROM t1;
c
2
2
SELECT * FROM t2;
c
1
2
connection node_2;
INSERT INTO t2 VALUES (1),(2);
SELECT * FROM t1;
c
4
4
SELECT * FROM t2;
c
1
2
1
2
connection node_1;
SET wsrep_trx_fragment_unit=DEFAULT;
SET GLOBAL wsrep_trx_fragment_size=DEFAULT;
DROP TRIGGER tgr;
DROP TABLE t1, t2;

View File

@@ -0,0 +1,22 @@
connection node_2;
connection node_1;
connection node_2;
SET GLOBAL server_audit_logging=ON;
connection node_1;
CREATE TABLE t1(a INT);
INSERT INTO t1 VALUES (1);
connection node_2;
# Now checking the audit log
TIME,HOSTNAME,root,localhost:PORT,ID,ID,QUERY,test,'SET GLOBAL server_audit_logging=ON',0
TIME,HOSTNAME,<wsrep_applier>,,ID,ID,CREATE,test,t1,
TIME,HOSTNAME,<wsrep_applier>,,ID,ID,WRITE,test,t1,
TIME,HOSTNAME,root,localhost:PORT,ID,ID,READ,test,t1,
TIME,HOSTNAME,root,localhost:PORT,ID,ID,READ,mysql,table_stats,
TIME,HOSTNAME,root,localhost:PORT,ID,ID,READ,mysql,column_stats,
TIME,HOSTNAME,root,localhost:PORT,ID,ID,READ,mysql,index_stats,
TIME,HOSTNAME,root,localhost:PORT,ID,ID,QUERY,test,'SELECT COUNT(*) = 1 FROM test.t1',0
TIME,HOSTNAME,root,localhost:PORT,ID,ID,QUERY,test,'SELECT @@datadir',0
# resetting the test state
SET GLOBAL server_audit_logging=DEFAULT;
connection node_1;
DROP TABLE t1;

View File

@@ -1,7 +1,6 @@
connection node_2;
connection node_1;
connection node_1;
INSTALL PLUGIN IF NOT EXISTS connect SONAME 'ha_connect';
CREATE TABLE t1 (f INT) ENGINE=CONNECT;
Warnings:
Warning 1105 No table_type. Will be set to DOS
@@ -15,10 +14,7 @@ Error 1235 This version of MariaDB doesn't yet support 'non-InnoDB sequences in
Note 1235 ENGINE=SEQUENCE not supported by Galera
connection node_2;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`f` int(11) DEFAULT NULL
) ENGINE=CONNECT DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
ERROR 42S02: Table 'test.t1' doesn't exist
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
@@ -28,4 +24,3 @@ show create table t3;
ERROR 42S02: Table 'test.t3' doesn't exist
connection node_1;
DROP TABLE t1, t2;
UNINSTALL PLUGIN IF EXISTS connect;

View File

@@ -0,0 +1,52 @@
connection node_2;
connection node_1;
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1),(2);
CREATE TABLE t2 (a INT) ENGINE=Aria;
CREATE TRIGGER trg AFTER UPDATE ON t1 FOR EACH ROW INSERT INTO t2 VALUES (NEW.a);
SET GLOBAL wsrep_mode=replicate_aria;
UPDATE t1 SET a=10;
ERROR HY000: Transactional commit not supported by involved engine(s)
SELECT * FROM t1;
a
1
2
SELECT * FROM t2;
a
connection node_2;
SELECT * FROM t1;
a
1
2
SELECT * FROM t2;
a
connection node_1;
DROP TRIGGER trg;
DROP TABLE t1,t2;
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1),(2);
CREATE TABLE t2 (a INT) ENGINE=InnoDB;
CREATE TRIGGER trg AFTER UPDATE ON t1 FOR EACH ROW INSERT INTO t2 VALUES (NEW.a);
UPDATE t1 SET a=10;
SELECT * FROM t1;
a
10
10
SELECT * FROM t2;
a
10
10
connection node_2;
SELECT * FROM t1;
a
10
10
SELECT * FROM t2;
a
10
10
connection node_1;
DROP TRIGGER trg;
DROP TABLE t1,t2;
call mtr.add_suppression("WSREP: Replication of non-transactional engines is experimental. Storage engine Aria for table \'test\'\.\'t2\' is not supported in Galera");
SET GLOBAL wsrep_mode=DEFAULT;

View File

@@ -0,0 +1,53 @@
connection node_2;
connection node_1;
connection node_2;
connection node_1;
CREATE TABLE t1 (i INT NOT NULL PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
SET GLOBAL wsrep_forced_binlog_format='STATEMENT';
START TRANSACTION;
INSERT INTO t1(i) VALUES(NULL);
Warnings:
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the slave
INSERT INTO t1(i) VALUES(NULL);
Warnings:
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the slave
SET GLOBAL wsrep_forced_binlog_format='ROW';
INSERT INTO t1(i) VALUES(NULL);
INSERT INTO t1(i) VALUES(NULL);
COMMIT;
SET GLOBAL wsrep_forced_binlog_format='ROW';
START TRANSACTION;
INSERT INTO t1(i) VALUES(NULL);
INSERT INTO t1(i) VALUES(NULL);
SET GLOBAL wsrep_forced_binlog_format='STATEMENT';
INSERT INTO t1(i) VALUES(NULL);
Warnings:
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the slave
INSERT INTO t1(i) VALUES(NULL);
Warnings:
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the slave
COMMIT;
SELECT * FROM t1 ORDER BY i;
i
1
3
5
7
9
11
13
15
connection node_2;
SELECT * FROM t1 ORDER BY i;
i
1
3
5
7
9
11
13
15
connection node_1;
SET GLOBAL wsrep_forced_binlog_format='NONE';
DROP TABLE t1;

View File

@@ -0,0 +1,40 @@
connection node_2;
connection node_1;
SET sql_mode='';
SET SESSION autocommit=0;
SET SESSION enforce_storage_engine=Aria;
SET WSREP_OSU_METHOD = RSU;
CREATE TABLE t1 (a TEXT) ;
Warnings:
Note 1266 Using storage engine Aria for table 't1'
Note 1266 Using storage engine Aria for table 't1'
CREATE TABLE t2 (a TEXT) ;
Warnings:
Note 1266 Using storage engine Aria for table 't2'
Note 1266 Using storage engine Aria for table 't2'
SET SESSION autocommit=1;
REPLACE INTO t2 (a) SELECT a from t1;
ERROR 42000: This version of MariaDB doesn't yet support 'RSU on this table engine'
REPLACE INTO t2 (a) SELECT /*!99997 */ a from t1;
ERROR 42000: This version of MariaDB doesn't yet support 'RSU on this table engine'
SET WSREP_OSU_METHOD = TOI;
DROP TABLE t1,t2;
SET sql_mode='';
SET SESSION autocommit=0;
SET SESSION enforce_storage_engine=MyISAM;
SET WSREP_OSU_METHOD = RSU;
CREATE TABLE t1 (a TEXT) ;
Warnings:
Note 1266 Using storage engine MyISAM for table 't1'
Note 1266 Using storage engine MyISAM for table 't1'
CREATE TABLE t2 (a TEXT) ;
Warnings:
Note 1266 Using storage engine MyISAM for table 't2'
Note 1266 Using storage engine MyISAM for table 't2'
SET SESSION autocommit=1;
REPLACE INTO t2 (a) SELECT a from t1;
ERROR 42000: This version of MariaDB doesn't yet support 'RSU on this table engine'
REPLACE INTO t2 (a) SELECT /*!99997 */ a from t1;
ERROR 42000: This version of MariaDB doesn't yet support 'RSU on this table engine'
SET WSREP_OSU_METHOD = TOI;
DROP TABLE t1,t2;

View File

@@ -0,0 +1,18 @@
connection node_2;
connection node_1;
connection node_1;
connection node_2;
connection node_2;
SET SESSION max_error_count=0;
SET GLOBAL wsrep_ignore_apply_errors = 0;
GRANT SELECT ON *.* TO dummy@'localhost';
ERROR 28000: Can't find any matching row in the user table
SHOW WARNINGS;
Level Code Message
# Node_2 is on inconsistency state so kill it
SET SESSION wsrep_sync_wait = 0;
Killing server ...
connection node_1;
connection node_2;
SET GLOBAL wsrep_ignore_apply_errors = DEFAULT;
call mtr.add_suppression("Inconsistency detected: Inconsistent by consensus on");

View File

@@ -0,0 +1,17 @@
connection node_2;
connection node_1;
connection node_2;
connection node_1;
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
SET SESSION wsrep_trx_fragment_size=1;
START TRANSACTION;
INSERT INTO t1 VALUES (1);
INSERT INTO t1 VALUES (2);
COMMIT;
connection node_2;
SELECT COUNT(*) = 2 FROM t1;
COUNT(*) = 2
1
connection node_2;
connection node_1;
DROP TABLE t1;

View File

@@ -0,0 +1,35 @@
connection node_2;
connection node_1;
connection node_1;
connection node_2;
connection node_1;
SET GLOBAL wsrep_provider_options ='pc.ignore_sb=true;pc.weight=2';
connection node_2;
CREATE TABLE t1 (f1 INT) ENGINE=InnoDB;
SET GLOBAL wsrep_IGNORE_apply_errors=1;
SET SESSION wsrep_dirty_reads=1;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`f1` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
FLUSH HOSTS;
CREATE TABLE t1 (f1 INT) ENGINE=InnoDB;
ERROR 42S01: Table 't1' already exists
FLUSH HOSTS;
ERROR HY000: Galera replication not supported
SHOW WARNINGS;
Level Code Message
Error 4165 Galera replication not supported
Warning 4165 Galera cluster is not ready to execute replication
connection node_1;
# Wait until inconsistent node_2 leaves from cluster
connection node_2;
# Restart node_2
call mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on");
connection node_1;
# Wait until node_2 is back in the cluster
SET GLOBAL wsrep_provider_options ='pc.ignore_sb=false;pc.weight=1';
DROP TABLE t1;
disconnect node_2;
disconnect node_1;

View File

@@ -93,7 +93,7 @@ Got one of the listed errors
connection node_1;
DROP USER 'userMW416'@'localhost';
Warnings:
Note 4226 Dropped users 'userMW416'@'localhost' have active connections. Use KILL CONNECTION if they should not be used anymore.
Note 4227 Dropped users 'userMW416'@'localhost' have active connections. Use KILL CONNECTION if they should not be used anymore.
SHOW DATABASES;
Database
information_schema

View File

@@ -33,6 +33,28 @@ i c
3 dummy_text
5 dummy_text
7 dummy_text
insert into t1(i) values(null);
Warnings:
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the slave
insert into t1(i) values(null);
Warnings:
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the slave
insert into t1(i) values(null);
Warnings:
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the slave
insert into t1(i) values(null);
Warnings:
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the slave
select * from t1 order by i;
i c
1 dummy_text
3 dummy_text
5 dummy_text
7 dummy_text
9 dummy_text
11 dummy_text
13 dummy_text
15 dummy_text
connection node_2;
show variables like 'auto_increment%';
Variable_name Value
@@ -44,6 +66,10 @@ i c
3 dummy_text
5 dummy_text
7 dummy_text
9 dummy_text
11 dummy_text
13 dummy_text
15 dummy_text
SET GLOBAL wsrep_forced_binlog_format='none';
connection node_1;
SET GLOBAL wsrep_forced_binlog_format='none';

View File

@@ -0,0 +1,14 @@
connection node_2;
connection node_1;
#
# MDEV-38374 nonsense code in wsrep_store_key_val_for_row()
#
create table t1 (
id int auto_increment primary key,
blob_data longblob not null,
unique key idx_blob_prefix (blob_data(3072))
) engine=innodb;
insert into t1 (blob_data) values ('a');
update t1 set blob_data = repeat('x', 4000) where id = 1;
drop table t1;
# End of 10.6 tests

Some files were not shown because too many files have changed in this diff Show More