Skip to content

Commit 35e4770

Browse files
committed
Merge remote-tracking branch 'upstream/5.6' into 5.6
2 parents 7907683 + 895e70b commit 35e4770

Some content is hidden

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

44 files changed

+1198
-214
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
MYSQL_VERSION_MAJOR=5
22
MYSQL_VERSION_MINOR=6
3-
MYSQL_VERSION_PATCH=44
3+
MYSQL_VERSION_PATCH=45
44
MYSQL_VERSION_EXTRA=

client/mysqltest.cc

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
1+
/* Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
22
33
This program is free software; you can redistribute it and/or modify
44
it under the terms of the GNU General Public License as published by
@@ -6285,34 +6285,34 @@ int read_line(char *buf, int size)
62856285
/* Could be a multibyte character */
62866286
/* This code is based on the code in "sql_load.cc" */
62876287
#ifdef USE_MB
6288-
int charlen = my_mbcharlen(charset_info, (unsigned char) c);
6288+
uint charlen = my_mbcharlen(charset_info, (unsigned char) c);
6289+
if (charlen == 0)
6290+
DBUG_RETURN(1);
62896291
/* We give up if multibyte character is started but not */
62906292
/* completed before we pass buf_end */
62916293
if ((charlen > 1) && (p + charlen) <= buf_end)
62926294
{
6293-
int i;
6294-
char* mb_start = p;
6295-
6296-
*p++ = c;
6297-
6298-
for (i= 1; i < charlen; i++)
6299-
{
6300-
c= my_getc(cur_file->file);
6301-
if (feof(cur_file->file))
6302-
goto found_eof;
6303-
*p++ = c;
6304-
}
6305-
if (! my_ismbchar(charset_info, mb_start, p))
6306-
{
6307-
/* It was not a multiline char, push back the characters */
6308-
/* We leave first 'c', i.e. pretend it was a normal char */
6309-
while (p-1 > mb_start)
6310-
my_ungetc(*--p);
6311-
}
6295+
char* mb_start = p;
6296+
*p++ = c;
6297+
6298+
for (uint i= 1; i < charlen; i++)
6299+
{
6300+
c= my_getc(cur_file->file);
6301+
if (feof(cur_file->file))
6302+
goto found_eof;
6303+
*p++ = c;
6304+
}
6305+
if (! my_ismbchar(charset_info, mb_start, p))
6306+
{
6307+
/* It was not a multiline char, push back the characters */
6308+
/* We leave first 'c', i.e. pretend it was a normal char */
6309+
while (p-1 > mb_start)
6310+
my_ungetc(*--p);
6311+
}
63126312
}
63136313
else
63146314
#endif
6315-
*p++= c;
6315+
*p++= c;
63166316
}
63176317
}
63186318
die("The input buffer is too small for this query.x\n" \

include/m_ctype.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
1+
/* Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
22
33
This program is free software; you can redistribute it and/or modify
44
it under the terms of the GNU General Public License as published by
@@ -688,7 +688,8 @@ extern my_bool my_parse_charset_xml(MY_CHARSET_LOADER *loader,
688688
extern char *my_strchr(const CHARSET_INFO *cs, const char *str,
689689
const char *end, pchar c);
690690
extern size_t my_strcspn(const CHARSET_INFO *cs, const char *str,
691-
const char *end, const char *accept);
691+
const char *end, const char *reject,
692+
int reject_length);
692693

693694
my_bool my_propagate_simple(const CHARSET_INFO *cs, const uchar *str,
694695
size_t len);

libmysql/authentication_win/common.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
1+
/* Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
22
33
This program is free software; you can redistribute it and/or modify
44
it under the terms of the GNU General Public License as published by
@@ -504,7 +504,7 @@ const char* get_last_error_message(Error_message_buf buf)
504504
buf[0]= '\0';
505505
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM,
506506
NULL, error, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
507-
(LPTSTR)buf, sizeof(buf), NULL );
507+
(LPTSTR)buf, sizeof(Error_message_buf), NULL);
508508

509509
return buf;
510510
}

mysql-test/extra/binlog_tests/drop_temp_table.test

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,3 +100,72 @@ RESET MASTER;
100100
DROP TABLE t1;
101101

102102
# End of 4.1 tests
103+
104+
105+
--echo #
106+
--echo # BUG#28642318: POINT IN TIME RECOVERY USING MYSQLBINLOG BROKEN
107+
--echo # WITH TEMPORARY TABLE -> ERRORS
108+
109+
--echo # Test case for DELETE query.
110+
111+
RESET MASTER;
112+
connect (con1,localhost,root,,);
113+
114+
--echo # Set up.
115+
--connection default
116+
--disable_warnings
117+
SET @save_binlog_format= @@session.binlog_format;
118+
SET @@session.binlog_format=STATEMENT;
119+
let $MYSQLD_DATADIR= `select @@datadir`;
120+
CREATE TABLE t1 (a INT) ENGINE=INNODB;
121+
122+
--connection con1
123+
SET @@session.binlog_format=STATEMENT;
124+
CREATE TEMPORARY TABLE t1 (b BLOB) ENGINE=INNODB;
125+
126+
--connection default
127+
DELETE d1, d2 FROM t1 AS d1, t1 AS d2 WHERE d1.a<>d2.a;
128+
129+
--exec $MYSQL_BINLOG --force-if-open $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/bug28642318.sql
130+
131+
--connection default
132+
DROP TABLE t1;
133+
134+
--echo # DELETE query fails with table re-open error without patch.
135+
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug28642318.sql
136+
137+
--echo # Clean up.
138+
--connection con1
139+
DROP TABLE IF EXISTS t1;
140+
141+
--connection default
142+
DROP TABLE IF EXISTS t1;
143+
RESET MASTER;
144+
145+
--echo # Test case for DROP query.
146+
147+
--connection default
148+
CREATE TABLE t1 (a INT) ENGINE=INNODB;
149+
150+
--connection con1
151+
CREATE TEMPORARY TABLE t1 (b BLOB) ENGINE=INNODB;
152+
153+
--connection default
154+
DROP TABLE t1;
155+
156+
--connection con1
157+
DROP TABLE t1;
158+
159+
--connection default
160+
--exec $MYSQL_BINLOG --force-if-open $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/bug28642318.sql
161+
162+
--echo # DROP table query fails with unknown table error without patch.
163+
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug28642318.sql
164+
165+
--echo # Clean up
166+
--connection default
167+
SET @@session.binlog_format= @save_binlog_format;
168+
RESET MASTER;
169+
170+
--disconnect con1
171+
--enable_warnings

mysql-test/include/mtr_warnings.sql

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
-- Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
1+
-- Copyright (c) 2008, 2019, Oracle and/or its affiliates. All rights reserved.
22
--
33
-- This program is free software; you can redistribute it and/or modify
44
-- it under the terms of the GNU General Public License as published by
@@ -256,6 +256,10 @@ INSERT INTO global_suppressions VALUES
256256
*/
257257
("Insecure configuration for --pid-file:*"),
258258
("Few location(s) are inaccessible while checking PID filepath"),
259+
/*
260+
Following WL#12670, this warning is expected.
261+
*/
262+
("Setting named_pipe_full_access_group='\\*everyone\\*' is insecure"),
259263

260264
("THE_LAST_SUPPRESSION")||
261265

mysql-test/mysql-test-run.pl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/perl
22
# -*- cperl -*-
33

4-
# Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved.
4+
# Copyright (c) 2004, 2019, Oracle and/or its affiliates. All rights reserved.
55
#
66
# This program is free software; you can redistribute it and/or modify
77
# it under the terms of the GNU General Public License as published by
@@ -4811,7 +4811,7 @@ ($)
48114811
return $result;
48124812
}
48134813
# Wait for next process to exit
4814-
next;
4814+
next if not $result;
48154815
}
48164816
else
48174817
{

mysql-test/r/loaddata.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ DROP TABLE t1;
507507
# Bug#11765139 58069: LOAD DATA INFILE: VALGRIND REPORTS INVALID MEMORY READS AND WRITES WITH U
508508
#
509509
CREATE TABLE t1(f1 INT);
510-
SELECT 0xE1BB30 INTO OUTFILE 't1.dat';
510+
SELECT 0xE1C330 INTO OUTFILE 't1.dat';
511511
LOAD DATA INFILE 't1.dat' IGNORE INTO TABLE t1 CHARACTER SET utf8;
512512
DROP TABLE t1;
513513
#

mysql-test/suite/binlog/r/binlog_row_drop_tmp_tbl.result

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,30 @@ master-bin.000001 # Query # # COMMIT
5454
master-bin.000001 # Query # # use `test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `ttmp1`
5555
RESET MASTER;
5656
DROP TABLE t1;
57+
#
58+
# BUG#28642318: POINT IN TIME RECOVERY USING MYSQLBINLOG BROKEN
59+
# WITH TEMPORARY TABLE -> ERRORS
60+
# Test case for DELETE query.
61+
RESET MASTER;
62+
# Set up.
63+
SET @save_binlog_format= @@session.binlog_format;
64+
SET @@session.binlog_format=STATEMENT;
65+
CREATE TABLE t1 (a INT) ENGINE=INNODB;
66+
SET @@session.binlog_format=STATEMENT;
67+
CREATE TEMPORARY TABLE t1 (b BLOB) ENGINE=INNODB;
68+
DELETE d1, d2 FROM t1 AS d1, t1 AS d2 WHERE d1.a<>d2.a;
69+
DROP TABLE t1;
70+
# DELETE query fails with table re-open error without patch.
71+
# Clean up.
72+
DROP TABLE IF EXISTS t1;
73+
DROP TABLE IF EXISTS t1;
74+
RESET MASTER;
75+
# Test case for DROP query.
76+
CREATE TABLE t1 (a INT) ENGINE=INNODB;
77+
CREATE TEMPORARY TABLE t1 (b BLOB) ENGINE=INNODB;
78+
DROP TABLE t1;
79+
DROP TABLE t1;
80+
# DROP table query fails with unknown table error without patch.
81+
# Clean up
82+
SET @@session.binlog_format= @save_binlog_format;
83+
RESET MASTER;

mysql-test/suite/binlog/r/binlog_stm_drop_tmp_tbl.result

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,30 @@ master-bin.000001 # Query # # COMMIT
6262
master-bin.000001 # Query # # use `test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `ttmp1`
6363
RESET MASTER;
6464
DROP TABLE t1;
65+
#
66+
# BUG#28642318: POINT IN TIME RECOVERY USING MYSQLBINLOG BROKEN
67+
# WITH TEMPORARY TABLE -> ERRORS
68+
# Test case for DELETE query.
69+
RESET MASTER;
70+
# Set up.
71+
SET @save_binlog_format= @@session.binlog_format;
72+
SET @@session.binlog_format=STATEMENT;
73+
CREATE TABLE t1 (a INT) ENGINE=INNODB;
74+
SET @@session.binlog_format=STATEMENT;
75+
CREATE TEMPORARY TABLE t1 (b BLOB) ENGINE=INNODB;
76+
DELETE d1, d2 FROM t1 AS d1, t1 AS d2 WHERE d1.a<>d2.a;
77+
DROP TABLE t1;
78+
# DELETE query fails with table re-open error without patch.
79+
# Clean up.
80+
DROP TABLE IF EXISTS t1;
81+
DROP TABLE IF EXISTS t1;
82+
RESET MASTER;
83+
# Test case for DROP query.
84+
CREATE TABLE t1 (a INT) ENGINE=INNODB;
85+
CREATE TEMPORARY TABLE t1 (b BLOB) ENGINE=INNODB;
86+
DROP TABLE t1;
87+
DROP TABLE t1;
88+
# DROP table query fails with unknown table error without patch.
89+
# Clean up
90+
SET @@session.binlog_format= @save_binlog_format;
91+
RESET MASTER;

0 commit comments

Comments
 (0)