Skip to content

Commit

Permalink
Merge 10.1 into 10.2
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-m committed Jan 24, 2019
2 parents 7930ab7 + 6535004 commit 25161e6
Show file tree
Hide file tree
Showing 23 changed files with 397 additions and 61 deletions.
2 changes: 1 addition & 1 deletion client/CMakeLists.txt
Expand Up @@ -46,7 +46,7 @@ ENDIF(UNIX)

MYSQL_ADD_EXECUTABLE(mysqltest mysqltest.cc COMPONENT Test)
SET_SOURCE_FILES_PROPERTIES(mysqltest.cc PROPERTIES COMPILE_FLAGS "-DTHREADS")
TARGET_LINK_LIBRARIES(mysqltest ${CLIENT_LIB} pcre pcreposix)
TARGET_LINK_LIBRARIES(mysqltest ${CLIENT_LIB} pcreposix pcre)
SET_TARGET_PROPERTIES(mysqltest PROPERTIES ENABLE_EXPORTS TRUE)


Expand Down
2 changes: 1 addition & 1 deletion libmysqld/examples/CMakeLists.txt
Expand Up @@ -34,7 +34,7 @@ ENDIF(UNIX)

MYSQL_ADD_EXECUTABLE(mysqltest_embedded ../../client/mysqltest.cc
COMPONENT Test)
TARGET_LINK_LIBRARIES(mysqltest_embedded mysqlserver pcre pcreposix)
TARGET_LINK_LIBRARIES(mysqltest_embedded mysqlserver pcreposix pcre)

