Skip to content

Commit 8e1e285

Browse files
committed
Merge branch '10.4' into 10.5
2 parents b0ff791 + 80c951c commit 8e1e285

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+1124
-154
lines changed

client/mysql_upgrade.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
#include "client_priv.h"
2020
#include <sslopt-vars.h>
21-
#include "../scripts/mysql_fix_privilege_tables_sql.c"
21+
#include <../scripts/mysql_fix_privilege_tables_sql.c>
2222

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

extra/mariabackup/backup_copy.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1443,7 +1443,7 @@ backup_files(const char *from, bool prep_mode)
14431443

14441444
void backup_fix_ddl(void);
14451445

1446-
static lsn_t get_current_lsn(MYSQL *connection)
1446+
lsn_t get_current_lsn(MYSQL *connection)
14471447
{
14481448
static const char lsn_prefix[] = "\nLog sequence number ";
14491449
lsn_t lsn = 0;

extra/mariabackup/backup_copy.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#define XTRABACKUP_BACKUP_COPY_H
44

55
#include <my_global.h>
6+
#include <mysql.h>
67
#include "datasink.h"
78

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

52+
lsn_t
53+
get_current_lsn(MYSQL *connection);
54+
5155
#endif

extra/mariabackup/xtrabackup.cc

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2502,6 +2502,8 @@ static my_bool xtrabackup_copy_datafile(fil_node_t *node, uint thread_n,
25022502
return(FALSE);
25032503
}
25042504

2505+
memset(&write_filt_ctxt, 0, sizeof(xb_write_filt_ctxt_t));
2506+
25052507
bool was_dropped;
25062508
pthread_mutex_lock(&backup_mutex);
25072509
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,
25332535
sizeof dst_name - 1);
25342536
dst_name[sizeof dst_name - 1] = '\0';
25352537

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

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

28682869
}
28692870
#define DBUG_MARIABACKUP_EVENT(A, B) DBUG_EXECUTE_IF("mariabackup_events", dbug_mariabackup_event(A,B););
2871+
#define DBUG_MB_INJECT_CODE(EVENT, KEY, CODE) \
2872+
DBUG_EXECUTE_IF("mariabackup_inject_code", {\
2873+
char *env = getenv(EVENT); \
2874+
if (env && !strcmp(env, KEY)) { CODE } \
2875+
})
28702876
#else
28712877
#define DBUG_MARIABACKUP_EVENT(A,B)
2878+
#define DBUG_MB_INJECT_CODE(EVENT, KEY, CODE)
28722879
#endif
28732880

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

28942901
while ((node = datafiles_iter_next(ctxt->it)) != NULL) {
28952902
DBUG_MARIABACKUP_EVENT("before_copy", node->space->name);
2903+
DBUG_MB_INJECT_CODE("wait_innodb_redo_before_copy", node->space->name,
2904+
backup_wait_for_lsn(get_current_lsn(mysql_connection)););
28962905
/* copy the datafile */
28972906
if (xtrabackup_copy_datafile(node, num, NULL,
28982907
xtrabackup_incremental ? wf_incremental : wf_write_through))

libmysqld/lib_sql.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ static my_bool emb_read_query_result(MYSQL *mysql)
333333
static int emb_stmt_execute(MYSQL_STMT *stmt)
334334
{
335335
DBUG_ENTER("emb_stmt_execute");
336-
uchar header[5];
336+
uchar header[9];
337337
THD *thd;
338338
my_bool res;
339339

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

346346
int4store(header, stmt->stmt_id);
347347
header[4]= (uchar) stmt->flags;
348+
header[5]= header[6]= header[7]= header[8]= 0; // safety
348349
thd= (THD*)stmt->mysql->thd;
349350
thd->client_param_count= stmt->param_count;
350351
thd->client_params= stmt->params;
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
source include/have_innodb.inc;
2+
3+
if (!`select count(*) from information_schema.plugins
4+
where plugin_name = 'innodb' and plugin_status = 'active' and
5+
plugin_library is null`) {
6+
skip Need compiled-in InnoDB;
7+
}

mysql-test/include/not_true.require

Lines changed: 0 additions & 2 deletions
This file was deleted.

mysql-test/main/blackhole.result

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,9 @@ SELECT 0 FROM t1 FORCE INDEX FOR GROUP BY(a) WHERE a = 0 OR b = 0 AND c = 0;
2424
0
2525
DROP TABLE t1;
2626
End of 5.6 tests
27+
CREATE TABLE `t` (
28+
`a` varchar(3000) NOT NULL default '',
29+
PRIMARY KEY (`a`)
30+
) ENGINE=BLACKHOLE;
31+
DROP TABLE `t`;
32+
End of 10.1 tests

mysql-test/main/blackhole.test

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,19 @@ SELECT 0 FROM t1 FORCE INDEX FOR GROUP BY(a) WHERE a = 0 OR b = 0 AND c = 0;
3838
DROP TABLE t1;
3939

4040
--echo End of 5.6 tests
41+
42+
#
43+
# MDEV-24017 / bug 53588 test case.
44+
#
45+
# Create long enough index (between 1000 and 3500). 1000 is the old value,
46+
# 3500 is innodb value (see ha_innobase::max_supported_key_length()). Without
47+
# the fix the test will fail with "Specified key was too long" error.
48+
#
49+
CREATE TABLE `t` (
50+
`a` varchar(3000) NOT NULL default '',
51+
PRIMARY KEY (`a`)
52+
) ENGINE=BLACKHOLE;
53+
54+
DROP TABLE `t`;
55+
56+
--echo End of 10.1 tests
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
create table t1(a int) engine=innodb;
2+
# restart
3+
select * from t1;
4+
a
5+
1
6+
2
7+
5
8+
drop table t1;

0 commit comments

Comments
 (0)