1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Merge 10.11 into 11.4

This commit is contained in:
Marko Mäkelä
2025-01-09 07:58:08 +02:00
473 changed files with 4731 additions and 3149 deletions

View File

@ -31,7 +31,7 @@ ENDIF()
# in RPM's:
#set(CPACK_RPM_SPEC_MORE_DEFINE "%define __spec_install_post /bin/true")
FOREACH(p CMP0022 CMP0046 CMP0040 CMP0048 CMP0054 CMP0074 CMP0075 CMP0069 CMP0135)
FOREACH(p CMP0022 CMP0046 CMP0040 CMP0048 CMP0054 CMP0067 CMP0074 CMP0075 CMP0069 CMP0135)
IF(POLICY ${p})
CMAKE_POLICY(SET ${p} NEW)
ENDIF()

View File

@ -5334,6 +5334,9 @@ put_info(const char *str,INFO_TYPE info_type, uint error, const char *sqlstate)
}
if (!opt_silent || info_type == INFO_ERROR)
{
report_progress_end();
fflush(stdout);
if (!inited)
{
#ifdef HAVE_SETUPTERM

View File

@ -459,9 +459,12 @@ bool get_mysql_vars(MYSQL *connection)
msg("Using server version %s", version_var);
if (!(ret= detect_mysql_capabilities_for_backup()))
if (opt_galera_info && !have_galera_enabled)
{
goto out;
msg("--galera-info is specified on the command "
"line, but the server does not support Galera "
"replication. Ignoring the option.");
opt_galera_info= false;
}
/* make sure datadir value is the same in configuration file */
@ -554,30 +557,6 @@ out:
return (ret);
}
/*********************************************************************//**
Query the server to find out what backup capabilities it supports.
@return true on success. */
bool
detect_mysql_capabilities_for_backup()
{
/* do some sanity checks */
if (opt_galera_info && !have_galera_enabled) {
msg("--galera-info is specified on the command "
"line, but the server does not support Galera "
"replication. Ignoring the option.");
opt_galera_info = false;
}
if (opt_slave_info && have_multi_threaded_slave &&
!have_gtid_slave) {
msg("The --slave-info option requires GTID enabled for a "
"multi-threaded slave.");
return(false);
}
return(true);
}
static
bool
select_incremental_lsn_from_history(lsn_t *incremental_lsn)

View File

@ -43,9 +43,6 @@ backup_cleanup();
bool
get_mysql_vars(MYSQL *connection);
bool
detect_mysql_capabilities_for_backup();
MYSQL *
xb_mysql_connect();

View File

@ -186,6 +186,7 @@ xb_fil_cur_open(
}
#else
err = fstat(cursor->file.m_file, &cursor->statinfo);
MSAN_STAT_WORKAROUND(&cursor->statinfo);
#endif
if (max_file_size < (ulonglong)cursor->statinfo.st_size) {
cursor->statinfo.st_size = (ulonglong)max_file_size;

View File

@ -916,13 +916,15 @@ datafiles_iter_next(datafiles_iter_t *it)
fil_system.space_list.begin() :
std::next(it->space);
while (it->space != fil_system.space_list.end() &&
(it->space->purpose != FIL_TYPE_TABLESPACE ||
UT_LIST_GET_LEN(it->space->chain) == 0))
while (it->space != fil_system.space_list.end()
&& UT_LIST_GET_LEN(it->space->chain) == 0)
++it->space;
if (it->space == fil_system.space_list.end())
goto end;
ut_ad(!it->space->is_temporary());
ut_ad(!it->space->is_being_imported());
it->node = UT_LIST_GET_FIRST(it->space->chain);
end:
@ -1114,7 +1116,8 @@ static void backup_file_op(uint32_t space_id, int type,
std::string space_name = filename_to_spacename(name, len);
ddl_tracker.id_to_name[space_id] = space_name;
ddl_tracker.delete_defer(space_id, space_name);
msg("DDL tracking : create %u \"%.*s\"", space_id, int(len), name);
msg("DDL tracking : create %" PRIu32 " \"%.*s\"",
space_id, int(len), name);
}
break;
case FILE_MODIFY:
@ -1130,7 +1133,7 @@ static void backup_file_op(uint32_t space_id, int type,
ddl_tracker.id_to_name[space_id] = new_space_name;
ddl_tracker.rename_defer(space_id, old_space_name,
new_space_name);
msg("DDL tracking : rename %u \"%.*s\",\"%.*s\"",
msg("DDL tracking : rename %" PRIu32 " \"%.*s\",\"%.*s\"",
space_id, int(len), name, int(new_len), new_name);
}
break;
@ -1138,7 +1141,8 @@ static void backup_file_op(uint32_t space_id, int type,
ddl_tracker.drops.insert(space_id);
ddl_tracker.delete_defer(
space_id, filename_to_spacename(name, len));
msg("DDL tracking : delete %u \"%.*s\"", space_id, int(len), name);
msg("DDL tracking : delete %" PRIu32 " \"%.*s\"",
space_id, int(len), name);
break;
default:
ut_ad(0);
@ -1189,13 +1193,14 @@ static void backup_file_op_fail(uint32_t space_id, int type,
const std::string spacename{filename_to_spacename(name, len)};
switch (type) {
case FILE_CREATE:
msg("DDL tracking : create %u \"%.*s\"", space_id, int(len), name);
msg("DDL tracking : create %" PRIu32 " \"%.*s\"",
space_id, int(len), name);
fail = !check_if_skip_table(spacename.c_str());
break;
case FILE_MODIFY:
break;
case FILE_RENAME:
msg("DDL tracking : rename %u \"%.*s\",\"%.*s\"",
msg("DDL tracking : rename %" PRIu32 " \"%.*s\",\"%.*s\"",
space_id, int(len), name, int(new_len), new_name);
fail = !check_if_skip_table(spacename.c_str())
|| !check_if_skip_table(
@ -1204,7 +1209,8 @@ static void backup_file_op_fail(uint32_t space_id, int type,
case FILE_DELETE:
fail = !check_if_skip_table(spacename.c_str())
&& !check_if_fts_table(spacename.c_str());
msg("DDL tracking : delete %u \"%.*s\"", space_id, int(len), name);
msg("DDL tracking : delete %" PRIu32 " \"%.*s\"",
space_id, int(len), name);
break;
default:
ut_ad(0);
@ -1225,7 +1231,7 @@ static void backup_undo_trunc(uint32_t space_id)
/* Function to store the space id of page0 INIT_PAGE
@param space_id space id which has page0 init page */
static void backup_first_page_op(space_id_t space_id)
static void backup_first_page_op(uint32_t space_id)
{
first_page_init_ids.insert(space_id);
}
@ -3955,8 +3961,8 @@ static void xb_load_single_table_tablespace(const char *dirname,
if (err == DB_SUCCESS && file->space_id() != SRV_TMP_SPACE_ID) {
mysql_mutex_lock(&fil_system.mutex);
space = fil_space_t::create(
file->space_id(), file->flags(),
FIL_TYPE_TABLESPACE, nullptr/* TODO: crypt_data */,
uint32_t(file->space_id()), file->flags(), false,
nullptr/* TODO: crypt_data */,
FIL_ENCRYPTION_DEFAULT,
file->handle() != OS_FILE_CLOSED);
ut_ad(space);
@ -4173,6 +4179,7 @@ next_file:
return(-1);
}
MSAN_STAT_WORKAROUND(&statinfo);
info->size = statinfo.st_size;
if (S_ISDIR(statinfo.st_mode)) {
@ -5691,8 +5698,8 @@ void CorruptedPages::backup_fix_ddl(ds_ctxt *ds_data, ds_ctxt *ds_meta)
iter != ddl_tracker.tables_in_backup.end();
iter++) {
const std::string name = iter->second;
uint32_t id = iter->first;
const std::string &name = iter->second;
if (ddl_tracker.drops.find(id) != ddl_tracker.drops.end()) {
dropped_tables.insert(name);
@ -5719,7 +5726,7 @@ void CorruptedPages::backup_fix_ddl(ds_ctxt *ds_data, ds_ctxt *ds_meta)
iter++) {
uint32_t id = iter->first;
std::string name = iter->second;
const std::string &name = iter->second;
if (ddl_tracker.tables_in_backup.find(id) != ddl_tracker.tables_in_backup.end()) {
/* already processed above */
@ -6016,8 +6023,8 @@ exit:
char tmpname[FN_REFLEN];
snprintf(tmpname, FN_REFLEN, "%s/xtrabackup_tmp_#%u",
dbname, fil_space->id);
snprintf(tmpname, FN_REFLEN, "%s/xtrabackup_tmp_#%"
PRIu32, dbname, fil_space->id);
msg("mariabackup: Renaming %s to %s.ibd",
fil_space->chain.start->name, tmpname);
@ -6072,8 +6079,8 @@ 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(info.space_id, flags,
FIL_TYPE_TABLESPACE, 0,
fil_space_t* space = fil_space_t::create(uint32_t(info.space_id),
flags, false, 0,
FIL_ENCRYPTION_DEFAULT, true);
mysql_mutex_unlock(&fil_system.mutex);
if (space) {
@ -6866,7 +6873,8 @@ error:
srv_max_dirty_pages_pct_lwm = srv_max_buf_pool_modified_pct;
}
if (innodb_init()) {
recv_sys.recovery_on = false;
if (innodb_init()) {
goto error;
}

View File

@ -78,5 +78,7 @@
{ "HA_ERR_ABORTED_BY_USER", HA_ERR_ABORTED_BY_USER, "" },
{ "HA_ERR_DISK_FULL", HA_ERR_DISK_FULL, "" },
{ "HA_ERR_INCOMPATIBLE_DEFINITION", HA_ERR_INCOMPATIBLE_DEFINITION, "" },
{ "HA_ERR_NO_ENCRYPTION", HA_ERR_NO_ENCRYPTION, "" },
{ "HA_ERR_COMMIT_ERROR", HA_ERR_COMMIT_ERROR, "" },
{ "HA_ERR_PARTITION_LIST", HA_ERR_PARTITION_LIST, ""},
{ "HA_ERR_NO_ENCRYPTION", HA_ERR_NO_ENCRYPTION, ""},
{ "HA_ERR_ROLLBACK", HA_ERR_ROLLBACK, "" },

View File

@ -105,6 +105,7 @@ typedef struct st_heap_block
uint recbuffer; /* Length of one saved record */
ulong records_in_block; /* Records in one heap-block */
ulong last_allocated; /* number of records there is allocated space for */
size_t alloc_size; /* Allocate blocks of this size */
} HP_BLOCK;
struct st_heap_info; /* For reference */

View File

@ -543,7 +543,8 @@ enum ha_base_keytype {
#define HA_ERR_COMMIT_ERROR 197
#define HA_ERR_PARTITION_LIST 198
#define HA_ERR_NO_ENCRYPTION 199
#define HA_ERR_LAST 199 /* Copy of last error nr * */
#define HA_ERR_ROLLBACK 200 /* Automatic rollback done */
#define HA_ERR_LAST 200 /* Copy of last error nr * */
/* Number of different errors */
#define HA_ERR_ERRORS (HA_ERR_LAST - HA_ERR_FIRST + 1)

View File

@ -679,10 +679,10 @@ typedef SOCKET_SIZE_TYPE size_socket;
*/
#define IO_SIZE 4096U
/*
How much overhead does malloc have. The code often allocates
How much overhead does malloc/my_malloc have. The code often allocates
something like 1024-MALLOC_OVERHEAD bytes
*/
#define MALLOC_OVERHEAD 8
#define MALLOC_OVERHEAD (8+24)
/* get memory in huncs */
#define ONCE_ALLOC_INIT (uint) 4096

View File

@ -110,7 +110,8 @@ static const char *handler_error_messages[]=
"Sequence values are conflicting",
"Error during commit",
"Cannot select partitions",
"Cannot initialize encryption. Check that all encryption parameters have been set"
"Cannot initialize encryption. Check that all encryption parameters have been set",
"Transaction was aborted",
};
#endif /* MYSYS_MY_HANDLER_ERRORS_INCLUDED */

View File

@ -257,9 +257,9 @@ extern void (*my_sigtstp_cleanup)(void),
/* Executed before jump to shell */
(*my_sigtstp_restart)(void);
/* Executed when coming from shell */
extern MYSQL_PLUGIN_IMPORT int my_umask; /* Default creation mask */
extern int my_umask_dir,
my_recived_signals, /* Signals we have got */
extern MYSQL_PLUGIN_IMPORT mode_t my_umask; /* Default creation mask */
extern mode_t my_umask_dir;
extern int my_recived_signals, /* Signals we have got */
my_safe_to_handle_signal, /* Set when allowed to SIGTSTP */
my_dont_interrupt; /* call remember_intr when set */
#ifdef _WIN32
@ -635,7 +635,7 @@ extern File my_open(const char *FileName,int Flags,myf MyFlags);
extern File my_register_filename(File fd, const char *FileName,
enum file_type type_of_file,
uint error_message_number, myf MyFlags);
extern File my_create(const char *FileName,int CreateFlags,
extern File my_create(const char *FileName, mode_t CreateFlags,
int AccessFlags, myf MyFlags);
extern int my_close(File Filedes,myf MyFlags);
extern int my_mkdir(const char *dir, int Flags, myf MyFlags);
@ -643,7 +643,7 @@ extern int my_readlink(char *to, const char *filename, myf MyFlags);
extern int my_is_symlink(const char *filename);
extern int my_realpath(char *to, const char *filename, myf MyFlags);
extern File my_create_with_symlink(const char *linkname, const char *filename,
int createflags, int access_flags,
mode_t createflags, int access_flags,
myf MyFlags);
extern int my_rename_with_symlink(const char *from,const char *to,myf MyFlags);
extern int my_symlink(const char *content, const char *linkname, myf MyFlags);
@ -893,6 +893,7 @@ extern void my_free_lock(void *ptr);
#define my_free_lock(A) my_free((A))
#endif
#define alloc_root_inited(A) ((A)->min_malloc != 0)
#define DEFAULT_ROOT_BLOCK_SIZE 1024
#define clear_alloc_root(A) do { (A)->free= (A)->used= (A)->pre_alloc= 0; (A)->min_malloc=0;} while(0)
extern void init_alloc_root(PSI_memory_key key, MEM_ROOT *mem_root,
size_t block_size, size_t pre_alloc_size,

View File

@ -0,0 +1,52 @@
/* Copyright (c) 2013, 2018, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */
#ifndef MYSQL_SERVICE_LOG_WARNINGS
#define MYSQL_SERVICE_LOG_WARNINGS
/**
@file
This service provides access to the log warning level for the
current session.
thd_log_warnings(thd)
@return thd->log_warnings
*/
#ifdef __cplusplus
extern "C" {
#endif
extern struct thd_log_warnings_service_st {
void *(*thd_log_warnings)(MYSQL_THD);
} *thd_log_warnings_service;
#ifdef MYSQL_DYNAMIC_PLUGIN
# define thd_log_warnings(THD) thd_log_warnings_service->thd_log_warnings(THD)
#else
/**
MDL_context accessor
@param thd the current session
@return pointer to thd->mdl_context
*/
int thd_log_warnings(MYSQL_THD thd);
#endif
#ifdef __cplusplus
}
#endif
#endif

View File

@ -2,6 +2,10 @@
# Bug #24200: Provide backwards compatibility mode for 4.x "rollback on
# transaction timeout"
#
--disable_query_log
call mtr.add_suppression("InnoDB: Transaction was aborted due to ");
--enable_query_log
--disable_warnings
drop table if exists t1;
--enable_warnings

View File

@ -454,9 +454,8 @@ sub mtr_report_stats ($$$$) {
# Print info about reporting the error
print
"The log files in var/log may give you some hint of what went wrong.\n\n",
"If you want to report this error, please read first ",
"the documentation\n",
"at http://dev.mysql.com/doc/mysql/en/mysql-test-suite.html\n\n";
"If you want to report this error, MariaDB's bug tracker is found at\n",
"https://jira.mariadb.org\n\n";
}
else

View File

@ -198,9 +198,8 @@ sub mtr_report_stats ($) {
print
"The log files in var/log may give you some hint\n",
"of what went wrong.\n",
"If you want to report this error, please read first ",
"the documentation at\n",
"http://dev.mysql.com/doc/mysql/en/mysql-test-suite.html\n";
"If you want to report this error, MariaDB's bug tracker is found at\n",
"https://jira.mariadb.org\n"
}
if (!$::opt_extern)
{

View File

@ -1,2 +1,3 @@
FOUND 1 /\[ERROR\] SSL error: Unable to get certificate/ in errorlog.err
FOUND 1 /\[ERROR\] SSL error: Failed to set ciphers to use/ in errorlog.err
# restart

View File

@ -19,4 +19,11 @@
--source include/search_pattern_in_file.inc
--remove_file $SEARCH_FILE
# No valid cipher suites
--error 1
--exec $MYSQLD --defaults-group-suffix=.1 --defaults-file=$MYSQLTEST_VARDIR/my.cnf --ssl-cipher=ECDHE-ECDSA-FAKE-CIPHER:ECDHE-RSA-INVALID --log-error=$errorlog
--let SEARCH_PATTERN=\[ERROR\] SSL error: Failed to set ciphers to use
--source include/search_pattern_in_file.inc
--remove_file $SEARCH_FILE
--source include/start_mysqld.inc

View File

@ -2,6 +2,10 @@
-- source include/have_innodb.inc
-- source include/not_binlog_format_row.inc
--disable_query_log
call mtr.add_suppression("InnoDB: Transaction was aborted due to ");
--enable_query_log
--echo #
--echo # Bug #39022: Mysql randomly crashing in lock_sec_rec_cons_read_sees
--echo #

View File

@ -96,6 +96,8 @@ drop view v1;
create table t1 (user_id char(64) character set utf8);
insert t1 values(1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12),(13),(14),(15),(16),(17);
set @@tmp_table_size = 1024;
Warnings:
Warning 1292 Truncated incorrect tmp_table_size value: '1024'
select count(distinct user_id) from t1;
count(distinct user_id)
17
@ -125,6 +127,8 @@ insert into t1 values
( 2 , 13 ),
( 3 , 14 );
set @@tmp_table_size=1024;
Warnings:
Warning 1292 Truncated incorrect tmp_table_size value: '1024'
select count(distinct a) from t1;
count(distinct a)
10

View File

@ -310,7 +310,7 @@ a char(2) NOT NULL DEFAULT '',
PRIMARY KEY (a)
) ENGINE=MyISAM;
INSERT INTO t4 VALUES ('CD');
set @@tmp_table_size=8192;
set @@tmp_table_size=16384;
EXPLAIN
SELECT * FROM t3 AS tx JOIN t2 AS ty ON (tx.pk = ty.pk)
WHERE

View File

@ -245,7 +245,7 @@ CREATE TABLE t4 (
) ENGINE=MyISAM;
INSERT INTO t4 VALUES ('CD');
set @@tmp_table_size=8192;
set @@tmp_table_size=16384;
--replace_column 9 #
EXPLAIN

View File

@ -2318,6 +2318,8 @@ INSERT INTO t3 VALUES ('Miami');
SET @save_optimizer_switch=@@optimizer_switch;
SET optimizer_switch = 'derived_with_keys=on';
SET @@tmp_table_size=1024*4;
Warnings:
Warning 1292 Truncated incorrect tmp_table_size value: '4096'
explain SELECT * FROM (SELECT t1.* FROM t1, t2) AS t JOIN t3 ON t3.a = t.b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t3 system NULL NULL NULL NULL 1

View File

@ -1009,6 +1009,8 @@ DROP TABLE t1;
#
SET @tmp_table_size_save= @@tmp_table_size;
SET @@tmp_table_size= 1024;
Warnings:
Warning 1292 Truncated incorrect tmp_table_size value: '1024'
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8);
INSERT INTO t1 SELECT a+8 FROM t1;

View File

@ -1,15 +1,12 @@
CREATE TABLE t1 (
a varchar(32) character set utf8 collate utf8_bin NOT NULL,
b varchar(32) character set utf8 collate utf8_bin NOT NULL )
a varchar(128) character set utf8 collate utf8_bin NOT NULL,
b varchar(128) character set utf8 collate utf8_bin NOT NULL )
ENGINE=MyISAM DEFAULT CHARSET=utf8;
INSERT INTO t1 VALUES
('AAAAAAAAAA','AAAAAAAAAA'), ('AAAAAAAAAB','AAAAAAAAAB '),
('AAAAAAAAAB','AAAAAAAAAB'), ('AAAAAAAAAC','AAAAAAAAAC'),
('AAAAAAAAAD','AAAAAAAAAD'), ('AAAAAAAAAE','AAAAAAAAAE'),
('AAAAAAAAAF','AAAAAAAAAF'), ('AAAAAAAAAG','AAAAAAAAAG'),
('AAAAAAAAAH','AAAAAAAAAH'), ('AAAAAAAAAI','AAAAAAAAAI'),
('AAAAAAAAAJ','AAAAAAAAAJ'), ('AAAAAAAAAK','AAAAAAAAAK');
set tmp_table_size=1024;
INSERT INTO t1
select concat(repeat("A", 50),char(32+mod(seq,31)),char(32+mod(seq,29))),
concat(repeat("A", 50),char(32+mod(seq,31)),char(32+mod(seq,29)))
from seq_1_to_128;
set tmp_table_size=16384;
SET @saved_dbug = @@SESSION.debug_dbug;
set session debug_dbug="+d,raise_error";
SELECT MAX(a) FROM t1 GROUP BY a,b;

View File

@ -1,23 +1,20 @@
--source include/have_debug.inc
--source include/not_embedded.inc
--source include/have_sequence.inc
#
# Bug #28499: crash for grouping query when tmp_table_size is too small
#
CREATE TABLE t1 (
a varchar(32) character set utf8 collate utf8_bin NOT NULL,
b varchar(32) character set utf8 collate utf8_bin NOT NULL )
a varchar(128) character set utf8 collate utf8_bin NOT NULL,
b varchar(128) character set utf8 collate utf8_bin NOT NULL )
ENGINE=MyISAM DEFAULT CHARSET=utf8;
INSERT INTO t1 VALUES
('AAAAAAAAAA','AAAAAAAAAA'), ('AAAAAAAAAB','AAAAAAAAAB '),
('AAAAAAAAAB','AAAAAAAAAB'), ('AAAAAAAAAC','AAAAAAAAAC'),
('AAAAAAAAAD','AAAAAAAAAD'), ('AAAAAAAAAE','AAAAAAAAAE'),
('AAAAAAAAAF','AAAAAAAAAF'), ('AAAAAAAAAG','AAAAAAAAAG'),
('AAAAAAAAAH','AAAAAAAAAH'), ('AAAAAAAAAI','AAAAAAAAAI'),
('AAAAAAAAAJ','AAAAAAAAAJ'), ('AAAAAAAAAK','AAAAAAAAAK');
INSERT INTO t1
select concat(repeat("A", 50),char(32+mod(seq,31)),char(32+mod(seq,29))),
concat(repeat("A", 50),char(32+mod(seq,31)),char(32+mod(seq,29)))
from seq_1_to_128;
set tmp_table_size=1024;
set tmp_table_size=16384;
# Set debug flag so an error is returned when
# tmp table in query is converted from heap to myisam

View File

@ -287,3 +287,20 @@ SELECT CONCAT(t2,'-',t2) c2 FROM (SELECT MAKE_SET(3,t,t) t2 FROM t1) sub;
c2
abcdefghi,abcdefghi-abcdefghi,abcdefghi
DROP TABLE t1;
# Start of 10.5 tests
#
# MDEV-13120 Wrong results with MAKE_SET() and subquery
#
CREATE TABLE t1 (a DATE, b DATETIME, c VARCHAR(8));
INSERT INTO t1 VALUES
('1996-03-06','1985-11-16 08:00:46','foo'),
('2028-08-26','1900-01-01 00:00:00','bar'),
('1973-05-04','1900-01-01 00:00:00','qux');
SELECT CONCAT_WS(' ', a, b, PASSWORD(c)) AS f FROM t1 GROUP BY f WITH ROLLUP;
f
1973-05-04 1900-01-01 00:00:00 *6D720C5AAB5096E70AA751206B45B484E5E0121F
1996-03-06 1985-11-16 08:00:46 *F3A2A51A9B0F2BE2468926B4132313728C250DBF
2028-08-26 1900-01-01 00:00:00 *E8D46CE25265E545D225A8A6F1BAF642FEBEE5CB
NULL
DROP TABLE t1;
# End of 10.5 tests

View File

@ -265,3 +265,19 @@ CREATE TABLE t1 (t VARCHAR(10) CHARSET latin1);
INSERT INTO t1 VALUES('abcdefghi');
SELECT CONCAT(t2,'-',t2) c2 FROM (SELECT MAKE_SET(3,t,t) t2 FROM t1) sub;
DROP TABLE t1;
--echo # Start of 10.5 tests
--echo #
--echo # MDEV-13120 Wrong results with MAKE_SET() and subquery
--echo #
CREATE TABLE t1 (a DATE, b DATETIME, c VARCHAR(8));
INSERT INTO t1 VALUES
('1996-03-06','1985-11-16 08:00:46','foo'),
('2028-08-26','1900-01-01 00:00:00','bar'),
('1973-05-04','1900-01-01 00:00:00','qux');
SELECT CONCAT_WS(' ', a, b, PASSWORD(c)) AS f FROM t1 GROUP BY f WITH ROLLUP;
DROP TABLE t1;
--echo # End of 10.5 tests

View File

@ -1,4 +1,3 @@
drop table if exists t1;
select floor(5.5),floor(-5.5);
floor(5.5) floor(-5.5)
5 -6
@ -3726,5 +3725,17 @@ SELECT(ASIN(-1)+ LN(-1)) % (ATAN(-1) MOD FLOOR(1)) * (TRUNCATE(EXP(-1.e-2),-1.e+
c1
NULL
#
# End of 10.5 tests
# MDEV-35651 NO_UNSIGNED_SUBTRACTION does not work for multiple unsigned integers
#
set sql_mode=no_unsigned_subtraction;
select cast(0 as unsigned) - 1;
cast(0 as unsigned) - 1
-1
select 2-cast(3 as unsigned);
2-cast(3 as unsigned)
-1
select cast(1 as unsigned) - cast(2 as unsigned);
cast(1 as unsigned) - cast(2 as unsigned)
-1
set sql_mode=default;
# End of 10.5 tests

View File

@ -4,10 +4,6 @@
--source include/default_charset.inc
--disable_warnings
drop table if exists t1;
--enable_warnings
select floor(5.5),floor(-5.5);
explain extended select floor(5.5),floor(-5.5);
select ceiling(5.5),ceiling(-5.5);
@ -1992,7 +1988,13 @@ SELECT (TRUNCATE(EXP(-1.e-2),-1.e+30) % RADIANS(-1)) AS c1;
SELECT (TRUNCATE(EXP(-1.e-2),-1.e+30) % RADIANS(-1)) * (LAST_DAY('1-03-30 1:29:12') MOD 1 + COS(-1)) AS c1;
SELECT(ASIN(-1)+ LN(-1)) % (ATAN(-1) MOD FLOOR(1)) * (TRUNCATE(EXP(-1.e-2),-1.e+30) % RADIANS(-1)) * (LAST_DAY('1-03-30 1:29:12') MOD 1 + COS(-1)) AS c1;
--echo #
--echo # MDEV-35651 NO_UNSIGNED_SUBTRACTION does not work for multiple unsigned integers
--echo #
set sql_mode=no_unsigned_subtraction;
select cast(0 as unsigned) - 1;
select 2-cast(3 as unsigned);
select cast(1 as unsigned) - cast(2 as unsigned);
set sql_mode=default;
--echo #
--echo # End of 10.5 tests
--echo #

View File

@ -5466,4 +5466,12 @@ CREATE TABLE t (f POINT, KEY(f));
DELETE FROM t WHERE f NOT IN (NULL,'x');
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
DROP TABLE t;
#
# MDEV-31219 Assertion `fixed' failed in Item_func_hybrid_field_type / Frame_positional_cursor
#
CREATE TABLE t (a INT, b POINT);
INSERT INTO t VALUES (1,POINT(0,0)),(2,POINT(0,0));
SELECT NTH_VALUE(a,b) OVER () FROM t;
ERROR HY000: Illegal parameter data types point and bigint for operation '-'
DROP TABLE t;
# End of 10.5 tests

View File

@ -3472,4 +3472,14 @@ CREATE TABLE t (f POINT, KEY(f));
DELETE FROM t WHERE f NOT IN (NULL,'x');
DROP TABLE t;
--echo #
--echo # MDEV-31219 Assertion `fixed' failed in Item_func_hybrid_field_type / Frame_positional_cursor
--echo #
CREATE TABLE t (a INT, b POINT);
INSERT INTO t VALUES (1,POINT(0,0)),(2,POINT(0,0));
--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
SELECT NTH_VALUE(a,b) OVER () FROM t;
DROP TABLE t;
--echo # End of 10.5 tests

View File

@ -2390,7 +2390,7 @@ drop database dummy;
USE test;
CREATE VIEW v AS SELECT table_schema AS object_schema, table_name AS object_name, table_type AS object_type FROM information_schema.tables ORDER BY object_schema;
SELECT * FROM v LIMIT ROWS EXAMINED 9;
ERROR HY000: Sort aborted:
ERROR HY000: Sort aborted: LIMIT ROWS EXAMINED
DROP VIEW v;
#
# MDEV-23408 Wrong result upon query from I_S and further Assertion `!alias_arg || strlen(alias_arg->str) == alias_arg->length' failed with certain connection charset

View File

@ -1,6 +1,10 @@
--source include/have_metadata_lock_info.inc
-- source include/have_innodb.inc
--disable_query_log
call mtr.add_suppression("InnoDB: Transaction was aborted due to ");
--enable_query_log
# Save the initial number of concurrent sessions.
--source include/count_sessions.inc

View File

@ -883,76 +883,6 @@ INSERT INTO t1 SELECT a*2 FROM t1 ORDER BY a;
Warnings:
Warning 1264 Out of range value for column 'a' at row 4
DROP TABLE t1;
CREATE TABLE t1 (a INT, b INT);
INSERT INTO t1 (a) SELECT SUM(1);
INSERT INTO t1 (a, b) SELECT AVG(2), MIN(3);
INSERT INTO t1 (b) SELECT AVG('x') OVER ();
ERROR 22007: Truncated incorrect DOUBLE value: 'x'
INSERT INTO t1 SELECT MIN(7) OVER (), MAX(8) OVER();
SELECT * FROM t1;
a b
1 NULL
2 3
7 8
PREPARE stmt FROM 'INSERT INTO t1 (a) SELECT AVG(?)';
EXECUTE stmt USING 9;
EXECUTE stmt USING 10;
PREPARE stmt FROM 'INSERT INTO t1 SELECT MIN(?), MAX(?)';
EXECUTE stmt USING 11, 12;
EXECUTE stmt USING 13, 14;
DEALLOCATE PREPARE stmt;
SELECT * FROM t1;
a b
1 NULL
2 3
7 8
9 NULL
10 NULL
11 12
13 14
CREATE PROCEDURE p1(param_a INT, param_b INT)
BEGIN
INSERT INTO t1 SELECT MIN(param_a) OVER (), MAX(param_b);
END//
CALL p1(21, 22);
CALL p1(23, 24);
SELECT * FROM t1;
a b
1 NULL
2 3
7 8
9 NULL
10 NULL
11 12
13 14
21 22
23 24
CREATE TABLE t2 (
a DECIMAL UNIQUE CHECK (CASE 0 * 27302337.000000 WHEN 34 THEN
+ 'x' LIKE 'x' OR a NOT IN (-1 / TRUE ^ 2) ELSE 7105743.000000 END));
INSERT INTO t2 VALUES (90),( -1),(31152443.000000),(-32768),(NULL),(NULL);
INSERT INTO t2 SELECT AVG('x') OVER (
PARTITION BY ((NOT AVG(76698761.000000))) IS NOT NULL);
ERROR 22007: Truncated incorrect DOUBLE value: 'x'
INSERT IGNORE INTO t2 () VALUES (0),('x'),(3751286.000000),
('x'),((a = 'x' AND 0 AND 0));
Warnings:
Warning 1366 Incorrect decimal value: 'x' for column `test`.`t2`.`a` at row 2
Warning 1062 Duplicate entry '0' for key 'a'
Warning 1366 Incorrect decimal value: 'x' for column `test`.`t2`.`a` at row 4
Warning 1062 Duplicate entry '0' for key 'a'
Warning 1062 Duplicate entry '0' for key 'a'
INSERT INTO t2 VALUES (127);
INSERT INTO t2 SELECT -2147483648 END FROM t2 AS TEXT JOIN t2 JOIN t2 TABLES;
ERROR 23000: Duplicate entry '-2147483648' for key 'a'
ALTER TABLE t2 ADD (
b INT UNIQUE CHECK ((a = 'x' AND ((-(+(BINARY 49730460.000000)))) = 'x'
BETWEEN 'x' AND 'x')));
ERROR 22007: Truncated incorrect DECIMAL value: 'x'
UPDATE t2 SET a = -128 WHERE a IS NULL ORDER BY 78 IN ('x','x'),a;
ERROR 23000: Duplicate entry '-128' for key 'a'
DROP TABLE t1, t2;
DROP PROCEDURE p1;
# End of 10.2 test
#
# MDEV-28617: INSERT ... SELECT with redundant IN subquery in GROUP BY
@ -1054,3 +984,52 @@ drop table t1, t2;
#
# End of 10.3 test
#
#
# MDEV-26427 MariaDB Server SEGV on INSERT .. SELECT
#
CREATE TABLE t1 (a int);
INSERT INTO t1 SELECT AVG(1);
SELECT * FROM t1;
a
1
INSERT INTO t1 SELECT MIN(2) OVER ();
SELECT * FROM t1;
a
1
2
CREATE VIEW v1 AS SELECT * FROM t1 ORDER BY a;
INSERT INTO v1 SELECT SUM(3);
SELECT * FROM v1;
a
1
2
3
INSERT INTO v1 SELECT * FROM v1;
SELECT * FROM t1;
a
1
1
2
2
3
3
INSERT INTO t1 SELECT * FROM v1;
SELECT * FROM t1;
a
1
1
1
1
2
2
2
2
3
3
3
3
DROP VIEW v1;
DROP TABLE t1;
#
# End of 10.5 test
#

View File

@ -459,60 +459,6 @@ INSERT INTO t1 SELECT a*2 FROM t1 ORDER BY a;
DROP TABLE t1;
#
# MDEV-26427 MariaDB Server SEGV on INSERT .. SELECT
#
CREATE TABLE t1 (a INT, b INT);
INSERT INTO t1 (a) SELECT SUM(1);
INSERT INTO t1 (a, b) SELECT AVG(2), MIN(3);
--error ER_TRUNCATED_WRONG_VALUE
INSERT INTO t1 (b) SELECT AVG('x') OVER ();
INSERT INTO t1 SELECT MIN(7) OVER (), MAX(8) OVER();
SELECT * FROM t1;
PREPARE stmt FROM 'INSERT INTO t1 (a) SELECT AVG(?)';
EXECUTE stmt USING 9;
EXECUTE stmt USING 10;
PREPARE stmt FROM 'INSERT INTO t1 SELECT MIN(?), MAX(?)';
EXECUTE stmt USING 11, 12;
EXECUTE stmt USING 13, 14;
DEALLOCATE PREPARE stmt;
SELECT * FROM t1;
DELIMITER //;
CREATE PROCEDURE p1(param_a INT, param_b INT)
BEGIN
INSERT INTO t1 SELECT MIN(param_a) OVER (), MAX(param_b);
END//
DELIMITER ;//
CALL p1(21, 22);
CALL p1(23, 24);
SELECT * FROM t1;
CREATE TABLE t2 (
a DECIMAL UNIQUE CHECK (CASE 0 * 27302337.000000 WHEN 34 THEN
+ 'x' LIKE 'x' OR a NOT IN (-1 / TRUE ^ 2) ELSE 7105743.000000 END));
INSERT INTO t2 VALUES (90),( -1),(31152443.000000),(-32768),(NULL),(NULL);
--error ER_TRUNCATED_WRONG_VALUE
INSERT INTO t2 SELECT AVG('x') OVER (
PARTITION BY ((NOT AVG(76698761.000000))) IS NOT NULL);
INSERT IGNORE INTO t2 () VALUES (0),('x'),(3751286.000000),
('x'),((a = 'x' AND 0 AND 0));
INSERT INTO t2 VALUES (127);
--error ER_DUP_ENTRY
INSERT INTO t2 SELECT -2147483648 END FROM t2 AS TEXT JOIN t2 JOIN t2 TABLES;
--error ER_TRUNCATED_WRONG_VALUE
ALTER TABLE t2 ADD (
b INT UNIQUE CHECK ((a = 'x' AND ((-(+(BINARY 49730460.000000)))) = 'x'
BETWEEN 'x' AND 'x')));
--error ER_DUP_ENTRY
UPDATE t2 SET a = -128 WHERE a IS NULL ORDER BY 78 IN ('x','x'),a;
DROP TABLE t1, t2;
DROP PROCEDURE p1;
--echo # End of 10.2 test
--echo #
@ -613,3 +559,38 @@ drop table t1, t2;
--echo #
--echo # End of 10.3 test
--echo #
--echo #
--echo # MDEV-26427 MariaDB Server SEGV on INSERT .. SELECT
--echo #
CREATE TABLE t1 (a int);
INSERT INTO t1 SELECT AVG(1);
--sorted_result
SELECT * FROM t1;
INSERT INTO t1 SELECT MIN(2) OVER ();
--sorted_result
SELECT * FROM t1;
CREATE VIEW v1 AS SELECT * FROM t1 ORDER BY a;
INSERT INTO v1 SELECT SUM(3);
--sorted_result
SELECT * FROM v1;
INSERT INTO v1 SELECT * FROM v1;
--sorted_result
SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM v1;
--sorted_result
SELECT * FROM t1;
DROP VIEW v1;
DROP TABLE t1;
--echo #
--echo # End of 10.5 test
--echo #

View File

@ -602,7 +602,7 @@ select c1, c2 from t3 order by c2, c1 LIMIT ROWS EXAMINED 2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t3 ALL NULL NULL NULL NULL 5 Using filesort
select c1, c2 from t3 order by c2, c1 LIMIT ROWS EXAMINED 2;
ERROR HY000: Sort aborted:
ERROR HY000: Sort aborted: LIMIT ROWS EXAMINED
explain
select c1, c2 from t3i order by c2, c1 LIMIT ROWS EXAMINED 2;
id select_type table type possible_keys key key_len ref rows Extra
@ -618,7 +618,7 @@ select c1, c2 from t3i order by c2, c1 desc LIMIT ROWS EXAMINED 2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t3i index NULL it3j 8 NULL 5 Using index; Using filesort
select c1, c2 from t3i order by c2, c1 desc LIMIT ROWS EXAMINED 2;
ERROR HY000: Sort aborted:
ERROR HY000: Sort aborted: LIMIT ROWS EXAMINED
drop table t3,t3i;
=========================================================================
INSERT/DELETE/UPDATE
@ -889,3 +889,46 @@ Warnings:
Note 1003 select `test`.`t1`.`c1` AS `c1`,`test`.`t2`.`c2` AS `c2` from `test`.`t1` join `test`.`t2` where `test`.`t2`.`c2` = `test`.`t1`.`c1`
drop table t1,t2;
# End of 10.4 tests
#
# MDEV-35571: Connection hangs after query on a partitioned table with UNION and LIMIT ROWS EXAMINED
#
create table t1 (a int);
insert into t1 values (1), (2);
select * from t1 UNION ALL select * from t1 LIMIT ROWS EXAMINED 1;
a
1
Warnings:
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 1. The query result may be incomplete
select * from t1 UNION DISTINCT select * from t1 LIMIT ROWS EXAMINED 1;
a
1
Warnings:
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 1. The query result may be incomplete
DROP TABLE t1;
create table t1 (a int);
insert into t1 values (1), (2);
(select a from t1 UNION ALL select a from t1) order by a desc LIMIT ROWS EXAMINED 2;
a
1
Warnings:
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 2. The query result may be incomplete
(select a from t1 UNION DISTINCT select a from t1) order by a desc LIMIT ROWS EXAMINED 2;
a
1
Warnings:
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 2. The query result may be incomplete
DROP TABLE t1;
CREATE TABLE t1 (a INT);
INSERT INTO t1 SELECT seq%25 FROM seq_1_to_100;
CREATE TABLE t2 (b INT, c INT, KEY(b)) PARTITION BY HASH(c) PARTITIONS 12;
INSERT INTO t2 SELECT seq, seq FROM seq_1_to_10;
SELECT COUNT(*) FROM t1 JOIN t2 ON (b = a) UNION ALL SELECT COUNT(*) FROM t1 JOIN t2 ON (b = a) LIMIT ROWS EXAMINED 100;
COUNT(*)
Warnings:
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 100. The query result may be incomplete
SELECT COUNT(*) FROM t1 JOIN t2 ON (b = a) UNION DISTINCT SELECT COUNT(*) FROM t1 JOIN t2 ON (b = a) LIMIT ROWS EXAMINED 100;
COUNT(*)
Warnings:
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 100. The query result may be incomplete
DROP TABLE t1, t2;
# End of 10.5 tests

View File

@ -617,3 +617,44 @@ select * from t1, t2 where c1 = c2 LIMIT ROWS EXAMINED 2;
drop table t1,t2;
--echo # End of 10.4 tests
--echo #
--echo # MDEV-35571: Connection hangs after query on a partitioned table with UNION and LIMIT ROWS EXAMINED
--echo #
--source include/have_partition.inc
--source include/have_sequence.inc
# Simplified test
create table t1 (a int);
insert into t1 values (1), (2);
select * from t1 UNION ALL select * from t1 LIMIT ROWS EXAMINED 1;
# UNION DISTINCT produces the same result here. Note that this is not
# affected by the MDEV-35571 patch
select * from t1 UNION DISTINCT select * from t1 LIMIT ROWS EXAMINED 1;
DROP TABLE t1;
# Simplified test with order by
create table t1 (a int);
insert into t1 values (1), (2);
(select a from t1 UNION ALL select a from t1) order by a desc LIMIT ROWS EXAMINED 2;
# UNION DISTINCT produces the same result with order by desc. Note
# that this is not affected by the MDEV-35571 patch
(select a from t1 UNION DISTINCT select a from t1) order by a desc LIMIT ROWS EXAMINED 2;
DROP TABLE t1;
# Original test
CREATE TABLE t1 (a INT);
INSERT INTO t1 SELECT seq%25 FROM seq_1_to_100;
CREATE TABLE t2 (b INT, c INT, KEY(b)) PARTITION BY HASH(c) PARTITIONS 12;
INSERT INTO t2 SELECT seq, seq FROM seq_1_to_10;
SELECT COUNT(*) FROM t1 JOIN t2 ON (b = a) UNION ALL SELECT COUNT(*) FROM t1 JOIN t2 ON (b = a) LIMIT ROWS EXAMINED 100;
# UNION DISTINCT produces the same result here. Note that this is not
# affected by the MDEV-35571 patch
SELECT COUNT(*) FROM t1 JOIN t2 ON (b = a) UNION DISTINCT SELECT COUNT(*) FROM t1 JOIN t2 ON (b = a) LIMIT ROWS EXAMINED 100;
DROP TABLE t1, t2;
--echo # End of 10.5 tests

View File

@ -212,6 +212,23 @@ use `a
b`;
SET timestamp=1234567890;
select count(*) from mysql.global_priv where length(priv)>2
#
# MDEV-31366 Assertion `thd->start_time' failed in bool LOGGER::slow_log_print(THD*, const char*, size_t, ulonglong)
#
TRUNCATE mysql.slow_log;
SET global log_output='TABLE';
SET timestamp=0.99;
SET long_query_time=0.00001;
SELECT SLEEP(0.1);
SLEEP(0.1)
0
SELECT COUNT(*)>0 AS c1 FROM mysql.slow_log;
c1
1
SET global log_output=default;
SET timestamp=default;
SET long_query_time=default;
TRUNCATE mysql.slow_log;
# End of 10.5 tests
#
# MDEV-34251 Conditional jump or move depends on uninitialised value in

View File

@ -225,6 +225,21 @@ let SEARCH_PATTERN= use \`a\n.*2;
let SEARCH_OUTPUT=matches;
source include/search_pattern_in_file.inc;
--echo #
--echo # MDEV-31366 Assertion `thd->start_time' failed in bool LOGGER::slow_log_print(THD*, const char*, size_t, ulonglong)
--echo #
TRUNCATE mysql.slow_log;
SET global log_output='TABLE';
SET timestamp=0.99;
SET long_query_time=0.00001;
SELECT SLEEP(0.1);
SELECT COUNT(*)>0 AS c1 FROM mysql.slow_log;
SET global log_output=default;
SET timestamp=default;
SET long_query_time=default;
TRUNCATE mysql.slow_log;
--echo # End of 10.5 tests
--echo #

View File

@ -275,6 +275,42 @@ SELECT @@general_log_file = @my_glf;
@@general_log_file = @my_glf
1
SET GLOBAL general_log_file = @old_general_log_file;
#
# MDEV-35720 Add query_time to statistics
#
connect con2,localhost,root,,;
set @s1=(select variable_value from information_schema.session_status where
variable_name='query_time');
select sleep(3) into @a;
set @s2=(select variable_value from information_schema.session_status where
variable_name='query_time');
set @s3=(select variable_value from information_schema.global_status where
variable_name='query_time');
select @s1 >= 0.00 and @s1 <= 2.00 as "should be true";
should be true
1
select @s2 >= 2.00 and @s2 < 10.00 as "should be true";
should be true
1
select @s3 >= 3.00 as "should be true";
should be true
1
disconnect con2;
connection default;
create procedure p1()
begin
select sleep(1) into @a;
select sleep(2) into @a;
end|
connect con2,localhost,root,,;
call p1();
set @s1=(select variable_value from information_schema.session_status where
variable_name='query_time');
select @s1 > 2.00 and @s1 < 10.00 as "should be true";
should be true
1
disconnect con2;
connection default;
disconnect con1;
connection default;
SET GLOBAL long_query_time = @save_long_query_time;

View File

@ -321,6 +321,45 @@ SET GLOBAL general_log_file = @old_general_log_file;
--enable_ps_protocol
--echo #
--echo # MDEV-35720 Add query_time to statistics
--echo #
connect (con2,localhost,root,,);
set @s1=(select variable_value from information_schema.session_status where
variable_name='query_time');
select sleep(3) into @a;
set @s2=(select variable_value from information_schema.session_status where
variable_name='query_time');
set @s3=(select variable_value from information_schema.global_status where
variable_name='query_time');
select @s1 >= 0.00 and @s1 <= 2.00 as "should be true";
select @s2 >= 2.00 and @s2 < 10.00 as "should be true";
select @s3 >= 3.00 as "should be true";
# select @s1,@s2,@s3;
disconnect con2;
connection default;
delimiter |;
create procedure p1()
begin
select sleep(1) into @a;
select sleep(2) into @a;
end|
delimiter ;|
connect (con2,localhost,root,,);
call p1();
set @s1=(select variable_value from information_schema.session_status where
variable_name='query_time');
select @s1 > 2.00 and @s1 < 10.00 as "should be true";
# select @s1;
disconnect con2;
connection default;
#
# Cleanup
#

View File

@ -2,6 +2,10 @@
--source include/have_partition.inc
--source include/have_sequence.inc
--disable_query_log
call mtr.add_suppression("InnoDB: Transaction was aborted due to ");
--enable_query_log
--echo #
--echo # MDEV-18707 Server crash in my_hash_sort_bin, ASAN heap-use-after-free in Field::is_null, server hang, corrupted double-linked list
--echo #

View File

@ -90,13 +90,11 @@ table->field[0]->offset = 1
table->field[0]->field_length = 10
table->field[0]->null_pos wrt to record 0 = 0
table->field[0]->null_bit_pos = 1
table->field[1]->field_name DB_ROW_HASH_1
table->field[1]->offset = 11
table->field[1]->field_length = 8
table->field[1]->null_pos wrt to record 0 = 0
table->field[1]->null_bit_pos = 2
SET debug_dbug="";
drop table t1;
SET debug_dbug="d,print_long_unique_internal_state";
@ -182,37 +180,31 @@ table->field[0]->offset = 1
table->field[0]->field_length = 10
table->field[0]->null_pos wrt to record 0 = 0
table->field[0]->null_bit_pos = 1
table->field[1]->field_name b
table->field[1]->offset = 11
table->field[1]->field_length = 10
table->field[1]->null_pos wrt to record 0 = 0
table->field[1]->null_bit_pos = 2
table->field[2]->field_name c
table->field[2]->offset = 21
table->field[2]->field_length = 10
table->field[2]->null_pos wrt to record 0 = 0
table->field[2]->null_bit_pos = 4
table->field[3]->field_name DB_ROW_HASH_1
table->field[3]->offset = 31
table->field[3]->field_length = 8
table->field[3]->null_pos wrt to record 0 = 0
table->field[3]->null_bit_pos = 8
table->field[4]->field_name DB_ROW_HASH_2
table->field[4]->offset = 39
table->field[4]->field_length = 8
table->field[4]->null_pos wrt to record 0 = 0
table->field[4]->null_bit_pos = 16
table->field[5]->field_name DB_ROW_HASH_3
table->field[5]->offset = 47
table->field[5]->field_length = 8
table->field[5]->null_pos wrt to record 0 = 0
table->field[5]->null_bit_pos = 32
SET debug_dbug="";
drop table t1;
SET debug_dbug="d,print_long_unique_internal_state";
@ -290,37 +282,31 @@ table->field[0]->offset = 1
table->field[0]->field_length = 10
table->field[0]->null_pos wrt to record 0 = 0
table->field[0]->null_bit_pos = 1
table->field[1]->field_name b
table->field[1]->offset = 11
table->field[1]->field_length = 10
table->field[1]->null_pos wrt to record 0 = 0
table->field[1]->null_bit_pos = 2
table->field[2]->field_name c
table->field[2]->offset = 21
table->field[2]->field_length = 10
table->field[2]->null_pos wrt to record 0 = 0
table->field[2]->null_bit_pos = 4
table->field[3]->field_name d
table->field[3]->offset = 31
table->field[3]->field_length = 10
table->field[3]->null_pos wrt to record 0 = 0
table->field[3]->null_bit_pos = 8
table->field[4]->field_name DB_ROW_HASH_1
table->field[4]->offset = 41
table->field[4]->field_length = 8
table->field[4]->null_pos wrt to record 0 = 0
table->field[4]->null_bit_pos = 16
table->field[5]->field_name DB_ROW_HASH_2
table->field[5]->offset = 49
table->field[5]->field_length = 8
table->field[5]->null_pos wrt to record 0 = 0
table->field[5]->null_bit_pos = 32
SET debug_dbug="";
drop table t1;
SET debug_dbug="d,print_long_unique_internal_state";
@ -406,31 +392,26 @@ table->field[0]->offset = 1
table->field[0]->field_length = 4
table->field[0]->null_pos wrt to record 0 = -1
table->field[0]->null_bit_pos = 0
table->field[1]->field_name b
table->field[1]->offset = 5
table->field[1]->field_length = 10
table->field[1]->null_pos wrt to record 0 = 0
table->field[1]->null_bit_pos = 1
table->field[2]->field_name c
table->field[2]->offset = 15
table->field[2]->field_length = 10
table->field[2]->null_pos wrt to record 0 = -1
table->field[2]->null_bit_pos = 0
table->field[3]->field_name DB_ROW_HASH_1
table->field[3]->offset = 25
table->field[3]->field_length = 8
table->field[3]->null_pos wrt to record 0 = 0
table->field[3]->null_bit_pos = 2
table->field[4]->field_name DB_ROW_HASH_2
table->field[4]->offset = 33
table->field[4]->field_length = 8
table->field[4]->null_pos wrt to record 0 = -1
table->field[4]->null_bit_pos = 0
SET debug_dbug="";
drop table t1;
##Using hash
@ -487,25 +468,21 @@ table->field[0]->offset = 1
table->field[0]->field_length = 4
table->field[0]->null_pos wrt to record 0 = 0
table->field[0]->null_bit_pos = 2
table->field[1]->field_name b
table->field[1]->offset = 5
table->field[1]->field_length = 4
table->field[1]->null_pos wrt to record 0 = 0
table->field[1]->null_bit_pos = 4
table->field[2]->field_name c
table->field[2]->offset = 9
table->field[2]->field_length = 4
table->field[2]->null_pos wrt to record 0 = 0
table->field[2]->null_bit_pos = 8
table->field[3]->field_name DB_ROW_HASH_1
table->field[3]->offset = 13
table->field[3]->field_length = 8
table->field[3]->null_pos wrt to record 0 = 0
table->field[3]->null_bit_pos = 16
SET debug_dbug="";
drop table t1;
##Using hash but with memory engine so no long unique column
@ -562,18 +539,15 @@ table->field[0]->offset = 1
table->field[0]->field_length = 4
table->field[0]->null_pos wrt to record 0 = 0
table->field[0]->null_bit_pos = 2
table->field[1]->field_name b
table->field[1]->offset = 5
table->field[1]->field_length = 4
table->field[1]->null_pos wrt to record 0 = 0
table->field[1]->null_bit_pos = 4
table->field[2]->field_name c
table->field[2]->offset = 9
table->field[2]->field_length = 4
table->field[2]->null_pos wrt to record 0 = 0
table->field[2]->null_bit_pos = 8
SET debug_dbug="";
drop table t1;

View File

@ -0,0 +1,8 @@
select * from information_schema.processlist where id=0;
should be true
1
should be true
1
show global status like "max_memory_used";
Variable_name Value
Max_memory_used NULL

View File

@ -0,0 +1,20 @@
#
# Added status variable "Max_memory_used" to SHOW STATUS
#
let $l1=`show status like "max_memory_used"`;
--disable_result_log
select * from information_schema.processlist where id=0;
--enable_result_log
let $l2=`show status like "max_memory_used"`;
--disable_query_log
eval SET @l1= SUBSTRING_INDEX('$l1', ' ', -1);
eval SET @l2= SUBSTRING_INDEX('$l2', ' ', -1);
eval select @l1 > 10000 as "should be true";
eval select @l2+0 > @l1+0 as "should be true";
--enable_query_log
# global max_memory should be NULL as we cannot calculate this
show global status like "max_memory_used";

View File

@ -6,7 +6,7 @@ flush tables;
--let $args=--table-cache=5 --max-connections=10 --log-warnings=1 --silent-startup --lower-case-table-names=1 --help --verbose
--exec $MYSQLD_CMD $args > $MYSQL_TMP_DIR/mysqld--help2.txt 2> $MYSQL_TMP_DIR/mysqld--help2.err
--replace_regex /mysqld/mariadbd/ /\d\d\d\d-\d*-\d* *\d*:\d*:\d* \d* //
--replace_regex /mysqld/mariadbd/ /\d\d\d\d-\d*-\d* *\d*:\d*:\d* \d* // /^.*failed to retrieve the MAC address\n//
--cat_file $MYSQL_TMP_DIR/mysqld--help2.err
--echo #
@ -14,7 +14,7 @@ flush tables;
--echo #
--exec $MYSQLD_CMD $args --datadir=$MYSQL_TMP_DIR/help > $MYSQL_TMP_DIR/mysqld--help2.txt 2> $MYSQL_TMP_DIR/mysqld--help2.err
--replace_regex /\d\d\d\d-\d*-\d* *\d*:\d*:\d* \d* //
--replace_regex /mysqld/mariadbd/ /\d\d\d\d-\d*-\d* *\d*:\d*:\d* \d* // /^.*failed to retrieve the MAC address\n//
--cat_file $MYSQL_TMP_DIR/mysqld--help2.err
--echo #
@ -23,7 +23,7 @@ flush tables;
--mkdir $MYSQL_TMP_DIR/help
--exec $MYSQLD_CMD $args --datadir=$MYSQL_TMP_DIR/help > $MYSQL_TMP_DIR/mysqld--help2.txt 2> $MYSQL_TMP_DIR/mysqld--help2.err
--replace_regex /\d\d\d\d-\d*-\d* *\d*:\d*:\d* \d* //
--replace_regex /mysqld/mariadbd/ /\d\d\d\d-\d*-\d* *\d*:\d*:\d* \d* // /^.*failed to retrieve the MAC address\n//
--cat_file $MYSQL_TMP_DIR/mysqld--help2.err
--list_files $MYSQL_TMP_DIR/help

View File

@ -1903,14 +1903,14 @@ profiling-history-size 15
progress-report-time 5
protocol-version 10
proxy-protocol-networks
query-alloc-block-size 16384
query-alloc-block-size 32768
query-cache-limit 1048576
query-cache-min-res-unit 4096
query-cache-size 1048576
query-cache-strip-comments FALSE
query-cache-type OFF
query-cache-wlock-invalidate FALSE
query-prealloc-size 24576
query-prealloc-size 32768
range-alloc-block-size 4096
read-binlog-speed-limit 0
read-buffer-size 131072

View File

@ -6,7 +6,7 @@
mysql.time_zone_transition 3719776009
-mysql.plugin 1587119305
+mysql.plugin 2184891911
mysql.servers 2079085450
mysql.servers 2180549486
-mysql.func 3241572444
+mysql.func 310494789
mysql.innodb_table_stats 1285726777
@ -18,7 +18,7 @@
mysql.time_zone_transition 3719776009
-mysql.plugin 1587119305
+mysql.plugin 2184891911
mysql.servers 2079085450
mysql.servers 2180549486
-mysql.func 3241572444
+mysql.func 310494789
mysql.innodb_table_stats 1285726777

View File

@ -1865,7 +1865,7 @@ Table Checksum
mysql.roles_mapping 2510045525
mysql.time_zone_transition 3719776009
mysql.plugin 1587119305
mysql.servers 2079085450
mysql.servers 2180549486
mysql.func 3241572444
mysql.innodb_table_stats 1285726777
mysql.table_stats 2836905944
@ -1900,7 +1900,7 @@ Table Checksum
mysql.roles_mapping 2510045525
mysql.time_zone_transition 3719776009
mysql.plugin 1587119305
mysql.servers 2079085450
mysql.servers 2180549486
mysql.func 3241572444
mysql.innodb_table_stats 1285726777
mysql.table_stats 2836905944

View File

@ -4446,6 +4446,8 @@ CREATE TABLE t1(a VARCHAR(1027), b INT);
INSERT INTO t1 SELECT seq, seq from seq_1_to_34;
SET @save_tmp_memory_table_size= @@tmp_memory_table_size;
SET tmp_memory_table_size= 1056*2;
Warnings:
Warning 1292 Truncated incorrect tmp_memory_table_size value: '2112'
SELECT COUNT(DISTINCT a) FROM t1;
COUNT(DISTINCT a)
34

View File

@ -5,6 +5,9 @@ let $MYSQLD_DATADIR= `SELECT @@datadir`;
call mtr.add_suppression("InnoDB: Table .* does not exist in the InnoDB internal data dictionary .*");
call mtr.add_suppression("Deadlock found when trying to get lock; try restarting transaction");
--disable_query_log
call mtr.add_suppression("InnoDB: Transaction was aborted due to ");
--enable_query_log
--echo #
--echo # Bug#11766879/Bug#60106: DIFF BETWEEN # OF INDEXES IN MYSQL VS INNODB,

View File

@ -2037,7 +2037,7 @@ SUCCESS
execute stmt;
Warnings:
Note 1050 Table 't2' already exists
call p_verify_reprepare_count(1);
call p_verify_reprepare_count(0);
SUCCESS
select * from t2;

View File

@ -1688,7 +1688,7 @@ drop table t2;
execute stmt;
call p_verify_reprepare_count(0);
execute stmt;
call p_verify_reprepare_count(1);
call p_verify_reprepare_count(0);
select * from t2;
execute stmt;
call p_verify_reprepare_count(0);

View File

@ -4,6 +4,10 @@
--source include/have_sequence.inc
--source include/innodb_stable_estimates.inc
--disable_query_log
call mtr.add_suppression("InnoDB: Transaction was aborted due to ");
--enable_query_log
SET SESSION DEFAULT_STORAGE_ENGINE='InnoDB';
SET @save_stats_persistent=@@GLOBAL.innodb_stats_persistent;

View File

@ -13,10 +13,11 @@ LET $MYSQL_TMP_DIR_UCASE= `SELECT upper('$MYSQL_TMP_DIR')`;
LET $MYSQL_TMP_DIR_LCASE= `SELECT lower('$MYSQL_TMP_DIR')`;
--disable_ps2_protocol
--disable_cursor_protocol
#create the file
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
eval SELECT * INTO OUTFILE '$MYSQL_TMP_DIR/B11764517.tmp' FROM t1;
--enable_cursor_protocol
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
show global variables like 'secure_file_priv';
@ -52,6 +53,7 @@ eval LOAD DATA INFILE '$MYSQL_TMP_DIR_LCASE/B11764517.tmp' INTO TABLE t1;
--error ER_OPTION_PREVENTS_STATEMENT
eval LOAD DATA INFILE "$MYSQL_TMP_DIR\\\\..a..\\\\..\\\\..\\\\B11764517.tmp" into table t1;
--disable_cursor_protocol
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
--error ER_OPTION_PREVENTS_STATEMENT
eval SELECT * INTO OUTFILE '$MYSQL_TMP_DIR\\\\..a..\\\\..\\\\..\\\\B11764517-2.tmp' FROM t1;
@ -67,6 +69,7 @@ eval SELECT * INTO OUTFILE '$MYSQL_TMP_DIR_UCASE/B11764517-4.tmp' FROM t1;
--replace_result $MYSQL_TMP_DIR_LCASE MYSQL_TMP_DIR_LCASE
eval SELECT * INTO OUTFILE '$MYSQL_TMP_DIR_LCASE/B11764517-5.tmp' FROM t1;
--enable_cursor_protocol
--error 0,1
--remove_file $MYSQL_TMP_DIR/B11764517.tmp;

View File

@ -1,5 +1,5 @@
--- mysql-test/main/select.result 2023-01-31 09:30:58.151377805 +0100
+++ mysql-test/main/select.reject 2023-02-01 13:44:11.026958614 +0100
--- mysql-test/main/select.result
+++ mysql-test/main/select.reject
@@ -5661,6 +5661,8 @@
Note 1276 Field or reference 'test.t1.a' of SELECT #3 was resolved in SELECT #1
Note 1276 Field or reference 'test.t1.a' of SELECT #3 was resolved in SELECT #1

View File

@ -1,5 +1,5 @@
--- mysql-test/main/select_jcl6.result 2023-01-31 09:30:58.151377805 +0100
+++ mysql-test/main/select_jcl6.reject 2023-02-01 13:44:10.722958771 +0100
--- mysql-test/main/select_jcl6.result
+++ mysql-test/main/select_jcl6.reject
@@ -5672,6 +5672,8 @@
Note 1276 Field or reference 'test.t1.a' of SELECT #3 was resolved in SELECT #1
Note 1276 Field or reference 'test.t1.a' of SELECT #3 was resolved in SELECT #1

View File

@ -1,5 +1,5 @@
--- mysql-test/main/select_pkeycache.result 2023-01-31 09:30:58.151377805 +0100
+++ mysql-test/main/select_pkeycache.reject 2023-02-01 13:43:21.742985365 +0100
--- mysql-test/main/select_pkeycache.result
+++ mysql-test/main/select_pkeycache.reject
@@ -5661,6 +5661,8 @@
Note 1276 Field or reference 'test.t1.a' of SELECT #3 was resolved in SELECT #1
Note 1276 Field or reference 'test.t1.a' of SELECT #3 was resolved in SELECT #1

View File

@ -24,6 +24,11 @@ SELECT * FROM mysql.servers;
Server_name Host Db Username Password Port Socket Wrapper Owner
s1 3306 bar mysql
DROP SERVER s1;
CREATE SERVER s1 FOREIGN DATA WRAPPER mysql OPTIONS(SOCKET '/tmp/1234567890_1234567890_1234567890_1234567890_1234567890_1234567890.sock');
SELECT Socket FROM mysql.servers where Server_name = 's1';
Socket
/tmp/1234567890_1234567890_1234567890_1234567890_1234567890_1234567890.sock
DROP SERVER s1;
#
# MDEV-33783 CREATE SERVER segfaults on wrong mysql.servers
#

View File

@ -23,6 +23,10 @@ CREATE SERVER s1 FOREIGN DATA WRAPPER mysql OPTIONS(SOCKET 'bar');
SELECT * FROM mysql.servers;
DROP SERVER s1;
CREATE SERVER s1 FOREIGN DATA WRAPPER mysql OPTIONS(SOCKET '/tmp/1234567890_1234567890_1234567890_1234567890_1234567890_1234567890.sock');
SELECT Socket FROM mysql.servers where Server_name = 's1';
DROP SERVER s1;
--echo #
--echo # MDEV-33783 CREATE SERVER segfaults on wrong mysql.servers
--echo #

View File

@ -1177,10 +1177,8 @@ select 1 union all select 2 union all select 3 union select 4;
3
4
# test with limited resource
set @@max_heap_table_size= 1024;
Warnings:
Warning 1292 Truncated incorrect max_heap_table_size value: '1024'
set @@tmp_table_size= 1024;
set @@max_heap_table_size= 16384;
set @@tmp_table_size= 16384;
create table t1 (a int, b int);
insert into t1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(0,0);
insert into t1 select * from t1;

View File

@ -458,8 +458,8 @@ select 1 union all select 2 union all select 3 union select 4;
--echo # test with limited resource
set @@max_heap_table_size= 1024;
set @@tmp_table_size= 1024;
set @@max_heap_table_size= 16384;
set @@tmp_table_size= 16384;
create table t1 (a int, b int);
insert into t1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(0,0);

View File

@ -68,3 +68,6 @@ disconnect ssl_con;
connection default;
call mtr.add_suppression("TLSv1.0 and TLSv1.1 are insecure");
FOUND 2 /TLSv1.0 and TLSv1.1 are insecure/ in mysqld.1.err
# restart: --ssl-cipher=ECDHE-ECDSA-AES128-GCM-SHA256
Variable_name Value
Ssl_version

View File

@ -112,3 +112,20 @@ call mtr.add_suppression("TLSv1.0 and TLSv1.1 are insecure");
--let SEARCH_FILE=$MYSQLTEST_VARDIR/log/mysqld.1.err
--let SEARCH_PATTERN= TLSv1.0 and TLSv1.1 are insecure
--source include/search_pattern_in_file.inc
#
# Server is configured with ciphers that are not compatible with the server certificate (std_data/cacert.pem is RSA)
#
let $restart_parameters=--ssl-cipher=ECDHE-ECDSA-AES128-GCM-SHA256;
source include/restart_mysqld.inc;
# Connections are rejected as client attempts tls by default
--error 1
--exec $MYSQL --host=localhost -e "SHOW STATUS LIKE 'ssl_version'"
# Connections are rejected if client explicitly specifies tls
--error 1
--exec $MYSQL --host=localhost --ssl-ca=$MYSQL_TEST_DIR/std_data/cacert.pem --ssl-verify-server-cert -e "SHOW STATUS LIKE 'ssl_version'"
# Connections can be made with --skip-ssl
--exec $MYSQL --host=localhost --skip-ssl -e "SHOW STATUS LIKE 'ssl_version'"

View File

@ -130,7 +130,7 @@ servers CREATE TABLE `servers` (
`Username` char(128) NOT NULL DEFAULT '',
`Password` char(64) NOT NULL DEFAULT '',
`Port` int(4) NOT NULL DEFAULT 0,
`Socket` char(64) NOT NULL DEFAULT '',
`Socket` char(108) NOT NULL DEFAULT '',
`Wrapper` char(64) NOT NULL DEFAULT '',
`Owner` varchar(512) NOT NULL DEFAULT '',
PRIMARY KEY (`Server_name`)

View File

@ -168,7 +168,7 @@ servers CREATE TABLE `servers` (
`Username` char(128) NOT NULL DEFAULT '',
`Password` char(64) NOT NULL DEFAULT '',
`Port` int(4) NOT NULL DEFAULT 0,
`Socket` char(64) NOT NULL DEFAULT '',
`Socket` char(108) NOT NULL DEFAULT '',
`Wrapper` char(64) NOT NULL DEFAULT '',
`Owner` varchar(512) NOT NULL DEFAULT '',
PRIMARY KEY (`Server_name`)

View File

@ -172,7 +172,7 @@ servers CREATE TABLE `servers` (
`Username` char(128) NOT NULL DEFAULT '',
`Password` char(64) NOT NULL DEFAULT '',
`Port` int(4) NOT NULL DEFAULT 0,
`Socket` char(64) NOT NULL DEFAULT '',
`Socket` char(108) NOT NULL DEFAULT '',
`Wrapper` char(64) NOT NULL DEFAULT '',
`Owner` varchar(512) NOT NULL DEFAULT '',
PRIMARY KEY (`Server_name`)

View File

@ -152,7 +152,7 @@ servers CREATE TABLE `servers` (
`Username` char(128) NOT NULL DEFAULT '',
`Password` char(64) NOT NULL DEFAULT '',
`Port` int(4) NOT NULL DEFAULT 0,
`Socket` char(64) NOT NULL DEFAULT '',
`Socket` char(108) NOT NULL DEFAULT '',
`Wrapper` char(64) NOT NULL DEFAULT '',
`Owner` varchar(512) NOT NULL DEFAULT '',
PRIMARY KEY (`Server_name`)

View File

@ -173,7 +173,7 @@ servers CREATE TABLE `servers` (
`Username` char(128) NOT NULL DEFAULT '',
`Password` char(64) NOT NULL DEFAULT '',
`Port` int(4) NOT NULL DEFAULT 0,
`Socket` char(64) NOT NULL DEFAULT '',
`Socket` char(108) NOT NULL DEFAULT '',
`Wrapper` char(64) NOT NULL DEFAULT '',
`Owner` varchar(512) NOT NULL DEFAULT '',
PRIMARY KEY (`Server_name`)

View File

@ -874,7 +874,7 @@ insert into t1 select * from t2;
insert into t2 select * from t1;
insert into t1 select * from t2;
insert into t2 select * from t1;
set local tmp_table_size=1024;
set local tmp_table_size=16384;
select count(*) from (select * from t1 union all select * from t2 order by 1) b;
count(*)
21

View File

@ -505,7 +505,7 @@ insert into t1 select * from t2;
insert into t2 select * from t1;
insert into t1 select * from t2;
insert into t2 select * from t1;
set local tmp_table_size=1024;
set local tmp_table_size=16384;
select count(*) from (select * from t1 union all select * from t2 order by 1) b;
select count(*) from t1;
select count(*) from t2;

View File

@ -491,7 +491,9 @@ a quux
DROP TABLE t1;
connect con1,localhost,root,,test;
connection con1;
set tmp_table_size=1024;
set tmp_table_size=2048;
Warnings:
Warning 1292 Truncated incorrect tmp_table_size value: '2048'
create table t1 (id int, a int, key idx(a));
create table t2 (id int unsigned not null auto_increment primary key, a int);
insert into t2(a) values(1),(2),(3),(4),(5),(6),(7),(8);

View File

@ -397,7 +397,7 @@ DROP TABLE t1;
connect (con1,localhost,root,,test);
connection con1;
set tmp_table_size=1024;
set tmp_table_size=2048;
# Create the test tables
create table t1 (id int, a int, key idx(a));

View File

@ -299,8 +299,8 @@ SHOW VARIABLES WHERE variable_name IN ('range_alloc_block_size',
'query_alloc_block_size', 'query_prealloc_size',
'transaction_alloc_block_size', 'transaction_prealloc_size');
Variable_name Value
query_alloc_block_size 16384
query_prealloc_size 24576
query_alloc_block_size 32768
query_prealloc_size 32768
range_alloc_block_size 4096
transaction_alloc_block_size 8192
transaction_prealloc_size 4096
@ -310,8 +310,8 @@ WHERE variable_name IN ('range_alloc_block_size',
'query_alloc_block_size', 'query_prealloc_size',
'transaction_alloc_block_size', 'transaction_prealloc_size') ORDER BY 1;
VARIABLE_NAME VARIABLE_VALUE
QUERY_ALLOC_BLOCK_SIZE 16384
QUERY_PREALLOC_SIZE 24576
QUERY_ALLOC_BLOCK_SIZE 32768
QUERY_PREALLOC_SIZE 32768
RANGE_ALLOC_BLOCK_SIZE 4096
TRANSACTION_ALLOC_BLOCK_SIZE 8192
TRANSACTION_PREALLOC_SIZE 4096
@ -392,8 +392,8 @@ SHOW VARIABLES WHERE variable_name IN ('range_alloc_block_size',
'query_alloc_block_size', 'query_prealloc_size',
'transaction_alloc_block_size', 'transaction_prealloc_size');
Variable_name Value
query_alloc_block_size 16384
query_prealloc_size 24576
query_alloc_block_size 32768
query_prealloc_size 32768
range_alloc_block_size 4096
transaction_alloc_block_size 8192
transaction_prealloc_size 4096
@ -547,7 +547,7 @@ set global table_open_cache=100;
set default_storage_engine=myisam;
set global thread_cache_size=100;
set timestamp=1, timestamp=default;
set tmp_table_size=1024;
set tmp_table_size=16384;
set transaction_isolation="READ-COMMITTED";
set wait_timeout=100;
set log_warnings=1;

View File

@ -340,7 +340,7 @@ set global table_open_cache=100;
set default_storage_engine=myisam;
set global thread_cache_size=100;
set timestamp=1, timestamp=default;
set tmp_table_size=1024;
set tmp_table_size=16384;
set transaction_isolation="READ-COMMITTED";
set wait_timeout=100;
set log_warnings=1;

View File

@ -1510,8 +1510,6 @@ execute stmt1 using @a;
set @a= 301;
execute stmt1 using @a;
deallocate prepare stmt1;
insert into v3(a) select sum(302);
insert into v3(a) select sum(303) over ();
select * from v3;
a b
100 0
@ -1530,14 +1528,6 @@ a b
301 10
301 1000
301 2000
302 0
302 10
302 1000
302 2000
303 0
303 10
303 1000
303 2000
drop view v3;
drop tables t1,t2;
create table t1(f1 int);

View File

@ -1337,8 +1337,6 @@ execute stmt1 using @a;
set @a= 301;
execute stmt1 using @a;
deallocate prepare stmt1;
insert into v3(a) select sum(302);
insert into v3(a) select sum(303) over ();
--sorted_result
select * from v3;

View File

@ -2,13 +2,16 @@
# WL#1756
#
-- source include/have_innodb.inc
--source include/not_embedded.inc
# Save the initial number of concurrent sessions
--source include/count_sessions.inc
call mtr.add_suppression("Deadlock found when trying to get lock; try restarting transaction");
--disable_query_log
call mtr.add_suppression("InnoDB: Transaction was aborted due to ");
--enable_query_log
--disable_warnings
drop table if exists t1, t2;

View File

@ -4537,7 +4537,7 @@ sub extract_warning_lines ($$) {
qr|InnoDB: liburing disabled|,
qr/InnoDB: Failed to set O_DIRECT on file/,
qr|setrlimit could not change the size of core files to 'infinity';|,
qr|feedback plugin: failed to retrieve the MAC address|,
qr|failed to retrieve the MAC address|,
qr|Plugin 'FEEDBACK' init function returned error|,
qr|Plugin 'FEEDBACK' registration as a INFORMATION SCHEMA failed|,
qr|'log-bin-use-v1-row-events' is MySQL .* compatible option|,

Binary file not shown.

View File

@ -4,4 +4,3 @@ call mtr.add_suppression("Can't generate a unique log-filename");
RESET MASTER;
FLUSH LOGS;
ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)

View File

@ -16,7 +16,6 @@ master-bin.2147483647 # Gtid # # GTID #-#-#
master-bin.2147483647 # Query # # CREATE DATABASE db1
RESET MASTER TO 2147483648;
ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
FOUND 1 /Turning logging off for the whole duration of the MariaDB server process/ in mysqld.1.err
"Following CREATE DATABSE db2 command will not be present in binary log"
"as binary log got closed due to ER_NO_UNIQUE_LOGFILE error."

View File

@ -11,5 +11,4 @@ UPDATE t1 SET c1=repeat('b',255);
INSERT INTO t1 VALUES (repeat('a', 255), repeat('a', 255),repeat('a', 255),repeat('a', 255),repeat('a', 255));
SHOW BINLOG EVENTS FROM POS;
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Invalid pos specified. Requested from pos:POS is greater than actual file size:MAX_POS
DROP TABLE t1;

View File

@ -26,7 +26,6 @@ RESET MASTER;
SET @@global.debug_dbug="d,error_unique_log_filename";
FLUSH LOGS;
ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
# assert: must show one binlog
show binary logs;
Log_name File_size
@ -52,7 +51,6 @@ RESET MASTER;
SET @@global.debug_dbug="d,error_unique_log_filename";
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug_46166.data' INTO TABLE t2;
ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
# assert: must show one entry
SELECT count(*) FROM t2;
count(*)
@ -78,7 +76,6 @@ LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug_46166.data' INTO TABLE t2;
INSERT INTO t2 VALUES ('muse');
COMMIT;
ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
# assert: must show three entries
SELECT count(*) FROM t2;
count(*)
@ -95,7 +92,6 @@ count(*)
0
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug_46166.data' INTO TABLE t4;
ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
# assert: must show 1 entry
SELECT count(*) FROM t4;
count(*)
@ -118,13 +114,10 @@ count(*)
0
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug_46166.data' INTO TABLE t4;
ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug_46166.data' INTO TABLE t2;
ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
INSERT INTO t2 VALUES ('aaa'), ('bbb'), ('ccc');
ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
# INFO: Count(*) Before Offending DELETEs
# assert: must show 1 entry
SELECT count(*) FROM t4;
@ -136,10 +129,8 @@ count(*)
4
DELETE FROM t4;
ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
DELETE FROM t2;
ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
# INFO: Count(*) After Offending DELETEs
# assert: must show zero entries
SELECT count(*) FROM t4;

View File

@ -178,7 +178,6 @@ SET @old_dbug= @@GLOBAL.debug_dbug;
SET debug_dbug= '+d,binlog_inject_new_name_error';
FLUSH LOGS;
ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
SET debug_dbug= @old_dbug;
INSERT INTO t4 VALUES (2);
connection slave;

View File

@ -1,3 +1,4 @@
call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=[1-9][0-9]*, page number=[0-9]*\\] in file");
create table t1(a serial) engine=innoDB;
set global innodb_encrypt_tables=ON;
show variables like 'innodb_encrypt%';

View File

@ -0,0 +1,81 @@
call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=[1-9][0-9]*, page number=3\\] in file .*test.t[12]\\.ibd looks corrupted");
call mtr.add_suppression("InnoDB: Unable to apply log to corrupted page ");
call mtr.add_suppression("InnoDB: Plugin initialization aborted");
call mtr.add_suppression("Plugin 'InnoDB' init function returned error");
call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed");
create table t1 (f1 int primary key, f2 blob)page_compressed = 1 engine=innodb stats_persistent=0;
create table t2(f1 int primary key, f2 blob)engine=innodb stats_persistent=0;
start transaction;
insert into t1 values(1, repeat('#',12));
insert into t1 values(2, repeat('+',12));
insert into t1 values(3, repeat('/',12));
insert into t1 values(4, repeat('-',12));
insert into t1 values(5, repeat('.',12));
insert into t2 select * from t1;
commit work;
SET GLOBAL innodb_fast_shutdown = 0;
# restart: --debug_dbug=+d,ib_log_checkpoint_avoid_hard --innodb_flush_sync=0
select space into @t1_space_id from information_schema.innodb_sys_tablespaces where name='test/t1';
select space into @t2_space_id from information_schema.innodb_sys_tablespaces where name='test/t2';
begin;
insert into t1 values (6, repeat('%', 400));
insert into t2 values (6, repeat('%', 400));
# xtrabackup prepare
set global innodb_saved_page_number_debug = 3;
set global innodb_fil_make_page_dirty_debug = @t1_space_id;
set global innodb_saved_page_number_debug = 3;
set global innodb_fil_make_page_dirty_debug = @t2_space_id;
set global innodb_buf_flush_list_now = 1;
# Kill the server
# restart
FOUND 2 /InnoDB: Recovered page \[page id: space=[1-9]*, page number=3\]/ in mysqld.1.err
check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
check table t2;
Table Op Msg_type Msg_text
test.t2 check status OK
select f1, f2 from t1;
f1 f2
1 ############
2 ++++++++++++
3 ////////////
4 ------------
5 ............
select f1, f2 from t2;
f1 f2
1 ############
2 ++++++++++++
3 ////////////
4 ------------
5 ............
SET GLOBAL innodb_fast_shutdown = 0;
# shutdown server
# remove datadir
# xtrabackup move back
# restart: --debug_dbug=+d,ib_log_checkpoint_avoid_hard --innodb_flush_sync=0
select space into @t1_space_id from information_schema.innodb_sys_tablespaces where name='test/t1';
begin;
insert into t1 values (6, repeat('%', 400));
set global innodb_saved_page_number_debug = 3;
set global innodb_fil_make_page_dirty_debug = @t1_space_id;
set global innodb_buf_flush_list_now = 1;
# Kill the server
# Corrupt the page 3 in t1.ibd file
# Assign the maximum value to lsn in doublewrite buffer page
# restart
FOUND 1 /InnoDB: Encrypted page \[page id: space=[1-9]*, page number=3\] in file .*test.t1.ibd looks corrupted/ in mysqld.1.err
select * from t1;
ERROR 42000: Unknown storage engine 'InnoDB'
# shutdown server
# remove datadir
# xtrabackup move back
# restart
select * from t1;
f1 f2
1 ############
2 ++++++++++++
3 ////////////
4 ------------
5 ............
drop table t2, t1;

View File

@ -1,5 +1,5 @@
--- encrypt_and_grep.result 2022-09-02 22:36:21.669650278 +0530
+++ encrypt_and_grep.reject 2022-11-29 19:01:22.080027528 +0530
--- encrypt_and_grep.result
+++ encrypt_and_grep.reject
@@ -14,6 +14,9 @@
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
NAME

View File

@ -1,5 +1,5 @@
--- innodb-remove-encryption.result 2022-09-02 20:44:59.960430396 +0530
+++ innodb-remove-encryption,undo3.reject 2022-11-29 19:02:24.813094277 +0530
--- innodb-remove-encryption.result
+++ innodb-remove-encryption,undo3.reject
@@ -13,6 +13,9 @@
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
NAME

View File

@ -1,5 +1,5 @@
--- innodb_encrypt_freed.result 2021-03-23 15:44:14.466377983 +0530
+++ innodb_encrypt_freed,undo3.reject 2022-11-29 19:04:24.987010571 +0530
--- innodb_encrypt_freed.result
+++ innodb_encrypt_freed,undo3.reject
@@ -14,6 +14,9 @@
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
NAME

View File

@ -1,5 +1,5 @@
--- innodb_encrypt_key_rotation_age.result 2022-06-02 16:15:08.395122720 +0530
+++ innodb_encrypt_key_rotation_age,undo3.reject 2022-11-29 19:06:07.964542115 +0530
--- innodb_encrypt_key_rotation_age.result
+++ innodb_encrypt_key_rotation_age,undo3.reject
@@ -12,6 +12,9 @@
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
NAME

View File

@ -3,6 +3,7 @@
-- source include/innodb_undo_tablespaces.inc
-- source include/not_embedded.inc
call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=[1-9][0-9]*, page number=[0-9]*\\] in file");
if (`select count(*) = 0 from information_schema.plugins
where plugin_name = 'debug_key_management' and plugin_status='active'`)
{

View File

@ -0,0 +1,3 @@
--innodb-use-atomic-writes=0
--innodb-encrypt-tables=FORCE
--innodb_sys_tablespaces

View File

@ -0,0 +1,223 @@
--source include/have_innodb.inc
--source include/have_debug.inc
--source include/not_embedded.inc
--source include/have_example_key_management_plugin.inc
call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=[1-9][0-9]*, page number=3\\] in file .*test.t[12]\\.ibd looks corrupted");
call mtr.add_suppression("InnoDB: Unable to apply log to corrupted page ");
call mtr.add_suppression("InnoDB: Plugin initialization aborted");
call mtr.add_suppression("Plugin 'InnoDB' init function returned error");
call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed");
let INNODB_PAGE_SIZE=`select @@innodb_page_size`;
let MYSQLD_DATADIR=`select @@datadir`;
let ALGO=`select @@innodb_checksum_algorithm`;
create table t1 (f1 int primary key, f2 blob)page_compressed = 1 engine=innodb stats_persistent=0;
create table t2(f1 int primary key, f2 blob)engine=innodb stats_persistent=0;
start transaction;
insert into t1 values(1, repeat('#',12));
insert into t1 values(2, repeat('+',12));
insert into t1 values(3, repeat('/',12));
insert into t1 values(4, repeat('-',12));
insert into t1 values(5, repeat('.',12));
insert into t2 select * from t1;
commit work;
# Slow shutdown and restart to make sure ibuf merge is finished
SET GLOBAL innodb_fast_shutdown = 0;
let $shutdown_timeout=;
let $restart_parameters=--debug_dbug=+d,ib_log_checkpoint_avoid_hard --innodb_flush_sync=0;
--source include/restart_mysqld.inc
--source ../../suite/innodb/include/no_checkpoint_start.inc
select space into @t1_space_id from information_schema.innodb_sys_tablespaces where name='test/t1';
select space into @t2_space_id from information_schema.innodb_sys_tablespaces where name='test/t2';
begin;
insert into t1 values (6, repeat('%', 400));
insert into t2 values (6, repeat('%', 400));
# Copy the t1.ibd, t2.ibd file
let $targetdir=$MYSQLTEST_VARDIR/tmp/backup_1;
--disable_result_log
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir;
--enable_result_log
echo # xtrabackup prepare;
--disable_result_log
exec $XTRABACKUP --prepare --target-dir=$targetdir;
set global innodb_saved_page_number_debug = 3;
set global innodb_fil_make_page_dirty_debug = @t1_space_id;
set global innodb_saved_page_number_debug = 3;
set global innodb_fil_make_page_dirty_debug = @t2_space_id;
set global innodb_buf_flush_list_now = 1;
--let CLEANUP_IF_CHECKPOINT=drop table t1, t2, unexpected_checkpoint;
--source ../../suite/innodb/include/no_checkpoint_end.inc
# Corrupt the page 3 in t1.ibd, t2.ibd file
perl;
use IO::Handle;
do "$ENV{MTR_SUITE_DIR}/include/crc32.pl";
my $polynomial = 0x82f63b78; # CRC-32C
my $algo = $ENV{ALGO};
die "Unsupported innodb_checksum_algorithm=$algo\n" unless $algo =~ /crc32/;
my $fname= "$ENV{'MYSQLD_DATADIR'}test/t1.ibd";
my $page_size = $ENV{INNODB_PAGE_SIZE};
my $page;
do "$ENV{MTR_SUITE_DIR}/../innodb/include/crc32.pl";
open(FILE, "+<", $fname) or die;
sysseek(FILE, 3*$page_size, 0);
sysread(FILE, $page, $page_size)==$page_size||die "Unable to read $name\n";
sysseek(FILE, 3*$page_size, 0)||die "Unable to seek $fname\n";
my $corrupted = $page;
# Set FIL_PAGE_LSN to the maximum
substr($corrupted, 16, 8) = chr(255) x 8;
substr($corrupted, $page_size - 8, 8) = chr(255) x 8;
if ($algo =~ /full_crc32/)
{
my $ck = mycrc32(substr($corrupted, 0, $page_size - 4), 0, $polynomial);
substr($corrupted, $page_size - 4, 4) = pack("N", $ck);
}
else
{
# Replace the innodb_checksum_algorithm=crc32 checksum
my $ck= pack("N",
mycrc32(substr($corrupted, 4, 22), 0, $polynomial) ^
mycrc32(substr($corrupted_, 38, $page_size - 38 - 8), 0,
$polynomial));
substr ($corrupted, 0, 4) = $ck;
substr ($corrupted, $page_size - 8, 4) = $ck;
}
syswrite(FILE, $corrupted);
close FILE;
# Zero the complete page
my $fname= "$ENV{'MYSQLD_DATADIR'}test/t2.ibd";
open(FILE, "+<", $fname) or die;
FILE->autoflush(1);
binmode FILE;
sysseek(FILE, 3*$page_size, 0);
print FILE chr(0) x ($ENV{'INNODB_PAGE_SIZE'});
close FILE;
EOF
# Successful recover from doublewrite buffer
let $restart_parameters=;
--source include/start_mysqld.inc
let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err;
let SEARCH_PATTERN=InnoDB: Recovered page \\[page id: space=[1-9]*, page number=3\\];
--source include/search_pattern_in_file.inc
check table t1;
check table t2;
select f1, f2 from t1;
select f1, f2 from t2;
SET GLOBAL innodb_fast_shutdown = 0;
let $shutdown_timeout=;
let $restart_parameters=--debug_dbug=+d,ib_log_checkpoint_avoid_hard --innodb_flush_sync=0;
--source ../../mariabackup/include/restart_and_restore.inc
--source ../../suite/innodb/include/no_checkpoint_start.inc
select space into @t1_space_id from information_schema.innodb_sys_tablespaces where name='test/t1';
begin;
insert into t1 values (6, repeat('%', 400));
set global innodb_saved_page_number_debug = 3;
set global innodb_fil_make_page_dirty_debug = @t1_space_id;
set global innodb_buf_flush_list_now = 1;
--let CLEANUP_IF_CHECKPOINT=drop table t1, unexpected_checkpoint;
--source ../../suite/innodb/include/no_checkpoint_end.inc
--echo # Corrupt the page 3 in t1.ibd file
--echo # Assign the maximum value to lsn in doublewrite buffer page
perl;
use IO::Handle;
do "$ENV{MTR_SUITE_DIR}/include/crc32.pl";
my $polynomial = 0x82f63b78; # CRC-32C
my $algo = $ENV{ALGO};
die "Unsupported innodb_checksum_algorithm=$algo\n" unless $algo =~ /crc32/;
my $fname= "$ENV{'MYSQLD_DATADIR'}test/t1.ibd";
my $page_size = $ENV{INNODB_PAGE_SIZE};
my $page;
do "$ENV{MTR_SUITE_DIR}/../innodb/include/crc32.pl";
open(FILE, "+<", $fname) or die;
sysseek(FILE, 3*$page_size, 0);
sysread(FILE, $page, $page_size)==$page_size||die "Unable to read $name\n";
sysseek(FILE, 3*$page_size, 0)||die "Unable to seek $fname\n";
my $corrupted = $page;
# Set FIL_PAGE_LSN to the maximum
substr($corrupted, 16, 8) = chr(255) x 8;
substr($corrupted, $page_size - 8, 8) = chr(255) x 8;
if ($algo =~ /full_crc32/)
{
my $ck = mycrc32(substr($corrupted, 0, $page_size - 4), 0, $polynomial);
substr($corrupted, $page_size - 4, 4) = pack("N", $ck);
}
else
{
# Replace the innodb_checksum_algorithm=crc32 checksum
my $ck= pack("N",
mycrc32(substr($corrupted, 4, 22), 0, $polynomial) ^
mycrc32(substr($corrupted_, 38, $page_size - 38 - 8), 0,
$polynomial));
substr ($corrupted, 0, 4) = $ck;
substr ($corrupted, $page_size - 8, 4) = $ck;
}
syswrite(FILE, $corrupted);
close FILE;
# Change the page lsn to maximum value
open(FILE, "+<", "$ENV{MYSQLD_DATADIR}ibdata1")||die "cannot open ibdata1\n";
sysseek(FILE, 6 * $page_size - 190, 0)||die "Unable to seek ibdata1\n";
sysread(FILE, $_, 12) == 12||die "Unable to read TRX_SYS\n";
my($magic,$d1,$d2)=unpack "NNN", $_;
die "magic=$magic, $d1, $d2\n" unless $magic == 536853855 && $d2 >= $d1 + 64;
sysseek(FILE, $d1 * $page_size, 0)||die "Unable to seek ibdata1\n";
# Find the page in the doublewrite buffer
for (my $d = $d1; $d < $d2 + 64; $d++)
{
sysread(FILE, $_, $page_size)==$page_size||die "Cannot read doublewrite\n";
next unless $_ eq $page;
sysseek(FILE, $d * $page_size, 0)||die "Unable to seek ibdata1\n";
substr($_, 16, 8) = chr(255) x 8;
if ($algo =~ /full_crc32/)
{
my $ck = mycrc32(substr($_, 0, $page_size - 4), 0, $polynomial);
substr($_, $page_size - 4, 4) = pack("N", $ck);
}
else
{
# Replace the innodb_checksum_algorithm=crc32 checksum
my $ck= pack("N",
mycrc32(substr($_, 4, 22), 0, $polynomial) ^
mycrc32(substr($_, 38, $page_size - 38 - 8), 0,
$polynomial));
substr ($_, 0, 4) = $ck;
substr ($_, $page_size - 8, 4) = $ck;
}
syswrite(FILE, $_, $page_size)==$page_size||die;
close(FILE);
exit 0;
}
die "Did not find the page in the doublewrite buffer ($d1,$d2)\n";
EOF
let $restart_parameters=;
--source include/start_mysqld.inc
let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err;
let SEARCH_PATTERN=InnoDB: Encrypted page \\[page id: space=[1-9]*, page number=3\\] in file .*test.t1.ibd looks corrupted;
--source include/search_pattern_in_file.inc
--error ER_UNKNOWN_STORAGE_ENGINE
select * from t1;
--source ../../mariabackup/include/restart_and_restore.inc
select * from t1;
drop table t2, t1;

View File

@ -57,6 +57,7 @@ def information_schema CLIENT_STATISTICS TOTAL_SSL_CONNECTIONS 24 NULL NO bigint
def information_schema CLIENT_STATISTICS UPDATE_COMMANDS 16 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL NO NO
def information_schema COLLATIONS CHARACTER_SET_NAME 2 NULL YES varchar 32 96 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(32) NEVER NULL NO NO
def information_schema COLLATIONS COLLATION_NAME 1 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL NO NO
def information_schema COLLATIONS COMMENT 7 NULL NO varchar 80 240 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(80) NEVER NULL NO NO
def information_schema COLLATIONS ID 3 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(11) NEVER NULL NO NO
def information_schema COLLATIONS IS_COMPILED 5 NULL NO varchar 3 9 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(3) NEVER NULL NO NO
def information_schema COLLATIONS IS_DEFAULT 4 NULL YES varchar 3 9 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(3) NEVER NULL NO NO
@ -641,6 +642,7 @@ NULL information_schema COLLATIONS ID bigint NULL NULL NULL NULL bigint(11)
3.0000 information_schema COLLATIONS IS_DEFAULT varchar 3 9 utf8mb3 utf8mb3_general_ci varchar(3)
3.0000 information_schema COLLATIONS IS_COMPILED varchar 3 9 utf8mb3 utf8mb3_general_ci varchar(3)
NULL information_schema COLLATIONS SORTLEN bigint NULL NULL NULL NULL bigint(3)
3.0000 information_schema COLLATIONS COMMENT varchar 80 240 utf8mb3 utf8mb3_general_ci varchar(80)
3.0000 information_schema COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
3.0000 information_schema COLLATION_CHARACTER_SET_APPLICABILITY CHARACTER_SET_NAME varchar 32 96 utf8mb3 utf8mb3_general_ci varchar(32)
3.0000 information_schema COLLATION_CHARACTER_SET_APPLICABILITY FULL_COLLATION_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)

View File

@ -164,7 +164,7 @@ def mysql servers Owner 9 '' NO varchar 512 1536 NULL NULL NULL utf8mb3 utf8mb3_
def mysql servers Password 5 '' NO char 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci char(64) select,insert,update,references NEVER NULL NO NO
def mysql servers Port 6 0 NO int NULL NULL 10 0 NULL NULL NULL int(4) select,insert,update,references NEVER NULL NO NO
def mysql servers Server_name 1 '' NO char 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci char(64) PRI select,insert,update,references NEVER NULL NO NO
def mysql servers Socket 7 '' NO char 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci char(64) select,insert,update,references NEVER NULL NO NO
def mysql servers Socket 7 '' NO char 108 324 NULL NULL NULL utf8mb3 utf8mb3_general_ci char(108) select,insert,update,references NEVER NULL NO NO
def mysql servers Username 4 '' NO char 128 384 NULL NULL NULL utf8mb3 utf8mb3_general_ci char(128) select,insert,update,references NEVER NULL NO NO
def mysql servers Wrapper 8 '' NO char 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci char(64) select,insert,update,references NEVER NULL NO NO
def mysql slow_log db 7 NULL NO varchar 512 1536 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(512) select,insert,update,references NEVER NULL NO NO
@ -492,7 +492,7 @@ NULL mysql proxies_priv Timestamp timestamp NULL NULL NULL NULL timestamp
3.0000 mysql servers Username char 128 384 utf8mb3 utf8mb3_general_ci char(128)
3.0000 mysql servers Password char 64 192 utf8mb3 utf8mb3_general_ci char(64)
NULL mysql servers Port int NULL NULL NULL NULL int(4)
3.0000 mysql servers Socket char 64 192 utf8mb3 utf8mb3_general_ci char(64)
3.0000 mysql servers Socket char 108 324 utf8mb3 utf8mb3_general_ci char(108)
3.0000 mysql servers Wrapper char 64 192 utf8mb3 utf8mb3_general_ci char(64)
3.0000 mysql servers Owner varchar 512 1536 utf8mb3 utf8mb3_general_ci varchar(512)
NULL mysql slow_log start_time timestamp NULL NULL NULL NULL timestamp(6)

View File

@ -150,7 +150,7 @@ def mysql servers Owner 9 '' NO varchar 512 1536 NULL NULL NULL utf8mb3 utf8mb3_
def mysql servers Password 5 '' NO char 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci char(64) NEVER NULL NO NO
def mysql servers Port 6 0 NO int NULL NULL 10 0 NULL NULL NULL int(4) NEVER NULL NO NO
def mysql servers Server_name 1 '' NO char 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci char(64) PRI NEVER NULL NO NO
def mysql servers Socket 7 '' NO char 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci char(64) NEVER NULL NO NO
def mysql servers Socket 7 '' NO char 108 324 NULL NULL NULL utf8mb3 utf8mb3_general_ci char(108) NEVER NULL NO NO
def mysql servers Username 4 '' NO char 128 384 NULL NULL NULL utf8mb3 utf8mb3_general_ci char(128) NEVER NULL NO NO
def mysql servers Wrapper 8 '' NO char 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci char(64) NEVER NULL NO NO
def mysql slow_log db 7 NULL NO varchar 512 1536 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(512) NEVER NULL NO NO
@ -475,7 +475,7 @@ NULL mysql proxies_priv Timestamp timestamp NULL NULL NULL NULL timestamp
3.0000 mysql servers Username char 128 384 utf8mb3 utf8mb3_general_ci char(128)
3.0000 mysql servers Password char 64 192 utf8mb3 utf8mb3_general_ci char(64)
NULL mysql servers Port int NULL NULL NULL NULL int(4)
3.0000 mysql servers Socket char 64 192 utf8mb3 utf8mb3_general_ci char(64)
3.0000 mysql servers Socket char 108 324 utf8mb3 utf8mb3_general_ci char(108)
3.0000 mysql servers Wrapper char 64 192 utf8mb3 utf8mb3_general_ci char(64)
3.0000 mysql servers Owner varchar 512 1536 utf8mb3 utf8mb3_general_ci varchar(512)
NULL mysql slow_log start_time timestamp NULL NULL NULL NULL timestamp(6)

View File

@ -10,6 +10,5 @@
#
##############################################################################
galera_sequences : MDEV-32561 WSREP FSM failure: no such a transition REPLICATING -> COMMITTED
galera_as_slave_replay : MDEV-32780 galera_as_slave_replay: assertion in the wsrep::transaction::before_rollback()
galera_slave_replay : MDEV-32780 galera_as_slave_replay: assertion in the wsrep::transaction::before_rollback()

View File

@ -0,0 +1,23 @@
connection node_2;
connection node_1;
SET SESSION query_prealloc_size=8192;
SET max_session_mem_used=50000;
CREATE TABLE t1 (c1 INT NOT NULL) ENGINE=InnoDB ;
UPDATE t1 SET c1='1';
ERROR HY000: The MariaDB server is running with the --max-session-mem-used=50000 option so it cannot execute this statement
SET wsrep_trx_fragment_size=1;
SET SESSION AUTOCOMMIT=0;
INSERT INTO t1 VALUES (1);
SET @inserted_value=REPEAT ('z', 257);
CREATE TABLE t2 (a INT PRIMARY KEY) ENGINE=InnoDB ;
SELECT * FROM t1 WHERE c1='two';
ERROR HY000: The MariaDB server is running with the --max-session-mem-used=50000 option so it cannot execute this statement
UPDATE t1 SET c1='2';
INSERT INTO t2 VALUES (2);
ERROR HY000: The MariaDB server is running with the --max-session-mem-used=50000 option so it cannot execute this statement
INSERT INTO t2 VALUES (3);
INSERT INTO t2 VALUES (4);
INSERT INTO t2 VALUES (5);
CREATE VIEW v1 AS SELECT c1 FROM t1 WHERE c1 IN (SELECT a FROM t2) GROUP BY c1;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
DROP TABLE t1,t2;

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