Skip to content
Permalink
Browse files
Merge branch '10.4' into 10.5
  • Loading branch information
sanja-byelkin committed Nov 1, 2020
2 parents b0ff791 + 80c951c commit 8e1e285
Show file tree
Hide file tree
Showing 61 changed files with 1,124 additions and 154 deletions.
@@ -18,7 +18,7 @@

#include "client_priv.h"
#include <sslopt-vars.h>
#include "../scripts/mysql_fix_privilege_tables_sql.c"
#include <../scripts/mysql_fix_privilege_tables_sql.c>

#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */

@@ -1443,7 +1443,7 @@ backup_files(const char *from, bool prep_mode)

void backup_fix_ddl(void);

static lsn_t get_current_lsn(MYSQL *connection)
lsn_t get_current_lsn(MYSQL *connection)
{
static const char lsn_prefix[] = "\nLog sequence number ";
lsn_t lsn = 0;
@@ -3,6 +3,7 @@
#define XTRABACKUP_BACKUP_COPY_H

#include <my_global.h>
#include <mysql.h>
#include "datasink.h"

/* special files */
@@ -48,4 +49,7 @@ is_path_separator(char);
bool
directory_exists(const char *dir, bool create);

lsn_t
get_current_lsn(MYSQL *connection);

#endif
@@ -2502,6 +2502,8 @@ static my_bool xtrabackup_copy_datafile(fil_node_t *node, uint thread_n,
return(FALSE);
}

memset(&write_filt_ctxt, 0, sizeof(xb_write_filt_ctxt_t));

bool was_dropped;
pthread_mutex_lock(&backup_mutex);
was_dropped = (ddl_tracker.drops.find(node->space->id) != ddl_tracker.drops.end());
@@ -2533,7 +2535,6 @@ static my_bool xtrabackup_copy_datafile(fil_node_t *node, uint thread_n,
sizeof dst_name - 1);
dst_name[sizeof dst_name - 1] = '\0';

memset(&write_filt_ctxt, 0, sizeof(xb_write_filt_ctxt_t));
ut_a(write_filter.process != NULL);

if (write_filter.init != NULL &&
@@ -2867,8 +2868,14 @@ static void dbug_mariabackup_event(const char *event,const char *key)

}
#define DBUG_MARIABACKUP_EVENT(A, B) DBUG_EXECUTE_IF("mariabackup_events", dbug_mariabackup_event(A,B););
#define DBUG_MB_INJECT_CODE(EVENT, KEY, CODE) \
DBUG_EXECUTE_IF("mariabackup_inject_code", {\
char *env = getenv(EVENT); \
if (env && !strcmp(env, KEY)) { CODE } \
})
#else
#define DBUG_MARIABACKUP_EVENT(A,B)
#define DBUG_MB_INJECT_CODE(EVENT, KEY, CODE)
#endif

/**************************************************************************
@@ -2893,6 +2900,8 @@ DECLARE_THREAD(data_copy_thread_func)(

while ((node = datafiles_iter_next(ctxt->it)) != NULL) {
DBUG_MARIABACKUP_EVENT("before_copy", node->space->name);
DBUG_MB_INJECT_CODE("wait_innodb_redo_before_copy", node->space->name,
backup_wait_for_lsn(get_current_lsn(mysql_connection)););
/* copy the datafile */
if (xtrabackup_copy_datafile(node, num, NULL,
xtrabackup_incremental ? wf_incremental : wf_write_through))
@@ -333,7 +333,7 @@ static my_bool emb_read_query_result(MYSQL *mysql)
static int emb_stmt_execute(MYSQL_STMT *stmt)
{
DBUG_ENTER("emb_stmt_execute");
uchar header[5];
uchar header[9];
THD *thd;
my_bool res;

@@ -345,6 +345,7 @@ static int emb_stmt_execute(MYSQL_STMT *stmt)

int4store(header, stmt->stmt_id);
header[4]= (uchar) stmt->flags;
header[5]= header[6]= header[7]= header[8]= 0; // safety
thd= (THD*)stmt->mysql->thd;
thd->client_param_count= stmt->param_count;
thd->client_params= stmt->params;
@@ -0,0 +1,7 @@
source include/have_innodb.inc;

if (!`select count(*) from information_schema.plugins
where plugin_name = 'innodb' and plugin_status = 'active' and
plugin_library is null`) {
skip Need compiled-in InnoDB;
}

This file was deleted.

@@ -24,3 +24,9 @@ SELECT 0 FROM t1 FORCE INDEX FOR GROUP BY(a) WHERE a = 0 OR b = 0 AND c = 0;
0
DROP TABLE t1;
End of 5.6 tests
CREATE TABLE `t` (
`a` varchar(3000) NOT NULL default '',
PRIMARY KEY (`a`)
) ENGINE=BLACKHOLE;
DROP TABLE `t`;
End of 10.1 tests
@@ -38,3 +38,19 @@ SELECT 0 FROM t1 FORCE INDEX FOR GROUP BY(a) WHERE a = 0 OR b = 0 AND c = 0;
DROP TABLE t1;

--echo End of 5.6 tests

#
# MDEV-24017 / bug 53588 test case.
#
# Create long enough index (between 1000 and 3500). 1000 is the old value,
# 3500 is innodb value (see ha_innobase::max_supported_key_length()). Without
# the fix the test will fail with "Specified key was too long" error.
#
CREATE TABLE `t` (
`a` varchar(3000) NOT NULL default '',
PRIMARY KEY (`a`)
) ENGINE=BLACKHOLE;

DROP TABLE `t`;

--echo End of 10.1 tests
@@ -0,0 +1,8 @@
create table t1(a int) engine=innodb;
# restart
select * from t1;
a
1
2
5
drop table t1;
@@ -0,0 +1,27 @@
source include/have_static_innodb.inc;
source include/not_embedded.inc;

let $datadir= `select @@datadir`;

create table t1(a int) engine=innodb;
source include/shutdown_mysqld.inc;

write_file $MYSQLTEST_VARDIR/tmp/bootstrap_test.sql;
use test;
insert t1 values (1);
start transaction;
insert t1 values (2);
savepoint s1;
insert t1 values (3);
savepoint s2;
insert t1 values (4);
rollback to savepoint s1;
insert t1 values (5);
commit;
EOF
exec $MYSQLD_BOOTSTRAP_CMD --datadir=$datadir --innodb < $MYSQLTEST_VARDIR/tmp/bootstrap_test.sql >> $MYSQLTEST_VARDIR/tmp/bootstrap.log 2>&1;
remove_file $MYSQLTEST_VARDIR/tmp/bootstrap_test.sql;

source include/start_mysqld.inc;
select * from t1;
drop table t1;
@@ -1186,13 +1186,13 @@ i count(*) std(e1/e2)
3 4 0.00000000
select std(s1/s2) from bug22555;
std(s1/s2)
0.21328517
0.21325764
select std(o1/o2) from bug22555;
std(o1/o2)
0.2132576358664934
select std(e1/e2) from bug22555;
std(e1/e2)
0.21328517
0.21325764
set @saved_div_precision_increment=@@div_precision_increment;
set div_precision_increment=19;
select i, count(*), std(s1/s2) from bug22555 group by i order by i;
@@ -375,8 +375,7 @@ SELECT SLEEP(1000);
connection con1;
KILL QUERY ID @id;
connection default;
SLEEP(1000)
1
ERROR 70100: Query execution was interrupted
KILL QUERY ID 0;
ERROR HY000: Unknown query id: 0
#
@@ -392,8 +391,7 @@ ERROR HY000: You are not owner of query ID
connection con1;
KILL QUERY ID @id;
connection default;
SLEEP(1000)
1
ERROR 70100: Query execution was interrupted
disconnect con5;
DROP USER u1@localhost;
SET DEBUG_SYNC = 'RESET';
@@ -606,6 +606,7 @@ let $wait_condition= SELECT @id:=QUERY_ID FROM INFORMATION_SCHEMA.PROCESSLIST WH
source include/wait_condition.inc;
KILL QUERY ID @id;
connection default;
--error ER_QUERY_INTERRUPTED
reap;

--error ER_NO_SUCH_QUERY
@@ -632,6 +633,7 @@ connection con1;
KILL QUERY ID @id;

connection default;
--error ER_QUERY_INTERRUPTED
reap;
disconnect con5;
DROP USER u1@localhost;

0 comments on commit 8e1e285

Please sign in to comment.