Skip to content

Commit f2cb45d

Browse files
committed
Merge remote-tracking branch 'origin/10.0' into 10.0
2 parents 3653de8 + 8366ce4 commit f2cb45d

File tree

537 files changed

+49659
-8936
lines changed

Some content is hidden

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

537 files changed

+49659
-8936
lines changed

cmake/ssl.cmake

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -156,37 +156,37 @@ MACRO (MYSQL_CHECK_SSL)
156156
LIST(REVERSE CMAKE_FIND_LIBRARY_SUFFIXES)
157157
ENDIF()
158158

159-
# Verify version number. Version information looks like:
160-
# #define OPENSSL_VERSION_NUMBER 0x1000103fL
161-
# Encoded as MNNFFPPS: major minor fix patch status
162-
FILE(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h"
163-
OPENSSL_VERSION_NUMBER
164-
REGEX "^#define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x[0-9].*"
165-
)
166-
STRING(REGEX REPLACE
167-
"^.*OPENSSL_VERSION_NUMBER[\t ]+0x([0-9]).*$" "\\1"
168-
OPENSSL_MAJOR_VERSION "${OPENSSL_VERSION_NUMBER}"
169-
)
170-
171159
IF(OPENSSL_INCLUDE_DIR AND
172160
OPENSSL_LIBRARIES AND
173161
CRYPTO_LIBRARY
174162
)
163+
# Verify version number. Version information looks like:
164+
# #define OPENSSL_VERSION_NUMBER 0x1000103fL
165+
# Encoded as MNNFFPPS: major minor fix patch status
166+
FILE(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h"
167+
OPENSSL_VERSION_NUMBER
168+
REGEX "^#define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x[0-9].*"
169+
)
170+
STRING(REGEX REPLACE
171+
"^.*OPENSSL_VERSION_NUMBER[\t ]+0x([0-9]).*$" "\\1"
172+
OPENSSL_MAJOR_VERSION "${OPENSSL_VERSION_NUMBER}"
173+
)
174+
INCLUDE(CheckSymbolExists)
175+
SET(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
176+
CHECK_SYMBOL_EXISTS(SHA512_DIGEST_LENGTH "openssl/sha.h"
177+
HAVE_SHA512_DIGEST_LENGTH)
175178
SET(OPENSSL_FOUND TRUE)
176179
ELSE()
177180
SET(OPENSSL_FOUND FALSE)
178181
ENDIF()
179182

180-
MESSAGE(STATUS "OPENSSL_INCLUDE_DIR = ${OPENSSL_INCLUDE_DIR}")
181-
MESSAGE(STATUS "OPENSSL_LIBRARIES = ${OPENSSL_LIBRARIES}")
182-
MESSAGE(STATUS "CRYPTO_LIBRARY = ${CRYPTO_LIBRARY}")
183-
MESSAGE(STATUS "OPENSSL_MAJOR_VERSION = ${OPENSSL_MAJOR_VERSION}")
184-
185-
INCLUDE(CheckSymbolExists)
186-
SET(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
187-
CHECK_SYMBOL_EXISTS(SHA512_DIGEST_LENGTH "openssl/sha.h"
188-
HAVE_SHA512_DIGEST_LENGTH)
189183
IF(OPENSSL_FOUND AND HAVE_SHA512_DIGEST_LENGTH)
184+
MESSAGE(STATUS "OPENSSL_INCLUDE_DIR = ${OPENSSL_INCLUDE_DIR}")
185+
MESSAGE(STATUS "OPENSSL_LIBRARIES = ${OPENSSL_LIBRARIES}")
186+
MESSAGE(STATUS "CRYPTO_LIBRARY = ${CRYPTO_LIBRARY}")
187+
MESSAGE(STATUS "OPENSSL_MAJOR_VERSION = ${OPENSSL_MAJOR_VERSION}")
188+
189+
190190
SET(SSL_SOURCES "")
191191
SET(SSL_LIBRARIES ${OPENSSL_LIBRARIES} ${CRYPTO_LIBRARY})
192192
IF(CMAKE_SYSTEM_NAME MATCHES "SunOS")

include/mysql_com.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -618,14 +618,17 @@ void scramble_323(char *to, const char *message, const char *password);
618618
my_bool check_scramble_323(const unsigned char *reply, const char *message,
619619
unsigned long *salt);
620620
void get_salt_from_password_323(unsigned long *res, const char *password);
621+
#if MYSQL_VERSION_ID < 100100
621622
void make_password_from_salt_323(char *to, const unsigned long *salt);
622-
623+
#endif
623624
void make_scrambled_password(char *to, const char *password);
624625
void scramble(char *to, const char *message, const char *password);
625626
my_bool check_scramble(const unsigned char *reply, const char *message,
626627
const unsigned char *hash_stage2);
627628
void get_salt_from_password(unsigned char *res, const char *password);
629+
#if MYSQL_VERSION_ID < 100100
628630
void make_password_from_salt(char *to, const unsigned char *hash_stage2);
631+
#endif
629632
char *octet2hex(char *to, const char *str, unsigned int len);
630633

631634
/* end of password.c */

mysql-test/r/partition_innodb_plugin.result

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,12 +141,12 @@ ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
141141
# First table reported in 'SHOW ENGINE InnoDB STATUS'
142142
SHOW ENGINE InnoDB STATUS;
143143
Type Name Status
144-
InnoDB index `PRIMARY` of table `test`.`t``\""e` /* Partition `p0``\""e`, Subpartition `sp0``\""e` */
144+
InnoDB index `PRIMARY` of table `test`.`t``\""e` /* Partition `p0``\""e`, Subpartition `sp0``\""e` */
145145
set @old_sql_mode = @@sql_mode;
146146
set sql_mode = 'ANSI_QUOTES';
147147
SHOW ENGINE InnoDB STATUS;
148148
Type Name Status
149-
InnoDB index `PRIMARY` of table `test`.`t``\""e` /* Partition `p0``\""e`, Subpartition `sp0``\""e` */
149+
InnoDB index `PRIMARY` of table `test`.`t``\""e` /* Partition `p0``\""e`, Subpartition `sp0``\""e` */
150150
set @@sql_mode = @old_sql_mode;
151151
# con1
152152
ROLLBACK;

mysql-test/r/selectivity.result

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1409,4 +1409,40 @@ Note 1003 select `test`.`a`.`a` AS `a`,`test`.`a`.`b` AS `b`,`test`.`b`.`a` AS `
14091409
set histogram_size=@save_histogram_size;
14101410
set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
14111411
drop table t0,t1,t2;
1412+
#
1413+
# Bug mdev-7316: a conjunct in WHERE with selectivity == 0
1414+
#
1415+
CREATE TABLE t1 (a varchar(16), b int, PRIMARY KEY(a), KEY(b)) ENGINE=INNODB;
1416+
Warnings:
1417+
Warning 1286 Unknown storage engine 'INNODB'
1418+
Warning 1266 Using storage engine MyISAM for table 't1'
1419+
INSERT INTO t1 VALUES
1420+
('USAChinese',10), ('USAEnglish',20), ('USAFrench',30);
1421+
CREATE TABLE t2 (i int) ENGINE=INNODB;
1422+
Warnings:
1423+
Warning 1286 Unknown storage engine 'INNODB'
1424+
Warning 1266 Using storage engine MyISAM for table 't2'
1425+
INSERT INTO t2 VALUES
1426+
(1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(1),(2),(3),(4);
1427+
ANALYZE TABLE t1, t2;
1428+
Table Op Msg_type Msg_text
1429+
test.t1 analyze status Engine-independent statistics collected
1430+
test.t1 analyze status OK
1431+
test.t2 analyze status Engine-independent statistics collected
1432+
test.t2 analyze status OK
1433+
set use_stat_tables='preferably';
1434+
set optimizer_use_condition_selectivity=3;
1435+
EXPLAIN EXTENDED
1436+
SELECT * FROM t1, t2
1437+
WHERE a <> 'USARussian' AND b IS NULL;
1438+
id select_type table type possible_keys key key_len ref rows filtered Extra
1439+
1 SIMPLE t1 ref PRIMARY,b b 5 const 1 100.00 Using index condition; Using where
1440+
1 SIMPLE t2 ALL NULL NULL NULL NULL 14 100.00 Using join buffer (flat, BNL join)
1441+
Warnings:
1442+
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`i` AS `i` from `test`.`t1` join `test`.`t2` where ((`test`.`t1`.`a` <> 'USARussian') and isnull(`test`.`t1`.`b`))
1443+
SELECT * FROM t1, t2
1444+
WHERE a <> 'USARussian' AND b IS NULL;
1445+
a b i
1446+
set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
1447+
DROP TABLE t1,t2;
14121448
set use_stat_tables=@save_use_stat_tables;

mysql-test/r/selectivity_innodb.result

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1419,6 +1419,36 @@ Note 1003 select `test`.`a`.`a` AS `a`,`test`.`a`.`b` AS `b`,`test`.`b`.`a` AS `
14191419
set histogram_size=@save_histogram_size;
14201420
set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
14211421
drop table t0,t1,t2;
1422+
#
1423+
# Bug mdev-7316: a conjunct in WHERE with selectivity == 0
1424+
#
1425+
CREATE TABLE t1 (a varchar(16), b int, PRIMARY KEY(a), KEY(b)) ENGINE=INNODB;
1426+
INSERT INTO t1 VALUES
1427+
('USAChinese',10), ('USAEnglish',20), ('USAFrench',30);
1428+
CREATE TABLE t2 (i int) ENGINE=INNODB;
1429+
INSERT INTO t2 VALUES
1430+
(1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(1),(2),(3),(4);
1431+
ANALYZE TABLE t1, t2;
1432+
Table Op Msg_type Msg_text
1433+
test.t1 analyze status Engine-independent statistics collected
1434+
test.t1 analyze status OK
1435+
test.t2 analyze status Engine-independent statistics collected
1436+
test.t2 analyze status OK
1437+
set use_stat_tables='preferably';
1438+
set optimizer_use_condition_selectivity=3;
1439+
EXPLAIN EXTENDED
1440+
SELECT * FROM t1, t2
1441+
WHERE a <> 'USARussian' AND b IS NULL;
1442+
id select_type table type possible_keys key key_len ref rows filtered Extra
1443+
1 SIMPLE t1 ref PRIMARY,b b 5 const 2 66.67 Using where; Using index
1444+
1 SIMPLE t2 ALL NULL NULL NULL NULL 14 100.00 Using join buffer (flat, BNL join)
1445+
Warnings:
1446+
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`i` AS `i` from `test`.`t1` join `test`.`t2` where ((`test`.`t1`.`a` <> 'USARussian') and isnull(`test`.`t1`.`b`))
1447+
SELECT * FROM t1, t2
1448+
WHERE a <> 'USARussian' AND b IS NULL;
1449+
a b i
1450+
set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
1451+
DROP TABLE t1,t2;
14221452
set use_stat_tables=@save_use_stat_tables;
14231453
set optimizer_switch=@save_optimizer_switch_for_selectivity_test;
14241454
set @tmp_ust= @@use_stat_tables;

mysql-test/r/sp_notembedded.result

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,4 +284,23 @@ DROP EVENT teste_bug11763507;
284284
# ------------------------------------------------------------------
285285
# -- End of 5.1 tests
286286
# ------------------------------------------------------------------
287+
grant create routine on test.* to foo1@localhost identified by 'foo';
288+
update mysql.user set password = replace(password, '*', '-') where user='foo1';
289+
show grants;
290+
Grants for foo1@localhost
291+
GRANT USAGE ON *.* TO 'foo1'@'localhost' IDENTIFIED BY PASSWORD '*F3A2A51A9B0F2BE2468926B4132313728C250DBF'
292+
GRANT CREATE ROUTINE ON `test`.* TO 'foo1'@'localhost'
293+
flush privileges;
294+
show grants;
295+
Grants for foo1@localhost
296+
GRANT USAGE ON *.* TO 'foo1'@'localhost' IDENTIFIED BY PASSWORD '-F3A2A51A9B0F2BE2468926B4132313728C250DBF'
297+
GRANT CREATE ROUTINE ON `test`.* TO 'foo1'@'localhost'
298+
create procedure spfoo() select 1;
299+
show grants;
300+
Grants for foo1@localhost
301+
GRANT USAGE ON *.* TO 'foo1'@'localhost' IDENTIFIED BY PASSWORD '-F3A2A51A9B0F2BE2468926B4132313728C250DBF'
302+
GRANT CREATE ROUTINE ON `test`.* TO 'foo1'@'localhost'
303+
GRANT EXECUTE, ALTER ROUTINE ON PROCEDURE `test`.`spfoo` TO 'foo1'@'localhost'
304+
drop procedure spfoo;
305+
drop user foo1@localhost;
287306
set @@global.concurrent_insert= @old_concurrent_insert;
Lines changed: 34 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
create table t1(a int not null primary key, b int) engine=innodb;
1+
call mtr.add_suppression("InnoDB: Error: row_merge_drop_indexes_dict failed with error code*");
2+
create table t1(a int, b int) engine=innodb;
23
create procedure innodb_insert_proc (repeat_count int)
34
begin
45
declare current_num int;
@@ -10,41 +11,53 @@ end while;
1011
end//
1112
commit;
1213
set autocommit=0;
13-
call innodb_insert_proc(10000);
14+
call innodb_insert_proc(20000);
1415
commit;
1516
set autocommit=1;
17+
create table t2(a int) engine=innodb;
18+
show create table t2;
19+
Table Create Table
20+
t2 CREATE TABLE `t2` (
21+
`a` int(11) DEFAULT NULL
22+
) ENGINE=InnoDB DEFAULT CHARSET=latin1
1623
set DEBUG_DBUG='+d,ib_os_aio_func_io_failure_28';
1724
alter table t1 add testcol int;
1825
ERROR HY000: The table 't1' is full
1926
show create table t1;
2027
Table Create Table
2128
t1 CREATE TABLE `t1` (
22-
`a` int(11) NOT NULL,
23-
`b` int(11) DEFAULT NULL,
24-
PRIMARY KEY (`a`)
29+
`a` int(11) DEFAULT NULL,
30+
`b` int(11) DEFAULT NULL
2531
) ENGINE=InnoDB DEFAULT CHARSET=latin1
26-
set DEBUG_DBUG='+d,ib_os_aio_func_io_failure_28_2';
32+
alter table t2 add testcol int;
33+
ERROR HY000: The table 't2' is full
34+
alter table t1 add testcol int;
35+
ERROR HY000: The table 't1' is full
2736
alter table t1 add testcol int;
2837
ERROR HY000: The table 't1' is full
29-
show create table t1;
30-
Table Create Table
31-
t1 CREATE TABLE `t1` (
32-
`a` int(11) NOT NULL,
33-
`b` int(11) DEFAULT NULL,
34-
PRIMARY KEY (`a`)
35-
) ENGINE=InnoDB DEFAULT CHARSET=latin1
36-
set DEBUG_DBUG=NULL;
3738
alter table t1 add testcol2 int;
39+
ERROR HY000: The table 't1' is full
40+
alter table t1 add testcol3 int;
41+
ERROR HY000: The table 't1' is full
42+
alter table t1 add testcol int;
43+
ERROR HY000: The table 't1' is full
3844
show create table t1;
3945
Table Create Table
4046
t1 CREATE TABLE `t1` (
41-
`a` int(11) NOT NULL,
42-
`b` int(11) DEFAULT NULL,
43-
`testcol2` int(11) DEFAULT NULL,
44-
PRIMARY KEY (`a`)
47+
`a` int(11) DEFAULT NULL,
48+
`b` int(11) DEFAULT NULL
4549
) ENGINE=InnoDB DEFAULT CHARSET=latin1
46-
select count(1) from t1;
47-
count(1)
48-
10000
50+
drop table t2;
51+
alter table t1 add testcol2 int;
52+
ERROR HY000: The table 't1' is full
53+
alter table t1 add testcol3 int;
54+
ERROR HY000: The table 't1' is full
55+
call innodb_insert_proc(20000);
56+
set autocommit=0;
57+
call innodb_insert_proc(20000);
58+
commit;
59+
set autocommit=1;
60+
set DEBUG_DBUG='';
4961
drop procedure innodb_insert_proc;
5062
drop table t1;
63+
drop table if exists t2;
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
select @@global.innodb_ft_server_stopword_table;
2+
@@global.innodb_ft_server_stopword_table
3+
NULL
4+
CREATE TABLE `stop_it-IT` ENGINE = InnoDB SELECT * FROM information_schema.INNODB_FT_DEFAULT_STOPWORD;
5+
SET @@global.innodb_ft_server_stopword_table = 'test/stop_it-IT';
6+
ERROR 42000: Variable 'innodb_ft_server_stopword_table' can't be set to the value of 'test/stop_it-IT'
7+
SET @@global.innodb_ft_server_stopword_table = 'test/stop_it@002dIT';
8+
drop table `stop_it-IT`;
9+
CREATE TABLE stop_it ENGINE = InnoDB SELECT * FROM information_schema.INNODB_FT_DEFAULT_STOPWORD;
10+
SET @@global.innodb_ft_server_stopword_table = 'test/stop_it';
11+
SET @@global.innodb_ft_server_stopword_table = NULL;
12+
drop table stop_it;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
ERROR 42000: Row size too large (> ####). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
1+
ERROR 42000: The size of BLOB/TEXT data inserted in one transaction is greater than 10% of redo log size. Increase the redo log size using innodb_log_file_size.
22
f4 f8
33
f4 f8

mysql-test/suite/innodb/t/innodb-alter-table-disk-full.test

Lines changed: 34 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
# DEBUG_SYNC must be compiled in.
88
--source include/have_debug_sync.inc
99

10-
create table t1(a int not null primary key, b int) engine=innodb;
10+
call mtr.add_suppression("InnoDB: Error: row_merge_drop_indexes_dict failed with error code*");
11+
12+
create table t1(a int, b int) engine=innodb;
1113

1214
delimiter //;
1315
create procedure innodb_insert_proc (repeat_count int)
@@ -23,28 +25,51 @@ delimiter ;//
2325
commit;
2426

2527
set autocommit=0;
26-
call innodb_insert_proc(10000);
28+
call innodb_insert_proc(20000);
2729
commit;
2830
set autocommit=1;
2931

32+
create table t2(a int) engine=innodb;
33+
show create table t2;
34+
3035
# This caused crash earlier
3136
set DEBUG_DBUG='+d,ib_os_aio_func_io_failure_28';
3237
--error 1114
3338
alter table t1 add testcol int;
3439
show create table t1;
35-
36-
# This caused crash earlier
37-
set DEBUG_DBUG='+d,ib_os_aio_func_io_failure_28_2';
40+
--error 1114
41+
alter table t2 add testcol int;
3842
--error 1114
3943
alter table t1 add testcol int;
40-
show create table t1;
41-
42-
set DEBUG_DBUG=NULL;
44+
--error 1114
45+
alter table t1 add testcol int;
46+
--error 1114
4347
alter table t1 add testcol2 int;
48+
--error 1114
49+
alter table t1 add testcol3 int;
50+
--error 1114
51+
alter table t1 add testcol int;
4452
show create table t1;
53+
--error 0,1051
54+
drop table t2;
55+
--error 1114
56+
alter table t1 add testcol2 int;
57+
--error 1114
58+
alter table t1 add testcol3 int;
59+
--error 0,1114
60+
call innodb_insert_proc(20000);
61+
set autocommit=0;
62+
--error 0,1114
63+
call innodb_insert_proc(20000);
64+
commit;
65+
set autocommit=1;
4566

46-
select count(1) from t1;
67+
set DEBUG_DBUG='';
4768

4869
drop procedure innodb_insert_proc;
4970
drop table t1;
71+
--disable_warnings
72+
drop table if exists t2;
73+
--enable_warnings
74+
5075

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
--innodb_ft_default_stopword
2+
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
--source include/have_innodb.inc
2+
3+
select @@global.innodb_ft_server_stopword_table;
4+
CREATE TABLE `stop_it-IT` ENGINE = InnoDB SELECT * FROM information_schema.INNODB_FT_DEFAULT_STOPWORD;
5+
--error 1231
6+
SET @@global.innodb_ft_server_stopword_table = 'test/stop_it-IT';
7+
--error 0,1231
8+
SET @@global.innodb_ft_server_stopword_table = 'test/stop_it@002dIT';
9+
drop table `stop_it-IT`;
10+
11+
CREATE TABLE stop_it ENGINE = InnoDB SELECT * FROM information_schema.INNODB_FT_DEFAULT_STOPWORD;
12+
SET @@global.innodb_ft_server_stopword_table = 'test/stop_it';
13+
14+
SET @@global.innodb_ft_server_stopword_table = NULL;
15+
16+
drop table stop_it;

mysql-test/suite/innodb/t/innodb-mdev7046.test

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
--source include/have_innodb.inc
22
--source include/have_partition.inc
3+
# Test causes OS error printout
4+
--source include/not_windows.inc
35

46
--disable_query_log
57
--disable_result_log

0 commit comments

Comments
 (0)