IF(CMAKE_GENERATOR MATCHES "Xcode")
# It does not seem possible to tell Xcode the resulting target might need
Expand Down
1 change: 1 addition & 0 deletions mysql-test/mysql-test-run.pl
Expand Up @@ -5270,6 +5270,7 @@ sub server_need_restart {
exists $server->{'restart_opts'})
{
my $use_dynamic_option_switch= 0;
delete $server->{'restart_opts'};
if (!$use_dynamic_option_switch)
{
mtr_verbose_restart($server, "running with different options '" .
Expand Down
12 changes: 12 additions & 0 deletions mysql-test/r/connect.result
Expand Up @@ -98,8 +98,20 @@ ERROR 28000: Access denied for user 'test'@'localhost' (using password: YES)
connect(localhost,test,zorro,test,MASTER_PORT,MASTER_SOCKET);
connect fail_con,localhost,test,zorro,;
ERROR 28000: Access denied for user 'test'@'localhost' (using password: YES)
select user,host,password,plugin,authentication_string from mysql.user where user='test';
user host password plugin authentication_string
test localhost *5FDFF3268A50F41C5D18D2CA2F754D7BDB9B3E59
test 127.0.0.1 *5FDFF3268A50F41C5D18D2CA2F754D7BDB9B3E59
update mysql.user set password=old_password("gambling2") where user=_binary"test";
flush privileges;
show grants for test@localhost;
Grants for test@localhost
GRANT ALL PRIVILEGES ON *.* TO 'test'@'localhost' IDENTIFIED BY PASSWORD '2f27438961437573'
update mysql.user set plugin='mysql_old_password' where user='test';
flush privileges;
show grants for test@localhost;
Grants for test@localhost
GRANT ALL PRIVILEGES ON *.* TO 'test'@'localhost' IDENTIFIED BY PASSWORD '2f27438961437573'
connect con10,localhost,test,gambling2,;
connect con5,localhost,test,gambling2,mysql;
connection con5;
Expand Down
16 changes: 8 additions & 8 deletions mysql-test/r/mysqlbinlog_row_compressed.result
Expand Up @@ -61,7 +61,7 @@ BEGIN
#Q> INSERT INTO t1 VALUES (10, 1, 2, 3, 4, 5, 6, 7, "")
#<date> server id 1 end_log_pos 899 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 899
#<date> server id 1 end_log_pos 967 CRC32 XXX Write_compressed_rows: table id 30 flags: STMT_END_F
#<date> server id 1 end_log_pos 967 CRC32 XXX Write_compressed_rows: table id 31 flags: STMT_END_F
### INSERT INTO `test`.`t1`
### SET
### @1=10 /* INT meta=0 nullable=0 is_null=0 */
Expand Down Expand Up @@ -89,7 +89,7 @@ BEGIN
#Q> INSERT INTO t1 VALUES (11, 1, 2, 3, 4, 5, 6, 7, NULL)
#<date> server id 1 end_log_pos 1214 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 1214
#<date> server id 1 end_log_pos 1281 CRC32 XXX Write_compressed_rows: table id 30 flags: STMT_END_F
#<date> server id 1 end_log_pos 1281 CRC32 XXX Write_compressed_rows: table id 31 flags: STMT_END_F
### INSERT INTO `test`.`t1`
### SET
### @1=11 /* INT meta=0 nullable=0 is_null=0 */
Expand Down Expand Up @@ -117,7 +117,7 @@ BEGIN
#Q> INSERT INTO t1 VALUES (12, 1, 2, 3, NULL, 5, 6, 7, "A")
#<date> server id 1 end_log_pos 1530 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 1530
#<date> server id 1 end_log_pos 1596 CRC32 XXX Write_compressed_rows: table id 30 flags: STMT_END_F
#<date> server id 1 end_log_pos 1596 CRC32 XXX Write_compressed_rows: table id 31 flags: STMT_END_F
### INSERT INTO `test`.`t1`
### SET
### @1=12 /* INT meta=0 nullable=0 is_null=0 */
Expand Down Expand Up @@ -145,7 +145,7 @@ BEGIN
#Q> INSERT INTO t1 VALUES (13, 1, 2, 3, 0, 5, 6, 7, "A")
#<date> server id 1 end_log_pos 1842 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 1842
#<date> server id 1 end_log_pos 1909 CRC32 XXX Write_compressed_rows: table id 30 flags: STMT_END_F
#<date> server id 1 end_log_pos 1909 CRC32 XXX Write_compressed_rows: table id 31 flags: STMT_END_F
### INSERT INTO `test`.`t1`
### SET
### @1=13 /* INT meta=0 nullable=0 is_null=0 */
Expand Down Expand Up @@ -173,7 +173,7 @@ BEGIN
#Q> INSERT INTO t2 SELECT * FROM t1
#<date> server id 1 end_log_pos 2134 CRC32 XXX Table_map: `test`.`t2` mapped to number num
# at 2134
#<date> server id 1 end_log_pos 2225 CRC32 XXX Write_compressed_rows: table id 31 flags: STMT_END_F
#<date> server id 1 end_log_pos 2225 CRC32 XXX Write_compressed_rows: table id 32 flags: STMT_END_F
### INSERT INTO `test`.`t2`
### SET
### @1=10 /* INT meta=0 nullable=0 is_null=0 */
Expand Down Expand Up @@ -234,7 +234,7 @@ BEGIN
#Q> UPDATE t2 SET f4=5 WHERE f4>0 or f4 is NULL
#<date> server id 1 end_log_pos 2462 CRC32 XXX Table_map: `test`.`t2` mapped to number num
# at 2462
#<date> server id 1 end_log_pos 2561 CRC32 XXX Update_compressed_rows: table id 31 flags: STMT_END_F
#<date> server id 1 end_log_pos 2561 CRC32 XXX Update_compressed_rows: table id 32 flags: STMT_END_F
### UPDATE `test`.`t2`
### WHERE
### @1=10 /* INT meta=0 nullable=0 is_null=0 */
Expand Down Expand Up @@ -314,7 +314,7 @@ BEGIN
#Q> DELETE FROM t1
#<date> server id 1 end_log_pos 2769 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 2769
#<date> server id 1 end_log_pos 2861 CRC32 XXX Delete_compressed_rows: table id 30 flags: STMT_END_F
#<date> server id 1 end_log_pos 2861 CRC32 XXX Delete_compressed_rows: table id 31 flags: STMT_END_F
### DELETE FROM `test`.`t1`
### WHERE
### @1=10 /* INT meta=0 nullable=0 is_null=0 */
Expand Down Expand Up @@ -375,7 +375,7 @@ BEGIN
#Q> DELETE FROM t2
#<date> server id 1 end_log_pos 3069 CRC32 XXX Table_map: `test`.`t2` mapped to number num
# at 3069
#<date> server id 1 end_log_pos 3154 CRC32 XXX Delete_compressed_rows: table id 31 flags: STMT_END_F
#<date> server id 1 end_log_pos 3154 CRC32 XXX Delete_compressed_rows: table id 32 flags: STMT_END_F
### DELETE FROM `test`.`t2`
### WHERE
### @1=10 /* INT meta=0 nullable=0 is_null=0 */
Expand Down
16 changes: 8 additions & 8 deletions mysql-test/r/mysqlbinlog_row_minimal.result
Expand Up @@ -59,7 +59,7 @@ BEGIN
#Q> INSERT INTO t1 VALUES (10, 1, 2, 3, 4, 5, 6, 7, "")
#<date> server id 1 end_log_pos 946 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 946
#<date> server id 1 end_log_pos 1015 CRC32 XXX Write_rows: table id 30 flags: STMT_END_F
#<date> server id 1 end_log_pos 1015 CRC32 XXX Write_rows: table id 31 flags: STMT_END_F
### INSERT INTO `test`.`t1`
### SET
### @1=10 /* INT meta=0 nullable=0 is_null=0 */
Expand Down Expand Up @@ -87,7 +87,7 @@ BEGIN
#Q> INSERT INTO t1 VALUES (11, 1, 2, 3, 4, 5, 6, 7, NULL)
#<date> server id 1 end_log_pos 1262 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 1262
#<date> server id 1 end_log_pos 1330 CRC32 XXX Write_rows: table id 30 flags: STMT_END_F
#<date> server id 1 end_log_pos 1330 CRC32 XXX Write_rows: table id 31 flags: STMT_END_F
### INSERT INTO `test`.`t1`
### SET
### @1=11 /* INT meta=0 nullable=0 is_null=0 */
Expand Down Expand Up @@ -115,7 +115,7 @@ BEGIN
#Q> INSERT INTO t1 VALUES (12, 1, 2, 3, NULL, 5, 6, 7, "A")
#<date> server id 1 end_log_pos 1579 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 1579
#<date> server id 1 end_log_pos 1646 CRC32 XXX Write_rows: table id 30 flags: STMT_END_F
#<date> server id 1 end_log_pos 1646 CRC32 XXX Write_rows: table id 31 flags: STMT_END_F
### INSERT INTO `test`.`t1`
### SET
### @1=12 /* INT meta=0 nullable=0 is_null=0 */
Expand Down Expand Up @@ -143,7 +143,7 @@ BEGIN
#Q> INSERT INTO t1 VALUES (13, 1, 2, 3, 0, 5, 6, 7, "A")
#<date> server id 1 end_log_pos 1892 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 1892
#<date> server id 1 end_log_pos 1962 CRC32 XXX Write_rows: table id 30 flags: STMT_END_F
#<date> server id 1 end_log_pos 1962 CRC32 XXX Write_rows: table id 31 flags: STMT_END_F
### INSERT INTO `test`.`t1`
### SET
### @1=13 /* INT meta=0 nullable=0 is_null=0 */
Expand Down Expand Up @@ -171,7 +171,7 @@ BEGIN
#Q> INSERT INTO t2 SELECT * FROM t1
#<date> server id 1 end_log_pos 2187 CRC32 XXX Table_map: `test`.`t2` mapped to number num
# at 2187
#<date> server id 1 end_log_pos 2354 CRC32 XXX Write_rows: table id 31 flags: STMT_END_F
#<date> server id 1 end_log_pos 2354 CRC32 XXX Write_rows: table id 32 flags: STMT_END_F
### INSERT INTO `test`.`t2`
### SET
### @1=10 /* INT meta=0 nullable=0 is_null=0 */
Expand Down Expand Up @@ -232,7 +232,7 @@ BEGIN
#Q> UPDATE t2 SET f4=5 WHERE f4>0 or f4 is NULL
#<date> server id 1 end_log_pos 2591 CRC32 XXX Table_map: `test`.`t2` mapped to number num
# at 2591
#<date> server id 1 end_log_pos 2665 CRC32 XXX Update_rows: table id 31 flags: STMT_END_F
#<date> server id 1 end_log_pos 2665 CRC32 XXX Update_rows: table id 32 flags: STMT_END_F
### UPDATE `test`.`t2`
### WHERE
### @1=10 /* INT meta=0 nullable=0 is_null=0 */
Expand Down Expand Up @@ -267,7 +267,7 @@ BEGIN
#Q> DELETE FROM t1
#<date> server id 1 end_log_pos 2873 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 2873
#<date> server id 1 end_log_pos 2927 CRC32 XXX Delete_rows: table id 30 flags: STMT_END_F
#<date> server id 1 end_log_pos 2927 CRC32 XXX Delete_rows: table id 31 flags: STMT_END_F
### DELETE FROM `test`.`t1`
### WHERE
### @1=10 /* INT meta=0 nullable=0 is_null=0 */
Expand Down Expand Up @@ -296,7 +296,7 @@ BEGIN
#Q> DELETE FROM t2
#<date> server id 1 end_log_pos 3135 CRC32 XXX Table_map: `test`.`t2` mapped to number num
# at 3135
#<date> server id 1 end_log_pos 3189 CRC32 XXX Delete_rows: table id 31 flags: STMT_END_F
#<date> server id 1 end_log_pos 3189 CRC32 XXX Delete_rows: table id 32 flags: STMT_END_F
### DELETE FROM `test`.`t2`
### WHERE
### @1=10 /* INT meta=0 nullable=0 is_null=0 */
Expand Down
1 change: 0 additions & 1 deletion mysql-test/suite/galera/disabled.def
Expand Up @@ -26,7 +26,6 @@ MW-416 : MDEV-13549 Galera test failures
MW-388 : MDEV-13549 Galera test failures
galera.MW-44 : MDEV-15809 Test failure on galera.MW-44
galera.galera_pc_ignore_sb : MDEV-15811 Test failure on galera_pc_ignore_sb
galera_drop_database : MDEV-17421 mtr does not restart the server whose parameters were changed
galera_kill_applier : race condition at the start of the test
galera_ist_progress: MDEV-15236 galera_ist_progress fails when trying to read transfer status
pxc-421: Lock timeout exceeded
Expand Down
6 changes: 6 additions & 0 deletions mysql-test/suite/galera/r/galera_drop_database.result
@@ -1,3 +1,5 @@
connection node_1;
connection node_2;
CREATE DATABASE fts;
USE fts;
CREATE TABLE fts_t1 (f1 INT PRIMARY KEY AUTO_INCREMENT, f2 VARCHAR(100), FULLTEXT (f2)) ENGINE=InnoDB;
Expand All @@ -9,6 +11,10 @@ INSERT INTO fts_t2 (f2) SELECT 'foobarbaz' FROM ten AS a1, ten AS a2, ten AS a3;
DROP TABLE ten;
UPDATE fts_t1 SET f2 = 'abcd';
UPDATE fts_t2 SET f2 = 'efjh';
connection node_2;
connection node_1;
connection node_2;
connection node_1;
USE fts;
DROP TABLE fts_t1;
DROP TABLE fts_t2;
Expand Down
26 changes: 4 additions & 22 deletions mysql-test/suite/galera/t/galera_drop_database.test
Expand Up @@ -9,6 +9,7 @@
--let $node_2=node_2
--source include/auto_increment_offset_save.inc

# Create test database with two sets of the FTS indexes:
CREATE DATABASE fts;
USE fts;
CREATE TABLE fts_t1 (f1 INT PRIMARY KEY AUTO_INCREMENT, f2 VARCHAR(100), FULLTEXT (f2)) ENGINE=InnoDB;
Expand All @@ -23,43 +24,24 @@ DROP TABLE ten;
UPDATE fts_t1 SET f2 = 'abcd';
UPDATE fts_t2 SET f2 = 'efjh';

# Restart the second node:
--connection node_2
let $wsrep_cluster_address = `SELECT @@global.wsrep_node_incoming_address`;
--source include/restart_mysqld.inc

--connection node_1
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--source include/wait_condition.inc

--let $galera_connection_name = node_2a
--let $galera_server_number = 2
--source include/galera_connect.inc
--connection node_2a
--connection node_2
--source include/wait_until_ready.inc

# Drop the tables and database after nodes restarted:
--connection node_1
--let $restart_parameters = --wsrep-cluster-address=gcomm://$wsrep_cluster_address
--source include/restart_mysqld.inc

--connection node_2a
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--source include/wait_condition.inc

--let $galera_connection_name = node_1a
--let $galera_server_number = 1
--source include/galera_connect.inc
--connection node_1a
--source include/wait_until_ready.inc

USE fts;
DROP TABLE fts_t1;
DROP TABLE fts_t2;
SHOW TABLES;
DROP DATABASE fts;

# Restore original auto_increment_offset values.
--let $node_1=node_1a
--let $node_2=node_2a
--source include/auto_increment_offset_restore.inc

--source include/galera_end.inc
114 changes: 114 additions & 0 deletions mysql-test/suite/innodb/r/alter_candidate_key.result
@@ -0,0 +1,114 @@
CREATE TABLE t1 (f1 INT NOT NULL, f2 INT NOT NULL,
UNIQUE KEY uidx2(f1,f2),
UNIQUE KEY uidx1(f2)) ENGINE=InnoDB;
INSERT INTO t1 VALUES(1, 1);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`f1` int(11) NOT NULL,
`f2` int(11) NOT NULL,
UNIQUE KEY `uidx2` (`f1`,`f2`),
UNIQUE KEY `uidx1` (`f2`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
SET DEBUG_SYNC = 'innodb_inplace_alter_table_enter
SIGNAL conc_dml WAIT_FOR go_ahead';
ALTER TABLE t1 CHANGE COLUMN f1 f11 INT, ALGORITHM=INPLACE;
connect con1,localhost,root,,;
SET DEBUG_SYNC = 'now WAIT_FOR conc_dml';
DELETE FROM t1;
SET DEBUG_SYNC = 'now SIGNAL go_ahead';
connection default;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`f11` int(11) DEFAULT NULL,
`f2` int(11) NOT NULL,
UNIQUE KEY `uidx1` (`f2`),
UNIQUE KEY `uidx2` (`f11`,`f2`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
CHECK TABLE t1;
Table Op Msg_type Msg_text
test.t1 check status OK
DROP TABLE t1;
CREATE TABLE t1(f1 INT, f2 INT,
PRIMARY KEY(f1, f2),
UNIQUE INDEX uidx2 (f1, f2),
UNIQUE INDEX uidx1 (f2))ENGINE=InnoDB;
ALTER TABLE t1 DROP PRIMARY KEY;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`f1` int(11) NOT NULL,
`f2` int(11) NOT NULL,
UNIQUE KEY `uidx2` (`f1`,`f2`),
UNIQUE KEY `uidx1` (`f2`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
SET DEBUG_SYNC = 'innodb_inplace_alter_table_enter
SIGNAL conc_dml WAIT_FOR go_ahead';
ALTER TABLE t1 CHANGE COLUMN f1 f11 INT, ALGORITHM=INPLACE;
connection con1;
SET DEBUG_SYNC = 'now WAIT_FOR conc_dml';
INSERT INTO t1 VALUES(1, 1), (1, 1);
ERROR 23000: Duplicate entry '1-1' for key 'uidx2'
SET DEBUG_SYNC = 'now SIGNAL go_ahead';
connection default;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`f11` int(11) DEFAULT NULL,
`f2` int(11) NOT NULL,
UNIQUE KEY `uidx1` (`f2`),
UNIQUE KEY `uidx2` (`f11`,`f2`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
CHECK TABLE t1;
Table Op Msg_type Msg_text
test.t1 check status OK
DROP TABLE t1;
SET SQL_MODE= strict_trans_tables;
CREATE TABLE t1(a INT UNIQUE) ENGINE=InnoDB;
SET DEBUG_SYNC='row_log_table_apply1_before SIGNAL dml WAIT_FOR dml_done';
ALTER TABLE t1 MODIFY COLUMN a INT NOT NULL;
connection con1;
SET DEBUG_SYNC='now WAIT_FOR dml';
BEGIN;
INSERT INTO t1 SET a=NULL;
ROLLBACK;
set DEBUG_SYNC='now SIGNAL dml_done';
connection default;
ERROR 22004: Invalid use of NULL value
DROP TABLE t1;
disconnect con1;
SET DEBUG_SYNC="RESET";
SET SQL_MODE=DEFAULT;
CREATE TABLE t1(f1 INT NOT NULL, f2 INT NOT NULL, PRIMARY KEY(f1, f2),
UNIQUE KEY(f2))ENGINE=InnoDB;
ALTER TABLE t1 DROP PRIMARY KEY;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`f1` int(11) NOT NULL,
`f2` int(11) NOT NULL,
UNIQUE KEY `f2` (`f2`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
DROP TABLE t1;
CREATE TABLE t1(f1 INT NOT NULL, f2 INT NOT NULL,
UNIQUE KEY(f2), UNIQUE KEY(f2))ENGINE=InnoDB;
Warnings:
Note 1831 Duplicate index `f2_2`. This is deprecated and will be disallowed in a future release
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`f1` int(11) NOT NULL,
`f2` int(11) NOT NULL,
UNIQUE KEY `f2` (`f2`),
UNIQUE KEY `f2_2` (`f2`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
ALTER TABLE t1 DROP INDEX f2, ALGORITHM=INPLACE;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`f1` int(11) NOT NULL,
`f2` int(11) NOT NULL,
UNIQUE KEY `f2_2` (`f2`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
DROP TABLE t1;
1 change: 1 addition & 0 deletions mysql-test/suite/innodb/r/innodb-index.result
Expand Up @@ -1567,6 +1567,7 @@ create table t1(f1 int not null, f2 int not null,
primary key (f1), unique key(f1, f2))engine=innodb;
insert into t1 values(1,3), (2,2);
alter table t1 drop primary key, lock=none;
alter table t1 drop index f1, lock=none;
ERROR 0A000: LOCK=NONE is not supported. Reason: Dropping a primary key is not allowed without also adding a new primary key. Try LOCK=SHARED
drop table t1;
#
Expand Down

0 comments on commit 25161e6

Please sign in to comment.