mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 03:52:35 +01:00
Merge remote-tracking branch 'origin/10.2' into bb-10.2-ext
This commit is contained in:
commit
da99e086f9
38 changed files with 1520 additions and 205 deletions
7
debian/autobake-deb.sh
vendored
7
debian/autobake-deb.sh
vendored
|
@ -74,12 +74,15 @@ fi
|
|||
|
||||
# Convert gcc version to numberical value. Format is Mmmpp where M is Major
|
||||
# version, mm is minor version and p is patch.
|
||||
GCCVERSION=$(gcc -dumpversion | sed -e 's/\.\([0-9][0-9]\)/\1/g' -e 's/\.\([0-9]\)/0\1/g' -e 's/^[0-9]\{3,4\}$/&00/')
|
||||
# -dumpfullversion & -dumpversion to make it uniform across old and new (>=7)
|
||||
GCCVERSION=$(gcc -dumpfullversion -dumpversion | sed -e 's/\.\([0-9][0-9]\)/\1/g' \
|
||||
-e 's/\.\([0-9]\)/0\1/g' \
|
||||
-e 's/^[0-9]\{3,4\}$/&00/')
|
||||
# Don't build rocksdb package if gcc version is less than 4.8 or we are running on
|
||||
# x86 32 bit.
|
||||
if [[ $GCCVERSION -lt 40800 ]] || [[ $(arch) =~ i[346]86 ]]
|
||||
then
|
||||
sed '/Package: mariadb-plugin-rocksdb/,+9d' -i debian/control
|
||||
sed '/Package: mariadb-plugin-rocksdb/,+10d' -i debian/control
|
||||
fi
|
||||
if [[ $GCCVERSION -lt 40800 ]]
|
||||
then
|
||||
|
|
1
debian/control
vendored
1
debian/control
vendored
|
@ -455,6 +455,7 @@ Architecture: any
|
|||
Depends: mariadb-server-10.2 (= ${binary:Version}),
|
||||
${misc:Depends},
|
||||
${shlibs:Depends}
|
||||
Recommends: python-mysqldb
|
||||
Description: RocksDB storage engine for MariaDB
|
||||
The RocksDB storage engine is a high performance storage engine, aimed
|
||||
at maximising storage efficiency while maintaining InnoDB-like performance.
|
||||
|
|
1
debian/mariadb-plugin-rocksdb.install
vendored
1
debian/mariadb-plugin-rocksdb.install
vendored
|
@ -1,4 +1,5 @@
|
|||
etc/mysql/conf.d/rocksdb.cnf etc/mysql/mariadb.conf.d
|
||||
usr/lib/mysql/plugin/ha_rocksdb.so
|
||||
usr/bin/mysql_ldb
|
||||
usr/bin/myrocks_hotbackup
|
||||
usr/bin/sst_dump
|
||||
|
|
|
@ -2276,5 +2276,38 @@ t1 CREATE TABLE `t1` (
|
|||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
drop table t1;
|
||||
#
|
||||
# MDEV-13508 Check that rename of columns changes defaults, virtual
|
||||
# columns and constraints
|
||||
#
|
||||
create table t1 (a int, b int, check(a>b));
|
||||
alter table t1 change column a b int, change column b a int;
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`b` int(11) DEFAULT NULL,
|
||||
`a` int(11) DEFAULT NULL,
|
||||
CONSTRAINT `CONSTRAINT_1` CHECK (`b` > `a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
drop table t1;
|
||||
create table t1 (a int primary key, b int, c int default (a+b) check (a+b>0),
|
||||
d int as (a+b),
|
||||
key (b),
|
||||
constraint test check (a+b > 1));
|
||||
alter table t1 change b new_b int not null, add column b char(1), add constraint new check (length(b) > 0);
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) NOT NULL,
|
||||
`new_b` int(11) NOT NULL,
|
||||
`c` int(11) DEFAULT (`a` + `new_b`) CHECK (`a` + `new_b` > 0),
|
||||
`d` int(11) GENERATED ALWAYS AS (`a` + `new_b`) VIRTUAL,
|
||||
`b` char(1) DEFAULT NULL,
|
||||
PRIMARY KEY (`a`),
|
||||
KEY `b` (`new_b`),
|
||||
CONSTRAINT `test` CHECK (`a` + `new_b` > 1),
|
||||
CONSTRAINT `new` CHECK (octet_length(`b`) > 0)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
drop table t1;
|
||||
#
|
||||
# End of 10.2 tests
|
||||
#
|
||||
|
|
|
@ -2308,3 +2308,47 @@ col_int_nokey
|
|||
1
|
||||
DROP TABLE t1,t2,t3;
|
||||
SET TIMESTAMP=0;
|
||||
#
|
||||
# MDEV-15262 Wrong results for SELECT..WHERE non_indexed_datetime_column=indexed_time_column
|
||||
#
|
||||
SET TIMESTAMP=UNIX_TIMESTAMP('2012-01-31 10:14:35');
|
||||
CREATE TABLE t1 (col_time_key TIME, KEY(col_time_key));
|
||||
CREATE TABLE t2 (col_datetime_key DATETIME);
|
||||
INSERT INTO t1 VALUES ('-760:00:00'),('760:00:00');
|
||||
INSERT INTO t1 VALUES ('-770:00:00'),('770:00:00');
|
||||
INSERT INTO t2 SELECT * FROM t1;
|
||||
SELECT * FROM t2 STRAIGHT_JOIN t1 IGNORE INDEX(col_time_key) WHERE col_time_key = col_datetime_key;
|
||||
col_datetime_key col_time_key
|
||||
2011-12-30 08:00:00 -760:00:00
|
||||
2012-03-02 16:00:00 760:00:00
|
||||
2011-12-29 22:00:00 -770:00:00
|
||||
2012-03-03 02:00:00 770:00:00
|
||||
SELECT * FROM t2 STRAIGHT_JOIN t1 FORCE INDEX (col_time_key) WHERE col_time_key = col_datetime_key;
|
||||
col_datetime_key col_time_key
|
||||
2011-12-29 22:00:00 -770:00:00
|
||||
2011-12-30 08:00:00 -760:00:00
|
||||
2012-03-02 16:00:00 760:00:00
|
||||
2012-03-03 02:00:00 770:00:00
|
||||
INSERT INTO t1 VALUES ('-838:59:59'),('838:59:59');
|
||||
INSERT INTO t2 VALUES (DATE_ADD(CURRENT_DATE, INTERVAL '-838:59:59' HOUR_SECOND));
|
||||
INSERT INTO t2 VALUES (DATE_ADD(CURRENT_DATE, INTERVAL '838:59:59' HOUR_SECOND));
|
||||
INSERT INTO t2 VALUES (DATE_ADD(CURRENT_DATE, INTERVAL '-839:00:00' HOUR_SECOND));
|
||||
INSERT INTO t2 VALUES (DATE_ADD(CURRENT_DATE, INTERVAL '839:00:00' HOUR_SECOND));
|
||||
SELECT * FROM t2 STRAIGHT_JOIN t1 IGNORE INDEX(col_time_key) WHERE col_time_key = col_datetime_key;
|
||||
col_datetime_key col_time_key
|
||||
2011-12-30 08:00:00 -760:00:00
|
||||
2012-03-02 16:00:00 760:00:00
|
||||
2011-12-29 22:00:00 -770:00:00
|
||||
2012-03-03 02:00:00 770:00:00
|
||||
2011-12-27 01:00:01 -838:59:59
|
||||
2012-03-05 22:59:59 838:59:59
|
||||
SELECT * FROM t2 STRAIGHT_JOIN t1 FORCE INDEX (col_time_key) WHERE col_time_key = col_datetime_key;
|
||||
col_datetime_key col_time_key
|
||||
2011-12-29 22:00:00 -770:00:00
|
||||
2011-12-30 08:00:00 -760:00:00
|
||||
2012-03-02 16:00:00 760:00:00
|
||||
2012-03-03 02:00:00 770:00:00
|
||||
2011-12-27 01:00:01 -838:59:59
|
||||
2012-03-05 22:59:59 838:59:59
|
||||
DROP TABLE t1, t2;
|
||||
SET TIMESTAMP=DEFAULT;
|
||||
|
|
|
@ -26,14 +26,7 @@ foobar 2
|
|||
# Restart server with keysbad3.txt
|
||||
SELECT * FROM t1;
|
||||
ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 192 Table test/t1 in tablespace is encrypted but encryption service or used key_id is not available. Can't continue reading table.
|
||||
Warning 192 Table t1 in file ./test/t1.ibd is encrypted but encryption service or used key_id is not available. Can't continue reading table.
|
||||
Error 1296 Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
|
||||
DROP TABLE t1;
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
# Start server with keys3.txt
|
||||
SET GLOBAL innodb_default_encryption_key_id=5;
|
||||
CREATE TABLE t2 (c VARCHAR(8), id int not null primary key, b int, key(b)) ENGINE=InnoDB ENCRYPTED=YES;
|
||||
|
@ -42,73 +35,32 @@ INSERT INTO t2 VALUES ('foobar',1,2);
|
|||
# Restart server with keys2.txt
|
||||
SELECT * FROM t2;
|
||||
ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 192 Table test/t2 in tablespace is encrypted but encryption service or used key_id is not available. Can't continue reading table.
|
||||
Warning 192 Table t2 in file ./test/t2.ibd is encrypted but encryption service or used key_id is not available. Can't continue reading table.
|
||||
Error 1296 Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
|
||||
SELECT * FROM t2 where id = 1;
|
||||
ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 192 Table t2 in file ./test/t2.ibd is encrypted but encryption service or used key_id is not available. Can't continue reading table.
|
||||
Error 1296 Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
|
||||
SELECT * FROM t2 where b = 1;
|
||||
ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 192 Table t2 in file ./test/t2.ibd is encrypted but encryption service or used key_id is not available. Can't continue reading table.
|
||||
Error 1296 Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
|
||||
INSERT INTO t2 VALUES ('tmp',3,3);
|
||||
ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 192 Table t2 in file ./test/t2.ibd is encrypted but encryption service or used key_id is not available. Can't continue reading table.
|
||||
Error 1296 Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
|
||||
DELETE FROM t2 where b = 3;
|
||||
ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 192 Table t2 in file ./test/t2.ibd is encrypted but encryption service or used key_id is not available. Can't continue reading table.
|
||||
Error 1296 Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
|
||||
DELETE FROM t2 where id = 3;
|
||||
ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 192 Table t2 in file ./test/t2.ibd is encrypted but encryption service or used key_id is not available. Can't continue reading table.
|
||||
Error 1296 Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
|
||||
UPDATE t2 set b = b +1;
|
||||
ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 192 Table t2 in file ./test/t2.ibd is encrypted but encryption service or used key_id is not available. Can't continue reading table.
|
||||
Error 1296 Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
|
||||
OPTIMIZE TABLE t2;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t2 optimize Warning Table t2 in file ./test/t2.ibd is encrypted but encryption service or used key_id is not available. Can't continue reading table.
|
||||
test.t2 optimize Error Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
|
||||
test.t2 optimize error Corrupt
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
ALTER TABLE t2 ADD COLUMN d INT;
|
||||
ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 192 Table t2 in file ./test/t2.ibd is encrypted but encryption service or used key_id is not available. Can't continue reading table.
|
||||
Error 1296 Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
|
||||
ANALYZE TABLE t2;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t2 analyze Warning Table t2 in file ./test/t2.ibd is encrypted but encryption service or used key_id is not available. Can't continue reading table.
|
||||
test.t2 analyze Error Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
|
||||
test.t2 analyze error Corrupt
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
TRUNCATE TABLE t2;
|
||||
ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 192 Table t2 in file ./test/t2.ibd is encrypted but encryption service or used key_id is not available. Can't continue reading table.
|
||||
Error 1296 Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
|
||||
DROP TABLE t2;
|
||||
|
||||
# Start server with keys2.txt
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
select @@encrypt_tmp_files;
|
||||
@@encrypt_tmp_files
|
||||
1
|
||||
CREATE TABLE t1(a INT);
|
||||
INSERT INTO t1 VALUES(1),(2);
|
||||
DELETE FROM t1 WHERE a=1;
|
||||
|
@ -25,6 +28,7 @@ h 10
|
|||
i 10
|
||||
j 10
|
||||
drop table t1;
|
||||
reset master;
|
||||
set global binlog_cache_size=8192;
|
||||
connect con1, localhost, root;
|
||||
create table t1 (a text) engine=innodb;
|
||||
|
@ -34,18 +38,71 @@ commit;
|
|||
start transaction;
|
||||
insert t1 select repeat(seq, 1000) from seq_1_to_8;
|
||||
commit;
|
||||
drop table t1;
|
||||
disconnect con1;
|
||||
connect con2, localhost, root;
|
||||
create table t1 (a text) engine=innodb;
|
||||
create table t2 (a text) engine=innodb;
|
||||
start transaction;
|
||||
insert t1 select repeat(seq, 1000) from seq_1_to_15;
|
||||
insert t2 select repeat(seq, 1000) from seq_1_to_15;
|
||||
savepoint foo;
|
||||
insert t1 select repeat(seq, 1000) from seq_16_to_30;
|
||||
insert t2 select repeat(seq, 1000) from seq_16_to_30;
|
||||
rollback to savepoint foo;
|
||||
insert t1 select repeat(seq, 1000) from seq_31_to_40;
|
||||
insert t2 select repeat(seq, 1000) from seq_31_to_40;
|
||||
commit;
|
||||
drop table t1;
|
||||
disconnect con2;
|
||||
connection default;
|
||||
flush binary logs;
|
||||
drop table t1, t2;
|
||||
set global binlog_cache_size=default;
|
||||
select left(a, 10) from t1;
|
||||
left(a, 10)
|
||||
1111111111
|
||||
2222222222
|
||||
3333333333
|
||||
4444444444
|
||||
5555555555
|
||||
6666666666
|
||||
7777777777
|
||||
8888888888
|
||||
9999999999
|
||||
1010101010
|
||||
1111111111
|
||||
1212121212
|
||||
1313131313
|
||||
1414141414
|
||||
1515151515
|
||||
1111111111
|
||||
2222222222
|
||||
3333333333
|
||||
4444444444
|
||||
5555555555
|
||||
6666666666
|
||||
7777777777
|
||||
8888888888
|
||||
select left(a, 10) from t2;
|
||||
left(a, 10)
|
||||
1111111111
|
||||
2222222222
|
||||
3333333333
|
||||
4444444444
|
||||
5555555555
|
||||
6666666666
|
||||
7777777777
|
||||
8888888888
|
||||
9999999999
|
||||
1010101010
|
||||
1111111111
|
||||
1212121212
|
||||
1313131313
|
||||
1414141414
|
||||
1515151515
|
||||
3131313131
|
||||
3232323232
|
||||
3333333333
|
||||
3434343434
|
||||
3535353535
|
||||
3636363636
|
||||
3737373737
|
||||
3838383838
|
||||
3939393939
|
||||
4040404040
|
||||
drop table t1, t2;
|
||||
|
|
|
@ -36,17 +36,18 @@ SELECT * FROM t1;
|
|||
-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keysbad3.txt
|
||||
-- source include/restart_mysqld.inc
|
||||
|
||||
--disable_warnings
|
||||
--error ER_GET_ERRMSG
|
||||
SELECT * FROM t1;
|
||||
--replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 /
|
||||
SHOW WARNINGS;
|
||||
--enable_warnings
|
||||
|
||||
-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keysbad3.txt
|
||||
-- source include/restart_mysqld.inc
|
||||
--replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 /
|
||||
|
||||
--disable_warnings
|
||||
--replace_regex /tablespace [0-9]*/tablespace /
|
||||
DROP TABLE t1;
|
||||
--replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 /
|
||||
SHOW WARNINGS;
|
||||
--enable_warnings
|
||||
|
||||
#
|
||||
# MDEV-8591: Database page corruption on disk or a failed space, Assertion failure in file buf0buf.cc
|
||||
|
@ -66,50 +67,41 @@ INSERT INTO t2 VALUES ('foobar',1,2);
|
|||
-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
|
||||
-- source include/restart_mysqld.inc
|
||||
|
||||
--disable_warnings
|
||||
--error ER_GET_ERRMSG
|
||||
SELECT * FROM t2;
|
||||
--replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 /
|
||||
SHOW WARNINGS;
|
||||
|
||||
--error ER_GET_ERRMSG
|
||||
SELECT * FROM t2 where id = 1;
|
||||
--replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 /
|
||||
SHOW WARNINGS;
|
||||
|
||||
--error ER_GET_ERRMSG
|
||||
SELECT * FROM t2 where b = 1;
|
||||
--replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 /
|
||||
SHOW WARNINGS;
|
||||
|
||||
--replace_regex /tablespace [0-9]*/tablespace /
|
||||
--error ER_GET_ERRMSG
|
||||
INSERT INTO t2 VALUES ('tmp',3,3);
|
||||
--replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 /
|
||||
SHOW WARNINGS;
|
||||
|
||||
--error ER_GET_ERRMSG
|
||||
DELETE FROM t2 where b = 3;
|
||||
--replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 /
|
||||
SHOW WARNINGS;
|
||||
|
||||
--error ER_GET_ERRMSG
|
||||
DELETE FROM t2 where id = 3;
|
||||
--replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 /
|
||||
SHOW WARNINGS;
|
||||
|
||||
--error ER_GET_ERRMSG
|
||||
UPDATE t2 set b = b +1;
|
||||
--replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 /
|
||||
SHOW WARNINGS;
|
||||
|
||||
OPTIMIZE TABLE t2;
|
||||
--replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 /
|
||||
SHOW WARNINGS;
|
||||
|
||||
--error ER_GET_ERRMSG
|
||||
ALTER TABLE t2 ADD COLUMN d INT;
|
||||
--replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 /
|
||||
SHOW WARNINGS;
|
||||
|
||||
ANALYZE TABLE t2;
|
||||
--replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 /
|
||||
SHOW WARNINGS;
|
||||
|
||||
--error ER_GET_ERRMSG
|
||||
TRUNCATE TABLE t2;
|
||||
--replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 /
|
||||
SHOW WARNINGS;
|
||||
|
||||
DROP TABLE t2;
|
||||
--enable_warnings
|
||||
|
||||
--echo
|
||||
--echo # Start server with keys2.txt
|
||||
|
|
5
mysql-test/suite/encryption/t/tempfiles.combinations
Normal file
5
mysql-test/suite/encryption/t/tempfiles.combinations
Normal file
|
@ -0,0 +1,5 @@
|
|||
[none]
|
||||
binlog-checksum=NONE
|
||||
|
||||
[crc32]
|
||||
binlog-checksum=CRC32
|
1
mysql-test/suite/encryption/t/tempfiles.opt
Normal file
1
mysql-test/suite/encryption/t/tempfiles.opt
Normal file
|
@ -0,0 +1 @@
|
|||
--encrypt-tmp-files
|
|
@ -9,6 +9,8 @@ source include/have_binlog_format_row.inc;
|
|||
|
||||
source include/have_innodb.inc;
|
||||
|
||||
select @@encrypt_tmp_files;
|
||||
|
||||
#
|
||||
# MyISAM messing around with IO_CACHE::file
|
||||
#
|
||||
|
@ -29,6 +31,7 @@ update t1 set c=v, t=v;
|
|||
select sql_big_result t,count(t) from t1 group by t limit 10;
|
||||
drop table t1;
|
||||
|
||||
reset master;
|
||||
set global binlog_cache_size=8192;
|
||||
|
||||
connect con1, localhost, root;
|
||||
|
@ -46,7 +49,6 @@ commit;
|
|||
start transaction;
|
||||
insert t1 select repeat(seq, 1000) from seq_1_to_8;
|
||||
commit;
|
||||
drop table t1;
|
||||
|
||||
disconnect con1;
|
||||
connect con2, localhost, root;
|
||||
|
@ -56,17 +58,27 @@ connect con2, localhost, root;
|
|||
# Start a transaction, write until the cache goes to disk,
|
||||
# create a savepoint, write more blocks to disk, rollback to savepoint.
|
||||
#
|
||||
create table t1 (a text) engine=innodb;
|
||||
create table t2 (a text) engine=innodb;
|
||||
start transaction;
|
||||
insert t1 select repeat(seq, 1000) from seq_1_to_15;
|
||||
insert t2 select repeat(seq, 1000) from seq_1_to_15;
|
||||
savepoint foo;
|
||||
insert t1 select repeat(seq, 1000) from seq_16_to_30;
|
||||
insert t2 select repeat(seq, 1000) from seq_16_to_30;
|
||||
rollback to savepoint foo;
|
||||
insert t1 select repeat(seq, 1000) from seq_31_to_40;
|
||||
insert t2 select repeat(seq, 1000) from seq_31_to_40;
|
||||
commit;
|
||||
drop table t1;
|
||||
|
||||
disconnect con2;
|
||||
connection default;
|
||||
|
||||
flush binary logs;
|
||||
|
||||
drop table t1, t2;
|
||||
|
||||
set global binlog_cache_size=default;
|
||||
|
||||
let $MYSQLD_DATADIR= `select @@datadir`;
|
||||
exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000001 | $MYSQL;
|
||||
|
||||
select left(a, 10) from t1;
|
||||
select left(a, 10) from t2;
|
||||
drop table t1, t2;
|
||||
|
|
|
@ -127,5 +127,198 @@ t1#P#p0.ibd
|
|||
t1#P#p1.ibd
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-14611 ALTER TABLE EXCHANGE PARTITION does not work
|
||||
# properly when used with DATA DIRECTORY
|
||||
#
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
CREATE TABLE t1
|
||||
(
|
||||
myid INT(11) NOT NULL,
|
||||
myval VARCHAR(10),
|
||||
PRIMARY KEY (myid)
|
||||
) ENGINE=INNODB PARTITION BY KEY (myid)
|
||||
(
|
||||
PARTITION p0001 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' ENGINE = INNODB,
|
||||
PARTITION p0002 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' ENGINE = INNODB,
|
||||
PARTITION p0003 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' ENGINE = INNODB,
|
||||
PARTITION p0004 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' ENGINE = INNODB
|
||||
);
|
||||
CREATE TABLE t2
|
||||
(
|
||||
myid INT(11) NOT NULL,
|
||||
myval VARCHAR(10),
|
||||
PRIMARY KEY (myid)
|
||||
) ENGINE=INNODB DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir';
|
||||
ALTER TABLE t1 EXCHANGE PARTITION p0001 WITH TABLE t2;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`myid` int(11) NOT NULL,
|
||||
`myval` varchar(10) DEFAULT NULL,
|
||||
PRIMARY KEY (`myid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
PARTITION BY KEY (`myid`)
|
||||
(PARTITION `p0001` DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' ENGINE = InnoDB,
|
||||
PARTITION `p0002` DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' ENGINE = InnoDB,
|
||||
PARTITION `p0003` DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' ENGINE = InnoDB,
|
||||
PARTITION `p0004` DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' ENGINE = InnoDB)
|
||||
DROP TABLE t1, t2;
|
||||
CREATE TABLE t1
|
||||
(
|
||||
myid INT(11) NOT NULL,
|
||||
myval VARCHAR(10),
|
||||
PRIMARY KEY (myid)
|
||||
) ENGINE=INNODB PARTITION BY RANGE (myid)
|
||||
(
|
||||
PARTITION p0001 VALUES LESS THAN (50) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' ENGINE = INNODB,
|
||||
PARTITION p0002 VALUES LESS THAN (150) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' ENGINE = INNODB,
|
||||
PARTITION p0003 VALUES LESS THAN (1050) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' ENGINE = INNODB,
|
||||
PARTITION p0004 VALUES LESS THAN (10050) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' ENGINE = INNODB
|
||||
);
|
||||
CREATE TABLE t2
|
||||
(
|
||||
myid INT(11) NOT NULL,
|
||||
myval VARCHAR(10),
|
||||
PRIMARY KEY (myid)
|
||||
) ENGINE=INNODB DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir';
|
||||
insert into t1 values (1, 'one');
|
||||
insert into t2 values (2, 'two'), (3, 'threee'), (4, 'four');
|
||||
select * from t1;
|
||||
myid myval
|
||||
1 one
|
||||
ALTER TABLE t1 EXCHANGE PARTITION p0001 WITH TABLE t2;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`myid` int(11) NOT NULL,
|
||||
`myval` varchar(10) DEFAULT NULL,
|
||||
PRIMARY KEY (`myid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
PARTITION BY RANGE (`myid`)
|
||||
(PARTITION `p0001` VALUES LESS THAN (50) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = InnoDB,
|
||||
PARTITION `p0002` VALUES LESS THAN (150) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' ENGINE = InnoDB,
|
||||
PARTITION `p0003` VALUES LESS THAN (1050) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' ENGINE = InnoDB,
|
||||
PARTITION `p0004` VALUES LESS THAN (10050) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' ENGINE = InnoDB)
|
||||
SHOW CREATE TABLE t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`myid` int(11) NOT NULL,
|
||||
`myval` varchar(10) DEFAULT NULL,
|
||||
PRIMARY KEY (`myid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/mysql-test-data-dir/'
|
||||
select * from t1;
|
||||
myid myval
|
||||
2 two
|
||||
3 threee
|
||||
4 four
|
||||
select * from t2;
|
||||
myid myval
|
||||
1 one
|
||||
DROP TABLE t1, t2;
|
||||
CREATE TABLE t1
|
||||
(
|
||||
myid INT(11) NOT NULL,
|
||||
myval VARCHAR(10),
|
||||
PRIMARY KEY (myid)
|
||||
) ENGINE=INNODB PARTITION BY RANGE (myid)
|
||||
(
|
||||
PARTITION p0001 VALUES LESS THAN (50) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' ENGINE = INNODB,
|
||||
PARTITION p0002 VALUES LESS THAN (150) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' ENGINE = INNODB,
|
||||
PARTITION p0003 VALUES LESS THAN (1050) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' ENGINE = INNODB,
|
||||
PARTITION p0004 VALUES LESS THAN (10050) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' ENGINE = INNODB
|
||||
);
|
||||
CREATE TABLE t2
|
||||
(
|
||||
myid INT(11) NOT NULL,
|
||||
myval VARCHAR(10),
|
||||
PRIMARY KEY (myid)
|
||||
) ENGINE=INNODB;
|
||||
insert into t1 values (1, 'one');
|
||||
insert into t2 values (2, 'two'), (3, 'threee'), (4, 'four');
|
||||
select * from t1;
|
||||
myid myval
|
||||
1 one
|
||||
ALTER TABLE t1 EXCHANGE PARTITION p0001 WITH TABLE t2;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`myid` int(11) NOT NULL,
|
||||
`myval` varchar(10) DEFAULT NULL,
|
||||
PRIMARY KEY (`myid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
PARTITION BY RANGE (`myid`)
|
||||
(PARTITION `p0001` VALUES LESS THAN (50) ENGINE = InnoDB,
|
||||
PARTITION `p0002` VALUES LESS THAN (150) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' ENGINE = InnoDB,
|
||||
PARTITION `p0003` VALUES LESS THAN (1050) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' ENGINE = InnoDB,
|
||||
PARTITION `p0004` VALUES LESS THAN (10050) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' ENGINE = InnoDB)
|
||||
SHOW CREATE TABLE t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`myid` int(11) NOT NULL,
|
||||
`myval` varchar(10) DEFAULT NULL,
|
||||
PRIMARY KEY (`myid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/mysql-test-data-dir/'
|
||||
select * from t1;
|
||||
myid myval
|
||||
2 two
|
||||
3 threee
|
||||
4 four
|
||||
select * from t2;
|
||||
myid myval
|
||||
1 one
|
||||
DROP TABLE t1, t2;
|
||||
CREATE TABLE t1
|
||||
(
|
||||
myid INT(11) NOT NULL,
|
||||
myval VARCHAR(10),
|
||||
PRIMARY KEY (myid)
|
||||
) ENGINE=INNODB PARTITION BY RANGE (myid)
|
||||
(
|
||||
PARTITION p0001 VALUES LESS THAN (50) ENGINE = INNODB,
|
||||
PARTITION p0002 VALUES LESS THAN (150) ENGINE = INNODB,
|
||||
PARTITION p0003 VALUES LESS THAN (1050) ENGINE = INNODB,
|
||||
PARTITION p0004 VALUES LESS THAN (10050) ENGINE = INNODB
|
||||
);
|
||||
CREATE TABLE t2
|
||||
(
|
||||
myid INT(11) NOT NULL,
|
||||
myval VARCHAR(10),
|
||||
PRIMARY KEY (myid)
|
||||
) ENGINE=INNODB DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir';
|
||||
insert into t1 values (1, 'one');
|
||||
insert into t2 values (2, 'two'), (3, 'threee'), (4, 'four');
|
||||
select * from t1;
|
||||
myid myval
|
||||
1 one
|
||||
ALTER TABLE t1 EXCHANGE PARTITION p0001 WITH TABLE t2;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`myid` int(11) NOT NULL,
|
||||
`myval` varchar(10) DEFAULT NULL,
|
||||
PRIMARY KEY (`myid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
PARTITION BY RANGE (`myid`)
|
||||
(PARTITION `p0001` VALUES LESS THAN (50) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = InnoDB,
|
||||
PARTITION `p0002` VALUES LESS THAN (150) ENGINE = InnoDB,
|
||||
PARTITION `p0003` VALUES LESS THAN (1050) ENGINE = InnoDB,
|
||||
PARTITION `p0004` VALUES LESS THAN (10050) ENGINE = InnoDB)
|
||||
SHOW CREATE TABLE t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`myid` int(11) NOT NULL,
|
||||
`myval` varchar(10) DEFAULT NULL,
|
||||
PRIMARY KEY (`myid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
select * from t1;
|
||||
myid myval
|
||||
2 two
|
||||
3 threee
|
||||
4 four
|
||||
select * from t2;
|
||||
myid myval
|
||||
1 one
|
||||
DROP TABLE t1, t2;
|
||||
#
|
||||
# Cleanup
|
||||
#
|
||||
|
|
|
@ -147,6 +147,147 @@ SHOW CREATE TABLE t1;
|
|||
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-14611 ALTER TABLE EXCHANGE PARTITION does not work
|
||||
--echo # properly when used with DATA DIRECTORY
|
||||
--echo #
|
||||
let $data_dir_path= $MYSQLTEST_VARDIR/mysql-test-data-dir;
|
||||
let $alt_data_dir_path= $MYSQLTEST_VARDIR/mysql-test-idx-dir;
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
eval CREATE TABLE t1
|
||||
(
|
||||
myid INT(11) NOT NULL,
|
||||
myval VARCHAR(10),
|
||||
PRIMARY KEY (myid)
|
||||
) ENGINE=INNODB PARTITION BY KEY (myid)
|
||||
(
|
||||
PARTITION p0001 DATA DIRECTORY = '$data_dir_path' ENGINE = INNODB,
|
||||
PARTITION p0002 DATA DIRECTORY = '$data_dir_path' ENGINE = INNODB,
|
||||
PARTITION p0003 DATA DIRECTORY = '$data_dir_path' ENGINE = INNODB,
|
||||
PARTITION p0004 DATA DIRECTORY = '$data_dir_path' ENGINE = INNODB
|
||||
);
|
||||
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
eval CREATE TABLE t2
|
||||
(
|
||||
myid INT(11) NOT NULL,
|
||||
myval VARCHAR(10),
|
||||
PRIMARY KEY (myid)
|
||||
) ENGINE=INNODB DATA DIRECTORY = '$data_dir_path';
|
||||
|
||||
ALTER TABLE t1 EXCHANGE PARTITION p0001 WITH TABLE t2;
|
||||
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
SHOW CREATE TABLE t1;
|
||||
DROP TABLE t1, t2;
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
eval CREATE TABLE t1
|
||||
(
|
||||
myid INT(11) NOT NULL,
|
||||
myval VARCHAR(10),
|
||||
PRIMARY KEY (myid)
|
||||
) ENGINE=INNODB PARTITION BY RANGE (myid)
|
||||
(
|
||||
PARTITION p0001 VALUES LESS THAN (50) DATA DIRECTORY = '$data_dir_path' ENGINE = INNODB,
|
||||
PARTITION p0002 VALUES LESS THAN (150) DATA DIRECTORY = '$data_dir_path' ENGINE = INNODB,
|
||||
PARTITION p0003 VALUES LESS THAN (1050) DATA DIRECTORY = '$data_dir_path' ENGINE = INNODB,
|
||||
PARTITION p0004 VALUES LESS THAN (10050) DATA DIRECTORY = '$data_dir_path' ENGINE = INNODB
|
||||
);
|
||||
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
eval CREATE TABLE t2
|
||||
(
|
||||
myid INT(11) NOT NULL,
|
||||
myval VARCHAR(10),
|
||||
PRIMARY KEY (myid)
|
||||
) ENGINE=INNODB DATA DIRECTORY = '$alt_data_dir_path';
|
||||
|
||||
insert into t1 values (1, 'one');
|
||||
insert into t2 values (2, 'two'), (3, 'threee'), (4, 'four');
|
||||
|
||||
select * from t1;
|
||||
ALTER TABLE t1 EXCHANGE PARTITION p0001 WITH TABLE t2;
|
||||
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
SHOW CREATE TABLE t1;
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
SHOW CREATE TABLE t2;
|
||||
select * from t1;
|
||||
select * from t2;
|
||||
DROP TABLE t1, t2;
|
||||
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
eval CREATE TABLE t1
|
||||
(
|
||||
myid INT(11) NOT NULL,
|
||||
myval VARCHAR(10),
|
||||
PRIMARY KEY (myid)
|
||||
) ENGINE=INNODB PARTITION BY RANGE (myid)
|
||||
(
|
||||
PARTITION p0001 VALUES LESS THAN (50) DATA DIRECTORY = '$data_dir_path' ENGINE = INNODB,
|
||||
PARTITION p0002 VALUES LESS THAN (150) DATA DIRECTORY = '$data_dir_path' ENGINE = INNODB,
|
||||
PARTITION p0003 VALUES LESS THAN (1050) DATA DIRECTORY = '$data_dir_path' ENGINE = INNODB,
|
||||
PARTITION p0004 VALUES LESS THAN (10050) DATA DIRECTORY = '$data_dir_path' ENGINE = INNODB
|
||||
);
|
||||
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
eval CREATE TABLE t2
|
||||
(
|
||||
myid INT(11) NOT NULL,
|
||||
myval VARCHAR(10),
|
||||
PRIMARY KEY (myid)
|
||||
) ENGINE=INNODB;
|
||||
|
||||
insert into t1 values (1, 'one');
|
||||
insert into t2 values (2, 'two'), (3, 'threee'), (4, 'four');
|
||||
|
||||
select * from t1;
|
||||
ALTER TABLE t1 EXCHANGE PARTITION p0001 WITH TABLE t2;
|
||||
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
SHOW CREATE TABLE t1;
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
SHOW CREATE TABLE t2;
|
||||
select * from t1;
|
||||
select * from t2;
|
||||
DROP TABLE t1, t2;
|
||||
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
eval CREATE TABLE t1
|
||||
(
|
||||
myid INT(11) NOT NULL,
|
||||
myval VARCHAR(10),
|
||||
PRIMARY KEY (myid)
|
||||
) ENGINE=INNODB PARTITION BY RANGE (myid)
|
||||
(
|
||||
PARTITION p0001 VALUES LESS THAN (50) ENGINE = INNODB,
|
||||
PARTITION p0002 VALUES LESS THAN (150) ENGINE = INNODB,
|
||||
PARTITION p0003 VALUES LESS THAN (1050) ENGINE = INNODB,
|
||||
PARTITION p0004 VALUES LESS THAN (10050) ENGINE = INNODB
|
||||
);
|
||||
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
eval CREATE TABLE t2
|
||||
(
|
||||
myid INT(11) NOT NULL,
|
||||
myval VARCHAR(10),
|
||||
PRIMARY KEY (myid)
|
||||
) ENGINE=INNODB DATA DIRECTORY = '$alt_data_dir_path';
|
||||
|
||||
insert into t1 values (1, 'one');
|
||||
insert into t2 values (2, 'two'), (3, 'threee'), (4, 'four');
|
||||
|
||||
select * from t1;
|
||||
ALTER TABLE t1 EXCHANGE PARTITION p0001 WITH TABLE t2;
|
||||
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
SHOW CREATE TABLE t1;
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
SHOW CREATE TABLE t2;
|
||||
select * from t1;
|
||||
select * from t2;
|
||||
DROP TABLE t1, t2;
|
||||
--echo #
|
||||
--echo # Cleanup
|
||||
--echo #
|
||||
|
@ -160,5 +301,3 @@ EVAL SET GLOBAL innodb_file_per_table=$innodb_file_per_table_orig;
|
|||
EVAL SET SESSION innodb_strict_mode=$innodb_strict_mode_orig;
|
||||
--enable_query_log
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1236,7 +1236,7 @@
|
|||
VARIABLE_NAME INNODB_VERSION
|
||||
SESSION_VALUE NULL
|
||||
-GLOBAL_VALUE 5.6.37
|
||||
+GLOBAL_VALUE 5.6.36-83.0
|
||||
+GLOBAL_VALUE 5.6.38-83.0
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE NULL
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
|
@ -676,7 +676,7 @@
|
|||
VARIABLE_NAME INNODB_VERSION
|
||||
SESSION_VALUE NULL
|
||||
-GLOBAL_VALUE 5.6.37
|
||||
+GLOBAL_VALUE 5.6.36-83.0
|
||||
+GLOBAL_VALUE 5.6.38-83.0
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE NULL
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
|
|
@ -1882,6 +1882,24 @@ alter table t1 drop column a, drop index a;
|
|||
show create table t1;
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-13508 Check that rename of columns changes defaults, virtual
|
||||
--echo # columns and constraints
|
||||
--echo #
|
||||
|
||||
create table t1 (a int, b int, check(a>b));
|
||||
alter table t1 change column a b int, change column b a int;
|
||||
show create table t1;
|
||||
drop table t1;
|
||||
|
||||
create table t1 (a int primary key, b int, c int default (a+b) check (a+b>0),
|
||||
d int as (a+b),
|
||||
key (b),
|
||||
constraint test check (a+b > 1));
|
||||
alter table t1 change b new_b int not null, add column b char(1), add constraint new check (length(b) > 0);
|
||||
show create table t1;
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.2 tests
|
||||
--echo #
|
||||
|
|
|
@ -172,6 +172,29 @@ eval $query;
|
|||
DROP TABLE t1,t2,t3;
|
||||
SET TIMESTAMP=0; # back to current time
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-15262 Wrong results for SELECT..WHERE non_indexed_datetime_column=indexed_time_column
|
||||
--echo #
|
||||
|
||||
SET TIMESTAMP=UNIX_TIMESTAMP('2012-01-31 10:14:35');
|
||||
CREATE TABLE t1 (col_time_key TIME, KEY(col_time_key));
|
||||
CREATE TABLE t2 (col_datetime_key DATETIME);
|
||||
INSERT INTO t1 VALUES ('-760:00:00'),('760:00:00');
|
||||
INSERT INTO t1 VALUES ('-770:00:00'),('770:00:00');
|
||||
INSERT INTO t2 SELECT * FROM t1;
|
||||
SELECT * FROM t2 STRAIGHT_JOIN t1 IGNORE INDEX(col_time_key) WHERE col_time_key = col_datetime_key;
|
||||
SELECT * FROM t2 STRAIGHT_JOIN t1 FORCE INDEX (col_time_key) WHERE col_time_key = col_datetime_key;
|
||||
INSERT INTO t1 VALUES ('-838:59:59'),('838:59:59');
|
||||
INSERT INTO t2 VALUES (DATE_ADD(CURRENT_DATE, INTERVAL '-838:59:59' HOUR_SECOND));
|
||||
INSERT INTO t2 VALUES (DATE_ADD(CURRENT_DATE, INTERVAL '838:59:59' HOUR_SECOND));
|
||||
INSERT INTO t2 VALUES (DATE_ADD(CURRENT_DATE, INTERVAL '-839:00:00' HOUR_SECOND));
|
||||
INSERT INTO t2 VALUES (DATE_ADD(CURRENT_DATE, INTERVAL '839:00:00' HOUR_SECOND));
|
||||
SELECT * FROM t2 STRAIGHT_JOIN t1 IGNORE INDEX(col_time_key) WHERE col_time_key = col_datetime_key;
|
||||
SELECT * FROM t2 STRAIGHT_JOIN t1 FORCE INDEX (col_time_key) WHERE col_time_key = col_datetime_key;
|
||||
DROP TABLE t1, t2;
|
||||
SET TIMESTAMP=DEFAULT;
|
||||
|
||||
#
|
||||
# End of 10.0 tests
|
||||
#
|
||||
|
|
|
@ -23,15 +23,16 @@
|
|||
#
|
||||
##############################################################################
|
||||
|
||||
# Based on 10.2 f5c479565d1d07662f23f0a688add6dffeee5f84
|
||||
# Based on 10.2 49bcc82686c9c305d376183ba4f7bafcbab96bc3
|
||||
|
||||
main.alter_table : Modified in 10.2.13
|
||||
main.analyze_stmt_slow_query_log : MDEV-12237 - Wrong result
|
||||
main.auth_named_pipe : MDEV-14724 - System error 2
|
||||
main.connect2 : MDEV-13885 - Server crash
|
||||
main.create : Modified in 10.2.13
|
||||
main.create_or_replace : Modified in 10.2.12
|
||||
main.cte_grant : Modified in 10.2.11
|
||||
main.cte_nonrecursive : Modified in 10.2.12
|
||||
main.cte_recursive : Modified in 10.2.12
|
||||
main.cte_nonrecursive : Modified in 10.2.13
|
||||
main.cte_recursive : Modified in 10.2.13
|
||||
main.ctype_latin1 : Modified in 10.2.12
|
||||
main.ctype_like_range : Modified in 10.2.12
|
||||
main.ctype_ucs2_uca : Modified in 10.2.12
|
||||
|
@ -41,65 +42,84 @@ main.ctype_utf8 : Modified in 10.2.12
|
|||
main.ctype_utf8_uca : Modified in 10.2.12
|
||||
main.ctype_utf8mb4 : Modified in 10.2.12
|
||||
main.ctype_utf8mb4_uca : Modified in 10.2.12
|
||||
main.delimiter_command_case_sensitivity : Added in 10.2.11
|
||||
main.derived_cond_pushdown : Modified in 10.2.11
|
||||
main.derived : Modified in 10.2.13
|
||||
main.derived_cond_pushdown : Modified in 10.2.13
|
||||
main.distinct : MDEV-14194 - Crash
|
||||
main.dyncol : Modified in 10.2.13
|
||||
main.events_2 : MDEV-13277 - Crash
|
||||
main.events_slowlog : MDEV-12821 - Wrong result
|
||||
main.fulltext : Modified in 10.2.13
|
||||
main.func_concat : Modified in 10.2.13
|
||||
main.func_isnull : Modified in 10.2.13
|
||||
main.func_json : Modified in 10.2.12
|
||||
main.func_misc : Modified in 10.2.12
|
||||
main.func_set : Modified in 10.2.12
|
||||
main.func_str : Modified in 10.2.12
|
||||
main.gis-json : Modified in 10.2.11
|
||||
main.gis-rtree : Modified in 10.2.13
|
||||
main.group_by : Modified in 10.2.12
|
||||
main.having : Modified in 10.2.12
|
||||
main.index_merge_innodb : MDEV-7142 - Plan mismatch
|
||||
main.innodb_mysql_lock : MDEV-7861 - Wrong result
|
||||
main.join_cache : Modified in 10.2.13
|
||||
main.join_outer : Modified in 10.2.12
|
||||
main.kill-2 : MDEV-13257 - Wrong result
|
||||
main.kill_processlist-6619 : MDEV-10793 - Wrong result
|
||||
main.log_slow : MDEV-13263 - Wrong result
|
||||
main.mdev_14586 : Modified in 10.2.13
|
||||
main.mdev-504 : MDEV-15171 - warning
|
||||
main.mysql_client_test_nonblock : CONC-208 - Error on Power
|
||||
main.merge : Modified in 10.2.13
|
||||
main.myisam_optimize : Modified in 10.2.13
|
||||
main.mysql_client_test_nonblock : CONC-208 - Error on Power; MDEV-15096 - exec failed
|
||||
main.mysql_upgrade_noengine : MDEV-14355 - Wrong result
|
||||
main.mysql_upgrade_ssl : MDEV-13492 - Unknown SSL error
|
||||
main.mysqlbinlog : Modified in 10.2.11
|
||||
main.mysqldump : MDEV-14800 - Stack smashing detected
|
||||
main.mysqldump-nl : Modified in 10.2.13
|
||||
main.mysqld_option_err : MDEV-12747 - Timeout
|
||||
main.mysqlhotcopy_myisam : MDEV-10995 - Hang on debug
|
||||
main.mysqltest : MDEV-13887 - Wrong result
|
||||
main.openssl_1 : MDEV-13492 - Unknown SSL error
|
||||
main.order_by : Modified in 10.2.11
|
||||
main.order_by_innodb : Modified in 10.2.11
|
||||
main.ps : MDEV-11017 - Wrong result; modified in 10.2.12
|
||||
main.order_by : Modified in 10.2.13
|
||||
main.order_by_optimizer_innodb : MDEV-10683 - Wrong result
|
||||
main.partition : Modified in 10.2.13
|
||||
main.partition_innodb : Modified in 10.2.13
|
||||
main.ps : MDEV-11017 - Wrong result; modified in 10.2.13
|
||||
main.query_cache_debug : MDEV-15281 - Query cache is disabled; modified in 10.2.13
|
||||
main.range_vs_index_merge_innodb : MDEV-15283 - Server has gone away
|
||||
main.repair : Modified in 10.2.13
|
||||
main.set_statement : MDEV-13183 - Wrong result
|
||||
main.shm : MDEV-12727 - Mismatch, ERROR 2013
|
||||
main.show_explain : MDEV-10674 - Wrong result code
|
||||
main.sp : MDEV-7866 - Mismatch; modified in 10.2.11
|
||||
main.sp : MDEV-7866 - Mismatch; modified in 10.2.13
|
||||
main.ssl_ca : MDEV-10895 - SSL connection error on Power
|
||||
main.ssl_cert_verify : MDEV-13735 - Server crash
|
||||
main.ssl_connect : MDEV-13492 - Unknown SSL error
|
||||
main.ssl_timeout : MDEV-11244 - Crash
|
||||
main.stat_tables_par : MDEV-13266 - Wrong result
|
||||
main.status : MDEV-13255 - Wrong result
|
||||
main.subselect_exists2in : Modified in 10.2.11
|
||||
main.subselect : Modified in 10.2.13
|
||||
main.subselect_innodb : MDEV-10614 - Wrong result
|
||||
main.symlink-myisam-11902 : MDEV-15098 - Error 40 from storage engine
|
||||
main.tc_heuristic_recover : MDEV-14189 - Wrong result
|
||||
main.trigger : Modified in 10.2.11
|
||||
main.type_bit : Modified in 10.2.11
|
||||
main.type_date : Modified in 10.2.11
|
||||
main.type_time : Modified in 10.2.11
|
||||
main.thread_id_overflow : Added in 10.2.13
|
||||
main.type_blob : MDEV-15195 - Wrong result
|
||||
main.type_time_6065 : Modified in 10.2.13
|
||||
main.union : Modified in 10.2.13
|
||||
main.update_innodb : Modified in 10.2.13
|
||||
main.userstat : MDEV-12904 - SSL errors
|
||||
main.view : Modified in 10.2.12
|
||||
main.win : Modified in 10.2.12
|
||||
main.win : Modified in 10.2.13
|
||||
main.xa : Modified in 10.2.13
|
||||
main.xml : Modified in 10.2.13
|
||||
|
||||
#----------------------------------------------------------------
|
||||
|
||||
archive.archive_bitfield : MDEV-11771 - table is marked as crashed
|
||||
archive.mysqlhotcopy_archive : MDEV-10995 - Hang on debug
|
||||
|
||||
#----------------------------------------------------------------
|
||||
|
||||
binlog.binlog_commit_wait : MDEV-10150 - Mismatch
|
||||
binlog.binlog_flush_binlogs_delete_domain : MDEV-14431 - Wrong exit code; added in 10.2.11
|
||||
binlog.binlog_gtid_delete_domain_debug : Added in 10.2.11
|
||||
binlog.binlog_flush_binlogs_delete_domain : MDEV-14431 - Wrong exit code
|
||||
binlog.binlog_xa_recover : MDEV-8517 - Extra checkpoint
|
||||
|
||||
#----------------------------------------------------------------
|
||||
|
@ -110,6 +130,7 @@ binlog_encryption.encrypted_master_switch_to_unencrypted : MDEV-14190 - Can't in
|
|||
binlog_encryption.encryption_combo : MDEV-14199 - Table is marked as crashed
|
||||
binlog_encryption.rpl_binlog_errors : MDEV-12742 - Crash
|
||||
binlog_encryption.rpl_parallel : MDEV-10653 - Timeout in include
|
||||
binlog_encryption.rpl_relayrotate : MDEV-15194 - Timeout
|
||||
binlog_encryption.rpl_semi_sync : MDEV-11673 - Valgrind
|
||||
binlog_encryption.rpl_skip_replication : MDEV-13571 - Unexpected warning
|
||||
binlog_encryption.rpl_ssl : MDEV-14507 - Timeouts
|
||||
|
@ -119,22 +140,20 @@ binlog_encryption.rpl_sync : MDEV-13830 - Assertion failure
|
|||
#----------------------------------------------------------------
|
||||
|
||||
connect.pivot : MDEV-14803 - Failed to discover table
|
||||
connect.tbl : MDEV-10179 - Mismatch, MDEV-9844 - Valgrind, crash
|
||||
connect.tbl_thread : MDEV-10179 - Mismatch, MDEV-9844 - Valgrind, crash, MDEV-14214 - Syntax error
|
||||
connect.vcol : MDEV-12374 - Fails on Windows
|
||||
|
||||
#----------------------------------------------------------------
|
||||
|
||||
encryption.create_or_replace : MDEV-9359, MDEV-13516 - Assertion failure, MDEV-12694 - Timeout
|
||||
encryption.debug_key_management : MDEV-13841 - Timeout
|
||||
encryption.encrypt_and_grep : MDEV-13765 - Wrong result
|
||||
encryption.encryption_force : Modified in 10.2.11
|
||||
encryption.filekeys_encfile : Modified in 10.2.11
|
||||
encryption.filekeys_encfile_file : Modified in 10.2.11
|
||||
encryption.debug_key_management : MDEV-13841 - Timeout; modified in 10.2.13
|
||||
encryption.encrypt_and_grep : MDEV-13765 - Wrong result; modified in 10.2.13
|
||||
encryption.innochecksum : MDEV-13644 - Assertion failure
|
||||
encryption.innodb-bad-key-change : Modified in 10.2.13
|
||||
encryption.innodb-compressed-blob : MDEV-14728 - Unable to get certificate
|
||||
encryption.innodb-discard-import-change : MDEV-12632 - Valgrind
|
||||
encryption.innodb-encryption-alter : MDEV-13566 - Lock wait timeout; modified in 10.2.11
|
||||
encryption.innodb_encrypt_log : MDEV-13725 - Wrong result
|
||||
encryption.innodb_encryption : Modified in 10.2.13
|
||||
encryption.innodb-encryption-alter : MDEV-13566 - Lock wait timeout
|
||||
encryption.innodb_encryption_discard_import : MDEV-12903 - Wrong result, MDEV-14045 - Error 192
|
||||
encryption.innodb_encryption_filekeys : MDEV-9962 - Timeout
|
||||
encryption.innodb_encryption-page-compression : MDEV-14814 - Timeout in wait condition
|
||||
|
@ -143,7 +162,8 @@ encryption.innodb-first-page-read : MDEV-14356 - Timeout in wait
|
|||
encryption.innodb_lotoftables : MDEV-11531 - Operation on a dropped tablespace
|
||||
encryption.innodb-missing-key : MDEV-9359 - assertion failure
|
||||
encryption.innodb-redo-badkey : MDEV-13893 - Page cannot be decrypted
|
||||
encryption.innodb-spatial-index : MDEV-13746 - Wrong result; modified in 10.2.11
|
||||
encryption.innodb-spatial-index : MDEV-13746 - Wrong result
|
||||
encryption.tempfiles : Modified in 10.2.13
|
||||
|
||||
#----------------------------------------------------------------
|
||||
|
||||
|
@ -167,65 +187,68 @@ galera_3nodes.* : Suite is not stable yet
|
|||
|
||||
#----------------------------------------------------------------
|
||||
|
||||
gcol.innodb_virtual_basic : Modified in 10.2.11
|
||||
gcol.innodb_virtual_debug : Modified in 10.2.11
|
||||
gcol.innodb_virtual_debug_purge : Modified in 10.2.12
|
||||
gcol.innodb_virtual_debug_purge : Modified in 10.2.13
|
||||
gcol.innodb_virtual_index : Modified in 10.2.12
|
||||
gcol.innodb_virtual_rebuild : Added in 10.2.11
|
||||
gcol.innodb_virtual_stats : Added in 10.2.12
|
||||
|
||||
#----------------------------------------------------------------
|
||||
|
||||
innodb.101_compatibility : MDEV-13891 - Wrong result
|
||||
innodb.deadlock_detect : MDEV-13262 - Wrong error code
|
||||
innodb.alter_copy : Added in 10.2.13
|
||||
innodb.autoinc_persist : MDEV-15282 - Assertion failure
|
||||
innodb.deadlock_detect : Modified in 10.2.13
|
||||
innodb.doublewrite : MDEV-12905 - Server crash
|
||||
innodb.foreign_key : Modified in 10.2.13
|
||||
innodb.group_commit_crash : MDEV-14191 - InnoDB registration failed
|
||||
innodb.group_commit_crash_no_optimize_thread : MDEV-13830 - Assertion failure
|
||||
innodb.innodb : Modified in 10.2.12
|
||||
innodb.innodb-alter-tempfile : MDEV-14485 - Server deadlock on startup
|
||||
innodb.innodb : Modified in 10.2.13
|
||||
innodb.innodb-alter-tempfile : MDEV-15285 - Table already exists
|
||||
innodb.innodb-autoinc : Modified in 10.2.12
|
||||
innodb.innodb_bug14147491 : MDEV-11808 - Index is corrupt
|
||||
innodb.innodb_bug14147491 : MDEV-11808 - Index is corrupt; modified in 10.2.13
|
||||
innodb.innodb_bug30423 : MDEV-7311 - Wrong result
|
||||
innodb.innodb_bug48024 : MDEV-14352 - Assertion failure
|
||||
innodb.innodb_bug59641 : MDEV-13830 - Assertion failure
|
||||
innodb.innodb_bulk_create_index : Added in 10.2.11
|
||||
innodb.innodb_bulk_create_index_debug : Added in 10.2.11
|
||||
innodb.innodb_bulk_create_index_flush : Added in 10.2.11
|
||||
innodb.innodb_bulk_create_index_replication : Added in 10.2.11
|
||||
innodb.innodb_bulk_create_index_small : Added in 10.2.11
|
||||
innodb.innodb_buffer_pool_resize : Added in 10.2.13
|
||||
innodb.innodb_buffer_pool_resize_with_chunks : Added in 10.2.13
|
||||
innodb.innodb_bulk_create_index_replication : MDEV-15273 - Slave failed to start
|
||||
innodb.innodb_corrupt_bit : Modified in 10.2.13
|
||||
innodb.innodb_defrag_stats_many_tables : MDEV-14198 - Table is full
|
||||
innodb.innodb-get-fk : MDEV-13276 - Server crash
|
||||
innodb.innodb-index-debug : Modified in 10.2.12
|
||||
innodb.innodb-index-online : MDEV-14809 - Cannot save statistics
|
||||
innodb.innodb-index-online : MDEV-14809 - Cannot save statistics; modified in 10.2.13
|
||||
innodb.innodb_information_schema : MDEV-8851 - Wrong result
|
||||
innodb.innodb-lru-force-no-free-page : Added in 10.2.13
|
||||
innodb.innodb_max_recordsize_32k : MDEV-14801 - Operation failed; modified in 10.2.12
|
||||
innodb.innodb_max_recordsize_64k : Modified in 10.2.12
|
||||
innodb.innodb-on-duplicate-update : Added in 10.2.11
|
||||
innodb.innodb_max_recordsize_64k : MDEV-15203 - Wrong result; modified in 10.2.12
|
||||
innodb.innodb-page_compression_default : MDEV-13644 - Assertion failure
|
||||
innodb.innodb-page_compression_lzma : MDEV-14353 - Wrong result
|
||||
innodb.innodb-page_compression_tables : Modified in 10.2.11
|
||||
innodb.innodb-replace-debug : Added in 10.2.11
|
||||
innodb.innodb_stats_debug : Modified in 10.2.12
|
||||
innodb.innodb_stats_drop_locked : Modified in 10.2.12
|
||||
innodb.innodb-replace-debug : Modified in 10.2.13
|
||||
innodb.innodb_stats_drop_locked : Modified in 10.2.13
|
||||
innodb.innodb_stats_persistent_debug : MDEV-14801 - Operation failed
|
||||
innodb.innodb-table-online : MDEV-13894 - Wrong result; modified in 10.2.11
|
||||
innodb.innodb-table-online : MDEV-13894 - Wrong result
|
||||
innodb.innodb_sys_semaphore_waits : MDEV-10331 - Semaphore wait
|
||||
innodb.innodb-wl5522-debug : MDEV-14200 - Wrong errno
|
||||
innodb.innodb_zip_innochecksum2 : MDEV-13882 - Extra warnings
|
||||
innodb.innodb_zip_innochecksum3 : MDEV-14486 - Resource temporarily unavailable
|
||||
innodb.lock_deleted : Added in 10.2.12
|
||||
innodb.log_corruption : MDEV-13251 - Wrong result
|
||||
innodb.log_corruption : MDEV-13251 - Wrong result; modified in 10.2.13
|
||||
innodb.log_data_file_size : MDEV-14204 - Server failed to start
|
||||
innodb.log_file_name : MDEV-14193 - Exception
|
||||
innodb.log_file_size : MDEV-15202 - Can't initiate database recovery; modified in 10.2.13
|
||||
innodb.mvcc : Added in 10.2.13
|
||||
innodb.purge_secondary : Added in 10.2.12
|
||||
innodb.purge_thread_shutdown : MDEV-13792 - Wrong result
|
||||
innodb.read_only_recovery : MDEV-13886 - Server crash
|
||||
innodb.recovery_shutdown : Added in 10.2.12
|
||||
innodb.row_format_redundant : MDEV-14485 - Server deadlock on startup
|
||||
innodb.table_definition_cache_debug : MDEV-14206 - Extra warning; opt file modified in 10.2.12
|
||||
innodb.read_only_recovery : MDEV-13886 - Server crash; modified in 10.2.13
|
||||
innodb.recovery_shutdown : Modified in 10.2.13
|
||||
innodb.row_format_redundant : MDEV-15192 - Trying to access missing tablespace
|
||||
innodb.table_definition_cache_debug : MDEV-14206 - Extra warning; opt file modified in 10.2.13
|
||||
innodb.table_flags : MDEV-13572 - Wrong result
|
||||
innodb.temporary_table : MDEV-13265 - Wrong result
|
||||
innodb.truncate_inject : Added in 10.2.13
|
||||
innodb.truncate_restart : Modified in 10.2.12
|
||||
innodb.update-cascade : Added in 10.2.13
|
||||
innodb.update_time : MDEV-14804 - Wrong result; modified in 10.2.12
|
||||
innodb.update_time_wl6658 : Added in 10.2.11
|
||||
innodb.xa_recovery : MDEV-15279 - mysqld got exception
|
||||
|
||||
innodb_fts.fulltext2 : MDEV-14727 - Long semaphore wait
|
||||
innodb_fts.fulltext_misc : MDEV-12636 - Valgrind
|
||||
|
@ -233,18 +256,28 @@ innodb_fts.innodb_fts_plugin : MDEV-13888 - Errors in server log
|
|||
innodb_fts.innodb_fts_stopword_charset : MDEV-13259 - Table crashed
|
||||
innodb_fts.sync : MDEV-14808 - Wrong result
|
||||
|
||||
innodb_gis.kill_server : MDEV-14218 - Assertion failure; modified in 10.2.12
|
||||
innodb_gis.rtree_compress : MDEV-14207 - Missing include
|
||||
innodb_gis.rtree_compress2 : MDEV-14207 - Missing include; modified in 10.2.12
|
||||
innodb_gis.rtree_debug : MDEV-14209 - Huge error log
|
||||
innodb_gis.rtree_purge : MDEV-14207 - Missing include
|
||||
innodb_gis.rtree_recovery : Modified in 10.2.12
|
||||
innodb_gis.rtree_split : MDEV-14208 - Too many arguments; MDEV-14209 - Huge error log
|
||||
innodb_gis.rtree_undo : MDEV-14456 - Timeout in include file
|
||||
innodb_gis.types : Modified in 10.2.12
|
||||
innodb_gis.bug17057168 : Re-enabled in 10.2.13
|
||||
innodb_gis.geometry : Modified in 10.2.13
|
||||
innodb_gis.gis_split_inf : Modified in 10.2.13
|
||||
innodb_gis.innodb_gis_rtree : Added in 10.2.13
|
||||
innodb_gis.kill_server : Modified in 10.2.12
|
||||
innodb_gis.rtree_compress : Modified in 10.2.13
|
||||
innodb_gis.rtree_compress2 : Modified in 10.2.13
|
||||
innodb_gis.rtree_concurrent_srch : MDEV-15284 - Wrong result with embedded; modified in 10.2.13
|
||||
innodb_gis.rtree_debug : Modified in 10.2.13
|
||||
innodb_gis.rtree_estimate : Re-enabled in 10.2.13
|
||||
innodb_gis.rtree_multi_pk : Re-enabled in 10.2.13
|
||||
innodb_gis.rtree_purge : MDEV-15275 - Timeout; modified in 10.2.13
|
||||
innodb_gis.rtree_recovery : MDEV-15274 - Error on check; re-enabled in 10.2.13
|
||||
innodb_gis.rtree_search : Modified in 10.2.13
|
||||
innodb_gis.rtree_split : MDEV-14208 - Too many arguments; modified in 10.2.13
|
||||
innodb_gis.rtree_undo : MDEV-14456 - Timeout in include file; modified in 10.2.13
|
||||
innodb_gis.tree_search : Re-enabled in 10.2.13
|
||||
innodb_gis.types : Modified in 10.2.13
|
||||
|
||||
innodb_zip.cmp_per_index : MDEV-14490 - Table is marked as crashed
|
||||
innodb_zip.innochecksum_3 : MDEV-13279 - Extra warnings
|
||||
innodb_zip.prefix_index_liftedlimit : MDEV-14238 - Assertion failure
|
||||
innodb_zip.prefix_index_liftedlimit : Added in 10.2.13
|
||||
innodb_zip.wl6470_1 : MDEV-14240 - Assertion failure
|
||||
innodb_zip.wl6501_1 : MDEV-10891 - Can't create UNIX socket
|
||||
innodb_zip.wl5522_debug_zip : MDEV-11600 - Operating system error number 2
|
||||
|
@ -253,29 +286,32 @@ innodb_zip.wl6501_scale_1 : MDEV-13254 - Timeout, MDEV-14104 - Error
|
|||
#----------------------------------------------------------------
|
||||
|
||||
maria.insert_select : MDEV-12757 - Timeout
|
||||
maria.maria : MDEV-14430 - Extra warning
|
||||
maria.lock : Modified in 10.2.13
|
||||
maria.maria : MDEV-14430 - Extra warning; modified in 10.2.13
|
||||
maria.max_length : Modified in 10.2.13
|
||||
maria.repair : Added in 10.2.13
|
||||
|
||||
#----------------------------------------------------------------
|
||||
|
||||
mariabackup.apply-log-only : MDEV-14192 - Assertion failure
|
||||
mariabackup.apply-log-only-incr : MDEV-14192 - Assertion failure; modified in 10.2.12
|
||||
mariabackup.data_directory : Added in 10.2.11
|
||||
mariabackup.apply-log-only : MDEV-14192 - Assertion failure; modified in 10.2.13
|
||||
mariabackup.apply-log-only-incr : MDEV-14192 - Assertion failure; modified in 10.2.13
|
||||
mariabackup.data_directory : MDEV-15270 - Error on exec
|
||||
mariabackup.full_backup : MDEV-13889 - Timeout
|
||||
mariabackup.incremental_backup : MDEV-14192 - Assertion failure; modified in 10.2.11
|
||||
mariabackup.huge_lsn : Modified in 10.2.13
|
||||
mariabackup.incremental_backup : MDEV-14192 - Assertion failure
|
||||
mariabackup.incremental_encrypted : MDEV-14188 - Wrong result
|
||||
mariabackup.log_checksum_mismatch : Added in 10.2.12
|
||||
mariabackup.mdev-14447 : Added in 10.2.11
|
||||
mariabackup.partition_datadir : MDEV-14802 - Timeout; added in 10.2.11
|
||||
mariabackup.mdev-14447 : MDEV-15201 - Timeout
|
||||
mariabackup.missing_ibd : Added in 10.2.13
|
||||
mariabackup.partial_exclude : MDEV-15270 - Error on exec
|
||||
mariabackup.xbstream : MDEV-14192 - Crash
|
||||
mariabackup.xb_aws_key_management : MDEV-15276 - Wrong result; modified in 10.2.13
|
||||
mariabackup.xb_page_compress : MDEV-14810 - status: 1, errno: 11
|
||||
mariabackup.xb_compressed_encrypted : MDEV-14812 - Segmentation fault
|
||||
mariabackup.xb_file_key_management : MDEV-15277 - Assertion failure
|
||||
|
||||
#----------------------------------------------------------------
|
||||
|
||||
mroonga.* : Version-related changes in include files in 10.2.11
|
||||
mroonga/storage.* : Massive changes in 10.2.11
|
||||
mroonga/wrapper.* : Massive changes in 10.2.11
|
||||
|
||||
mroonga/storage.index_multiple_column_unique_datetime_index_read : MDEV-8643 - Valgrind
|
||||
|
||||
#----------------------------------------------------------------
|
||||
|
@ -291,7 +327,8 @@ parts.partition_alter_innodb : Added in 10.2.12
|
|||
parts.partition_alter_maria : Modified in 10.2.12
|
||||
parts.partition_alter_myisam : Added in 10.2.12
|
||||
parts.partition_auto_increment_maria : MDEV-14430 - Extra warning
|
||||
parts.partition_debug_innodb : MDEV-10891 - Can't create UNIX socket
|
||||
parts.partition_basic_symlink_innodb : Modified in 10.2.13
|
||||
parts.partition_debug_innodb : MDEV-10891 - Can't create UNIX socket; MDEV-15095 - Table doesn't exist
|
||||
|
||||
#----------------------------------------------------------------
|
||||
|
||||
|
@ -302,6 +339,7 @@ percona.* : MDEV-10997 - Not maintained
|
|||
perfschema.bad_option_1 : MDEV-13892 - Timeout
|
||||
perfschema.bad_option_3 : MDEV-12728 - Timeout on Power
|
||||
perfschema.bad_option_5 : MDEV-14197 - Timeout
|
||||
perfschema.dml_file_instances : MDEV-15179 - Wrong result
|
||||
perfschema.hostcache_ipv4_addrinfo_again_allow : MDEV-12759 - Crash
|
||||
perfschema.hostcache_ipv6_addrinfo_again_allow : MDEV-12752 - Crash
|
||||
perfschema.hostcache_ipv6_addrinfo_bad_allow : MDEV-13260 - Crash
|
||||
|
@ -320,13 +358,12 @@ perfschema_stress.* : MDEV-10996 - Not maintained
|
|||
|
||||
plugins.binlog-simple_plugin_check : Added in 10.2.12
|
||||
plugins.feedback_plugin_send : MDEV-7932, MDEV-11118 - Connection problems and such
|
||||
plugins.server_audit : Modified in 10.2.11
|
||||
plugins.thread_pool_server : Modified in 10.2.11
|
||||
plugins.thread_pool_server_audit : MDEV-14295 - Wrong result
|
||||
|
||||
#----------------------------------------------------------------
|
||||
|
||||
rocksdb.* : MyRocks is alpha-quality and tests are unstable
|
||||
rocksdb.* : MyRocks is beta-quality and tests are unstable
|
||||
rocksdb_sys_vars.* : MyRocks is beta-quality and tests are unstable
|
||||
|
||||
#----------------------------------------------------------------
|
||||
|
||||
|
@ -342,28 +379,35 @@ rpl.rpl_domain_id_filter_io_crash : MDEV-12729 - Timeout in include file, MDE
|
|||
rpl.rpl_domain_id_filter_restart : MDEV-10684 - Wrong result
|
||||
rpl.rpl_extra_col_master_myisam : MDEV-14203 - Extra warning
|
||||
rpl.rpl_gtid_crash : MDEV-9501 - Failed registering on master, MDEV-13643 - Lost connection
|
||||
rpl.rpl_gtid_delete_domain : MDEV-14463 - Timeout; added in 10.2.11
|
||||
rpl.rpl_gtid_delete_domain : MDEV-14463 - Timeout
|
||||
rpl.rpl_gtid_errorhandling : MDEV-13261 - Crash
|
||||
rpl.rpl_gtid_reconnect : MDEV-14497 - Crash
|
||||
rpl.rpl_gtid_stop_start : MDEV-11621 - Table marked as crashed
|
||||
rpl.rpl_manual_change_index_file : MDEV-14309 - Requires Env package
|
||||
rpl.rpl_insert_id : MDEV-15197 - Wrong result
|
||||
rpl.rpl_mariadb_slave_capability : MDEV-11018 - Extra lines in binlog
|
||||
rpl.rpl_mdev6020 : MDEV-15272 - Server crash
|
||||
rpl.rpl_mixed_mixing_engines : MDEV-14489 - Sync slave with master failed
|
||||
rpl.rpl_non_direct_mixed_mixing_engines : MDEV-14489 - Sync slave with master failed
|
||||
rpl.rpl_non_direct_row_mixing_engines : MDEV-14491 - Long semaphore wait
|
||||
rpl.rpl_non_direct_stm_mixing_engines : MDEV-14489 - Failed sync_slave_with_master
|
||||
rpl.rpl_parallel : MDEV-12730 - Assertion failure
|
||||
rpl.rpl_parallel_conflicts : MDEV-15272 - Server crash
|
||||
rpl.rpl_parallel_mdev6589 : MDEV-12979 - Assertion failure
|
||||
rpl.rpl_parallel_optimistic : MDEV-15278 - Failed to sync with master
|
||||
rpl.rpl_parallel_optimistic_nobinlog : MDEV-12746 - Timeouts, mismatch
|
||||
rpl.rpl_parallel_retry : MDEV-11119 - Crash
|
||||
rpl.rpl_parallel_temptable : MDEV-10356 - Crash
|
||||
rpl.rpl_row_drop_create_temp_table : MDEV-14487 - Wrong result
|
||||
rpl.rpl_row_img_eng_min : MDEV-13875 - diff_files failed
|
||||
rpl.rpl_row_index_choice : MDEV-15196 - Slave crash
|
||||
rpl.rpl_row_log : Included test modified in 10.2.12
|
||||
rpl.rpl_row_log_innodb : Included test modified in 10.2.12
|
||||
rpl.rpl_row_mixing_engines : MDEV-14491 - Long semaphore wait
|
||||
rpl.rpl_semi_sync : MDEV-11220 - Wrong result
|
||||
rpl.rpl_semi_sync_after_sync : MDEV-14366 - Wrong result
|
||||
rpl.rpl_semi_sync_after_sync_row : MDEV-14366 - Wrong result
|
||||
rpl.rpl_semi_sync_skip_repl : Added in 10.2.13
|
||||
rpl.rpl_semi_sync_uninstall_plugin : MDEV-7140 - Assorted failures
|
||||
rpl.rpl_set_statement_default_master : MDEV-13258 - Extra warning
|
||||
rpl.rpl_show_slave_hosts : MDEV-10681 - Crash
|
||||
rpl.rpl_skip_replication : MDEV-13258 - Extra warning
|
||||
|
@ -375,10 +419,12 @@ rpl.rpl_start_stop_slave : MDEV-13567 - Sync slave timeout
|
|||
rpl.rpl_stm_log : Included test modified in 10.2.12
|
||||
rpl.rpl_stm_mixing_engines : MDEV-14489 - Sync slave with master failed
|
||||
rpl.rpl_stm_multi_query : MDEV-9501 - Failed registering on master
|
||||
rpl.rpl_stm_relay_ign_space : MDEV-14360 - Test assertion
|
||||
rpl.rpl_stm_stop_middle_group : MDEV-13791 - Server crash
|
||||
rpl.rpl_sync : MDEV-13830 - Assertion failure
|
||||
rpl.rpl_temporal_mysql56_to_mariadb53 : MDEV-9501 - Failed registering on master
|
||||
rpl.rpl_upgrade_master_info : MDEV-11620 - Table marked as crashed
|
||||
rpl.sec_behind_master-5114 : MDEV-13878 - Wrong result
|
||||
|
||||
rpl/extra/rpl_tests.* : MDEV-10994 - Not maintained
|
||||
|
||||
|
@ -404,9 +450,7 @@ storage_engine.* : Not always timely maintained
|
|||
#----------------------------------------------------------------
|
||||
|
||||
sys_vars.innodb_buffer_pool_dump_at_shutdown_basic : MDEV-14280 - Unexpected error
|
||||
sys_vars.innodb_buffer_pool_dump_now_basic : Modified in 10.2.11
|
||||
sys_vars.innodb_buffer_pool_dump_pct_basic : Modified in 10.2.11
|
||||
sys_vars.innodb_buffer_pool_load_now_basic : Modified in 10.2.11
|
||||
sys_vars.innodb_print_lock_wait_timeout_info_basic : Added in 10.2.13
|
||||
sys_vars.rpl_init_slave_func : MDEV-10149 - Test assertion
|
||||
sys_vars.slow_query_log_func : MDEV-14273 - Wrong result
|
||||
sys_vars.thread_cache_size_func : MDEV-11775 - Wrong result
|
||||
|
@ -414,14 +458,27 @@ sys_vars.wsrep_on_basic : Opt file added in 10.2.12
|
|||
|
||||
#----------------------------------------------------------------
|
||||
|
||||
tokudb.card_scale_percent : Modified in 10.2.13
|
||||
tokudb.change_column_all_1000_10 : MDEV-12640 - Lost connection
|
||||
tokudb.change_column_bin : MDEV-12640 - Lost connection
|
||||
tokudb.change_column_char : MDEV-12822 - Lost connection
|
||||
tokudb.dir_per_db : MDEV-11537 - Wrong result
|
||||
tokudb.hotindex-insert-2 : MDEV-15271 - Timeout
|
||||
tokudb.hotindex-insert-bigchar : MDEV-12640 - Crash
|
||||
tokudb.hotindex-update-0 : MDEV-15198 - Timeout
|
||||
tokudb.hotindex-update-1 : MDEV-12640 - Crash
|
||||
tokudb.locking-read-repeatable-read-1 : Added in 10.2.13
|
||||
tokudb.locking-read-repeatable-read-2 : Added in 10.2.13
|
||||
tokudb.nonflushing_analyze_debug : Added in 10.2.13
|
||||
tokudb.rows-32m-rand-insert : MDEV-12640 - Crash
|
||||
tokudb.rows-32m-seq-insert : MDEV-12640 - Crash
|
||||
tokudb.row_format : Modified in 10.2.13
|
||||
tokudb.savepoint-5 : MDEV-15280 - Wrong result
|
||||
tokudb.type_datetime : MDEV-15193 - Wrong result
|
||||
|
||||
tokudb_alter_table.hcad_all_add2 : MDEV-15269 - Timeout
|
||||
|
||||
tokudb_bugs.xa : MDEV-11804 - Lock wait timeout
|
||||
|
||||
tokudb_mariadb.mdev6657 : MDEV-12737 - Mismatch or valgrind
|
||||
|
||||
|
@ -432,10 +489,15 @@ tokudb_backup.* : MDEV-11001 - Missing include file
|
|||
tokudb_sys_vars.* : MDEV-11001 - Missing include file
|
||||
tokudb_rpl.* : MDEV-11001 - Missing include file
|
||||
|
||||
tokudb_parts.nonflushing_analyze_debug : Added in 10.2.13
|
||||
tokudb_parts.partition_alter4_tokudb : MDEV-12640 - Lost connection
|
||||
|
||||
tokudb_perfschema.crash_tokudb : Added in 10.2.13
|
||||
tokudb_perfschema.start_server_tokudb : Added in 10.2.13
|
||||
|
||||
#----------------------------------------------------------------
|
||||
|
||||
unit.conc_basic-t : MDEV-15286 - not ok 7 - test_reconnect_maxpackage
|
||||
unit.conc_misc : MDEV-14811 - not ok 12 - test_conc49
|
||||
unit.conc_ps_bugs : MDEV-13252 - not ok 44 test_bug4236
|
||||
unit.lf : MDEV-12897 - Signal 11 thrown
|
||||
|
|
|
@ -512,7 +512,7 @@ my_bool reinit_io_cache(IO_CACHE *info, enum cache_type type,
|
|||
info->read_end= info->buffer;
|
||||
_my_b_encr_read(info, 0, 0); /* prefill the buffer */
|
||||
info->write_pos= info->read_pos;
|
||||
info->pos_in_file+= info->buffer_length;
|
||||
info->seek_not_done=1;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -5772,6 +5772,13 @@ static void calc_datetime_days_diff(MYSQL_TIME *ltime, long days)
|
|||
ltime->second) * 1000000LL +
|
||||
ltime->second_part);
|
||||
unpack_time(timediff, ltime);
|
||||
/*
|
||||
unpack_time() broke down hours into ltime members hour,day,month.
|
||||
Mix them back to ltime->hour using the same factors
|
||||
that pack_time()/unpack_time() use (i.e. 32 for month).
|
||||
*/
|
||||
ltime->hour+= (ltime->month * 32 + ltime->day) * 24;
|
||||
ltime->month= ltime->day= 0;
|
||||
}
|
||||
ltime->time_type= MYSQL_TIMESTAMP_TIME;
|
||||
}
|
||||
|
|
28
sql/item.cc
28
sql/item.cc
|
@ -881,6 +881,34 @@ bool Item_field::add_field_to_set_processor(void *arg)
|
|||
DBUG_RETURN(FALSE);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Rename fields in an expression to new field name as speficied by ALTER TABLE
|
||||
*/
|
||||
|
||||
bool Item_field::rename_fields_processor(void *arg)
|
||||
{
|
||||
Item::func_processor_rename *rename= (Item::func_processor_rename*) arg;
|
||||
List_iterator<Create_field> def_it(rename->fields);
|
||||
Create_field *def;
|
||||
|
||||
while ((def=def_it++))
|
||||
{
|
||||
if (def->change.str &&
|
||||
(!db_name || !db_name[0] ||
|
||||
!my_strcasecmp(table_alias_charset, db_name, rename->db_name.str)) &&
|
||||
(!table_name || !table_name[0] ||
|
||||
!my_strcasecmp(table_alias_charset, table_name, rename->table_name.str)) &&
|
||||
!my_strcasecmp(system_charset_info, field_name.str, def->change.str))
|
||||
{
|
||||
field_name= def->field_name;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Check if an Item_field references some field from a list of fields.
|
||||
|
||||
|
|
|
@ -1641,6 +1641,7 @@ public:
|
|||
*/
|
||||
virtual bool check_partition_func_processor(void *arg) { return 1;}
|
||||
virtual bool vcol_in_partition_func_processor(void *arg) { return 0; }
|
||||
virtual bool rename_fields_processor(void *arg) { return 0; }
|
||||
/** Processor used to check acceptability of an item in the defining
|
||||
expression for a virtual column
|
||||
|
||||
|
@ -1654,6 +1655,12 @@ public:
|
|||
uint errors; /* Bits of possible errors */
|
||||
const char *name; /* Not supported function */
|
||||
};
|
||||
struct func_processor_rename
|
||||
{
|
||||
LEX_CSTRING db_name;
|
||||
LEX_CSTRING table_name;
|
||||
List<Create_field> fields;
|
||||
};
|
||||
virtual bool check_vcol_func_processor(void *arg)
|
||||
{
|
||||
return mark_unsupported_function(full_name(), arg, VCOL_IMPOSSIBLE);
|
||||
|
@ -2869,6 +2876,7 @@ public:
|
|||
bool update_table_bitmaps_processor(void *arg);
|
||||
bool switch_to_nullable_fields_processor(void *arg);
|
||||
bool update_vcol_processor(void *arg);
|
||||
bool rename_fields_processor(void *arg);
|
||||
bool check_vcol_func_processor(void *arg)
|
||||
{
|
||||
context= 0;
|
||||
|
|
|
@ -145,9 +145,10 @@ static int my_b_encr_write(IO_CACHE *info, const uchar *Buffer, size_t Count)
|
|||
|
||||
if (info->seek_not_done)
|
||||
{
|
||||
DBUG_ASSERT(info->pos_in_file == 0);
|
||||
DBUG_ASSERT(info->pos_in_file % info->buffer_length == 0);
|
||||
my_off_t wpos= info->pos_in_file / info->buffer_length * crypt_data->block_length;
|
||||
|
||||
if ((mysql_file_seek(info->file, 0, MY_SEEK_SET, MYF(0)) == MY_FILEPOS_ERROR))
|
||||
if ((mysql_file_seek(info->file, wpos, MY_SEEK_SET, MYF(0)) == MY_FILEPOS_ERROR))
|
||||
{
|
||||
info->error= -1;
|
||||
DBUG_RETURN(1);
|
||||
|
|
|
@ -95,7 +95,8 @@ public:
|
|||
// Set for ADD [COLUMN] FIRST | AFTER
|
||||
ALTER_COLUMN_ORDER = 1L << 25,
|
||||
ALTER_ADD_CHECK_CONSTRAINT = 1L << 27,
|
||||
ALTER_DROP_CHECK_CONSTRAINT = 1L << 28
|
||||
ALTER_DROP_CHECK_CONSTRAINT = 1L << 28,
|
||||
ALTER_RENAME_COLUMN = 1L << 29
|
||||
};
|
||||
|
||||
enum enum_enable_or_disable { LEAVE_AS_IS, ENABLE, DISABLE };
|
||||
|
|
|
@ -38,21 +38,21 @@ void free_list(I_List <i_string> *list)
|
|||
}
|
||||
|
||||
|
||||
base_list::base_list(const base_list &rhs, MEM_ROOT *mem_root)
|
||||
bool base_list::copy(const base_list *rhs, MEM_ROOT *mem_root)
|
||||
{
|
||||
if (rhs.elements)
|
||||
bool error= 0;
|
||||
if (rhs->elements)
|
||||
{
|
||||
/*
|
||||
It's okay to allocate an array of nodes at once: we never
|
||||
call a destructor for list_node objects anyway.
|
||||
*/
|
||||
first= (list_node*) alloc_root(mem_root,
|
||||
sizeof(list_node) * rhs.elements);
|
||||
if (first)
|
||||
if ((first= (list_node*) alloc_root(mem_root,
|
||||
sizeof(list_node) * rhs->elements)))
|
||||
{
|
||||
elements= rhs.elements;
|
||||
elements= rhs->elements;
|
||||
list_node *dst= first;
|
||||
list_node *src= rhs.first;
|
||||
list_node *src= rhs->first;
|
||||
for (; dst < first + elements - 1; dst++, src= src->next)
|
||||
{
|
||||
dst->info= src->info;
|
||||
|
@ -63,10 +63,12 @@ base_list::base_list(const base_list &rhs, MEM_ROOT *mem_root)
|
|||
dst->next= &end_of_list;
|
||||
/* Setup 'last' member */
|
||||
last= &dst->next;
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
error= 1;
|
||||
}
|
||||
elements= 0;
|
||||
first= &end_of_list;
|
||||
last= &first;
|
||||
return error;
|
||||
}
|
||||
|
|
|
@ -202,7 +202,8 @@ public:
|
|||
need to copy elements by value, you should employ
|
||||
list_copy_and_replace_each_value after creating a copy.
|
||||
*/
|
||||
base_list(const base_list &rhs, MEM_ROOT *mem_root);
|
||||
bool copy(const base_list *rhs, MEM_ROOT *mem_root);
|
||||
base_list(const base_list &rhs, MEM_ROOT *mem_root) { copy(&rhs, mem_root); }
|
||||
inline base_list(bool error) { }
|
||||
inline bool push_back(void *info)
|
||||
{
|
||||
|
@ -536,6 +537,8 @@ public:
|
|||
inline void disjoin(List<T> *list) { base_list::disjoin(list); }
|
||||
inline bool add_unique(T *a, bool (*eq)(T *a, T *b))
|
||||
{ return base_list::add_unique(a, (List_eq *)eq); }
|
||||
inline bool copy(const List<T> *list, MEM_ROOT *root)
|
||||
{ return base_list::copy(list, root); }
|
||||
void delete_elements(void)
|
||||
{
|
||||
list_node *element,*next;
|
||||
|
|
|
@ -7438,6 +7438,7 @@ mysql_prepare_alter_table(THD *thd, TABLE *table,
|
|||
List<Virtual_column_info> new_constraint_list;
|
||||
uint db_create_options= (table->s->db_create_options
|
||||
& ~(HA_OPTION_PACK_RECORD));
|
||||
Item::func_processor_rename column_rename_param;
|
||||
uint used_fields;
|
||||
KEY *key_info=table->key_info;
|
||||
bool rc= TRUE;
|
||||
|
@ -7490,6 +7491,11 @@ mysql_prepare_alter_table(THD *thd, TABLE *table,
|
|||
if (!(used_fields & HA_CREATE_USED_SEQUENCE))
|
||||
create_info->sequence= table->s->table_type == TABLE_TYPE_SEQUENCE;
|
||||
|
||||
column_rename_param.db_name= table->s->db;
|
||||
column_rename_param.table_name= table->s->table_name;
|
||||
if (column_rename_param.fields.copy(&alter_info->create_list, thd->mem_root))
|
||||
DBUG_RETURN(1); // OOM
|
||||
|
||||
restore_record(table, s->default_values); // Empty record for DEFAULT
|
||||
|
||||
if ((create_info->fields_option_struct= (ha_field_option_struct**)
|
||||
|
@ -7534,6 +7540,24 @@ mysql_prepare_alter_table(THD *thd, TABLE *table,
|
|||
bitmap_set_bit(dropped_fields, field->field_index);
|
||||
continue;
|
||||
}
|
||||
|
||||
/*
|
||||
If we are doing a rename of a column, update all references in virtual
|
||||
column expressions, constraints and defaults to use the new column name
|
||||
*/
|
||||
if (alter_info->flags & Alter_info::ALTER_RENAME_COLUMN)
|
||||
{
|
||||
if (field->vcol_info)
|
||||
field->vcol_info->expr->walk(&Item::rename_fields_processor, 1,
|
||||
&column_rename_param);
|
||||
if (field->check_constraint)
|
||||
field->check_constraint->expr->walk(&Item::rename_fields_processor, 1,
|
||||
&column_rename_param);
|
||||
if (field->default_value)
|
||||
field->default_value->expr->walk(&Item::rename_fields_processor, 1,
|
||||
&column_rename_param);
|
||||
}
|
||||
|
||||
/* Check if field is changed */
|
||||
def_it.rewind();
|
||||
while ((def=def_it++))
|
||||
|
@ -7950,7 +7974,10 @@ mysql_prepare_alter_table(THD *thd, TABLE *table,
|
|||
}
|
||||
}
|
||||
if (!drop)
|
||||
{
|
||||
check->expr->walk(&Item::rename_fields_processor, 1, &column_rename_param);
|
||||
new_constraint_list.push_back(check, thd->mem_root);
|
||||
}
|
||||
}
|
||||
}
|
||||
/* Add new constraints */
|
||||
|
|
|
@ -7767,7 +7767,8 @@ alter_list_item:
|
|||
| CHANGE opt_column opt_if_exists_table_element field_ident
|
||||
field_spec opt_place
|
||||
{
|
||||
Lex->alter_info.flags|= Alter_info::ALTER_CHANGE_COLUMN;
|
||||
Lex->alter_info.flags|= (Alter_info::ALTER_CHANGE_COLUMN |
|
||||
Alter_info::ALTER_RENAME_COLUMN);
|
||||
Lex->create_last_non_select_table= Lex->last_table();
|
||||
$5->change= $4;
|
||||
$5->after= $6;
|
||||
|
|
|
@ -7627,7 +7627,8 @@ alter_list_item:
|
|||
| CHANGE opt_column opt_if_exists_table_element field_ident
|
||||
field_spec opt_place
|
||||
{
|
||||
Lex->alter_info.flags|= Alter_info::ALTER_CHANGE_COLUMN;
|
||||
Lex->alter_info.flags|= (Alter_info::ALTER_CHANGE_COLUMN |
|
||||
Alter_info::ALTER_RENAME_COLUMN);
|
||||
Lex->create_last_non_select_table= Lex->last_table();
|
||||
$5->change= $4;
|
||||
$5->after= $6;
|
||||
|
|
|
@ -4603,6 +4603,8 @@ evict_from_pool:
|
|||
buf_block_unfix(fix_block);
|
||||
buf_pool_mutex_exit(buf_pool);
|
||||
rw_lock_x_unlock(&fix_block->lock);
|
||||
|
||||
*err = DB_PAGE_CORRUPTED;
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4715,6 +4715,8 @@ end:
|
|||
DICT_ERR_IGNORE_NONE);
|
||||
fk_tables.pop_front();
|
||||
}
|
||||
|
||||
table->data_dir_path= NULL;
|
||||
}
|
||||
|
||||
funct_exit:
|
||||
|
|
|
@ -208,6 +208,8 @@ TARGET_LINK_LIBRARIES(sst_dump rocksdblib)
|
|||
MYSQL_ADD_EXECUTABLE(mysql_ldb tools/mysql_ldb.cc COMPONENT rocksdb-engine)
|
||||
TARGET_LINK_LIBRARIES(mysql_ldb rocksdb_tools rocksdb_aux_lib)
|
||||
|
||||
INSTALL_SCRIPT(myrocks_hotbackup COMPONENT rocksdb-engine)
|
||||
|
||||
IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
SET_TARGET_PROPERTIES(rocksdb_tools sst_dump mysql_ldb PROPERTIES COMPILE_FLAGS -frtti)
|
||||
ENDIF()
|
||||
|
|
686
storage/rocksdb/myrocks_hotbackup
Executable file
686
storage/rocksdb/myrocks_hotbackup
Executable file
|
@ -0,0 +1,686 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
from __future__ import division
|
||||
from optparse import OptionParser
|
||||
import collections
|
||||
import signal
|
||||
import os
|
||||
import stat
|
||||
import sys
|
||||
import re
|
||||
import commands
|
||||
import subprocess
|
||||
import logging
|
||||
import logging.handlers
|
||||
import time
|
||||
import datetime
|
||||
import shutil
|
||||
import traceback
|
||||
import tempfile
|
||||
|
||||
import MySQLdb
|
||||
import MySQLdb.connections
|
||||
from MySQLdb import OperationalError, ProgrammingError
|
||||
|
||||
logger = None
|
||||
opts = None
|
||||
rocksdb_files = ['MANIFEST', 'CURRENT', 'OPTIONS']
|
||||
rocksdb_data_suffix = '.sst'
|
||||
rocksdb_wal_suffix = '.log'
|
||||
exclude_files = ['master.info', 'relay-log.info', 'worker-relay-log.info',
|
||||
'auto.cnf', 'gaplock.log', 'ibdata', 'ib_logfile', '.trash']
|
||||
wdt_bin = 'wdt'
|
||||
|
||||
def is_manifest(fname):
|
||||
for m in rocksdb_files:
|
||||
if fname.startswith(m):
|
||||
return True
|
||||
return False
|
||||
|
||||
class Writer(object):
|
||||
a = None
|
||||
def __init__(self):
|
||||
a = None
|
||||
|
||||
class StreamWriter(Writer):
|
||||
stream_cmd= ''
|
||||
|
||||
def __init__(self, stream_option):
|
||||
super(StreamWriter, self).__init__()
|
||||
if stream_option == 'tar':
|
||||
self.stream_cmd= 'tar chf -'
|
||||
elif stream_option == 'xbstream':
|
||||
self.stream_cmd= 'xbstream -c'
|
||||
else:
|
||||
raise Exception("Only tar or xbstream is supported as streaming option.")
|
||||
|
||||
def write(self, file_name):
|
||||
rc= os.system(self.stream_cmd + " " + file_name)
|
||||
if (rc != 0):
|
||||
raise Exception("Got error on stream write: " + str(rc) + " " + file_name)
|
||||
|
||||
|
||||
class MiscFilesProcessor():
|
||||
datadir = None
|
||||
wildcard = r'.*\.[frm|MYD|MYI|MAD|MAI|MRG|TRG|TRN|ARM|ARZ|CSM|CSV|opt|par]'
|
||||
regex = None
|
||||
start_backup_time = None
|
||||
skip_check_frm_timestamp = None
|
||||
|
||||
def __init__(self, datadir, skip_check_frm_timestamp, start_backup_time):
|
||||
self.datadir = datadir
|
||||
self.regex = re.compile(self.wildcard)
|
||||
self.skip_check_frm_timestamp = skip_check_frm_timestamp
|
||||
self.start_backup_time = start_backup_time
|
||||
|
||||
def process_db(self, db):
|
||||
# do nothing
|
||||
pass
|
||||
|
||||
def process_file(self, path):
|
||||
# do nothing
|
||||
pass
|
||||
|
||||
def check_frm_timestamp(self, fname, path):
|
||||
if not self.skip_check_frm_timestamp and fname.endswith('.frm'):
|
||||
if os.path.getmtime(path) > self.start_backup_time:
|
||||
logger.error('FRM file %s was updated after starting backups. '
|
||||
'Schema could have changed and the resulting copy may '
|
||||
'not be valid. Aborting. '
|
||||
'(backup time: %s, file modifled time: %s)',
|
||||
path, datetime.datetime.fromtimestamp(self.start_backup_time).strftime('%Y-%m-%d %H:%M:%S'),
|
||||
datetime.datetime.fromtimestamp(os.path.getmtime(path)).strftime('%Y-%m-%d %H:%M:%S'))
|
||||
raise Exception("Inconsistent frm file timestamp");
|
||||
|
||||
def process(self):
|
||||
os.chdir(self.datadir)
|
||||
for db in self.get_databases():
|
||||
logger.info("Starting MySQL misc file traversal from database %s..", db)
|
||||
self.process_db(db)
|
||||
for f in self.get_files(db):
|
||||
if self.match(f):
|
||||
rel_path = os.path.join(db, f)
|
||||
self.check_frm_timestamp(f, rel_path)
|
||||
self.process_file(rel_path)
|
||||
logger.info("Traversing misc files from data directory..")
|
||||
for f in self.get_files(""):
|
||||
should_skip = False
|
||||
for e in exclude_files:
|
||||
if f.startswith(e) or f.endswith(e):
|
||||
logger.info("Skipping %s", f)
|
||||
should_skip = True
|
||||
break
|
||||
if not should_skip:
|
||||
self.process_file(f)
|
||||
|
||||
def match(self, filename):
|
||||
if self.regex.match(filename):
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
def get_databases(self):
|
||||
dbs = []
|
||||
dirs = [ d for d in os.listdir(self.datadir) \
|
||||
if not os.path.isfile(os.path.join(self.datadir,d))]
|
||||
for db in dirs:
|
||||
if not db.startswith('.') and not self._is_socket(db) and not db == "#rocksdb":
|
||||
dbs.append(db)
|
||||
return dbs
|
||||
|
||||
def get_files(self, db):
|
||||
dbdir = self.datadir + "/" + db
|
||||
return [ f for f in os.listdir(dbdir) \
|
||||
if os.path.isfile(os.path.join(dbdir,f))]
|
||||
|
||||
def _is_socket(self, item):
|
||||
mode = os.stat(os.path.join(self.datadir, item)).st_mode
|
||||
if stat.S_ISSOCK(mode):
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
class MySQLBackup(MiscFilesProcessor):
|
||||
writer = None
|
||||
|
||||
def __init__(self, datadir, writer, skip_check_frm_timestamp, start_backup_time):
|
||||
MiscFilesProcessor.__init__(self, datadir, skip_check_frm_timestamp, start_backup_time)
|
||||
self.writer = writer
|
||||
|
||||
def process_file(self, fname): # overriding base class
|
||||
self.writer.write(fname)
|
||||
|
||||
|
||||
class MiscFilesLinkCreator(MiscFilesProcessor):
|
||||
snapshot_dir = None
|
||||
|
||||
def __init__(self, datadir, snapshot_dir, skip_check_frm_timestamp, start_backup_time):
|
||||
MiscFilesProcessor.__init__(self, datadir, skip_check_frm_timestamp, start_backup_time)
|
||||
self.snapshot_dir = snapshot_dir
|
||||
|
||||
def process_db(self, db):
|
||||
snapshot_sub_dir = os.path.join(self.snapshot_dir, db)
|
||||
os.makedirs(snapshot_sub_dir)
|
||||
|
||||
def process_file(self, path):
|
||||
dst_path = os.path.join(self.snapshot_dir, path)
|
||||
os.link(path, dst_path)
|
||||
|
||||
|
||||
# RocksDB backup
|
||||
class RocksDBBackup():
|
||||
source_dir = None
|
||||
writer = None
|
||||
# sst files sent in this backup round
|
||||
sent_sst = {}
|
||||
# target sst files in this backup round
|
||||
target_sst = {}
|
||||
# sst files sent in all backup rounds
|
||||
total_sent_sst= {}
|
||||
# sum of sst file size sent in this backup round
|
||||
sent_sst_size = 0
|
||||
# sum of target sst file size in this backup round
|
||||
# if sent_sst_size becomes equal to target_sst_size,
|
||||
# it means the backup round finished backing up all sst files
|
||||
target_sst_size = 0
|
||||
# sum of all sst file size sent all backup rounds
|
||||
total_sent_sst_size= 0
|
||||
# sum of all target sst file size from all backup rounds
|
||||
total_target_sst_size = 0
|
||||
show_progress_size_interval= 1073741824 # 1GB
|
||||
wal_files= []
|
||||
manifest_files= []
|
||||
finished= False
|
||||
|
||||
def __init__(self, source_dir, writer, prev):
|
||||
self.source_dir = source_dir
|
||||
self.writer = writer
|
||||
os.chdir(self.source_dir)
|
||||
self.init_target_files(prev)
|
||||
|
||||
def init_target_files(self, prev):
|
||||
sst = {}
|
||||
self.sent_sst = {}
|
||||
self.target_sst= {}
|
||||
self.total_sent_sst = {}
|
||||
self.sent_sst_size = 0
|
||||
self.target_sst_size = 0
|
||||
self.total_sent_sst_size= 0
|
||||
self.total_target_sst_size= 0
|
||||
self.wal_files= []
|
||||
self.manifest_files= []
|
||||
|
||||
for f in os.listdir(self.source_dir):
|
||||
if f.endswith(rocksdb_data_suffix):
|
||||
# exactly the same file (same size) was sent in previous backup rounds
|
||||
if prev is not None and f in prev.total_sent_sst and int(os.stat(f).st_size) == prev.total_sent_sst[f]:
|
||||
continue
|
||||
sst[f]= int(os.stat(f).st_size)
|
||||
self.target_sst_size = self.target_sst_size + os.stat(f).st_size
|
||||
elif is_manifest(f):
|
||||
self.manifest_files.append(f)
|
||||
elif f.endswith(rocksdb_wal_suffix):
|
||||
self.wal_files.append(f)
|
||||
self.target_sst= collections.OrderedDict(sorted(sst.items()))
|
||||
|
||||
if prev is not None:
|
||||
self.total_sent_sst = prev.total_sent_sst
|
||||
self.total_sent_sst_size = prev.total_sent_sst_size
|
||||
self.total_target_sst_size = self.target_sst_size + prev.total_sent_sst_size
|
||||
else:
|
||||
self.total_target_sst_size = self.target_sst_size
|
||||
|
||||
def do_backup_single(self, fname):
|
||||
self.writer.write(fname)
|
||||
os.remove(fname)
|
||||
|
||||
def do_backup_sst(self, fname, size):
|
||||
self.do_backup_single(fname)
|
||||
self.sent_sst[fname]= size
|
||||
self.total_sent_sst[fname]= size
|
||||
self.sent_sst_size = self.sent_sst_size + size
|
||||
self.total_sent_sst_size = self.total_sent_sst_size + size
|
||||
|
||||
def do_backup_manifest(self):
|
||||
for f in self.manifest_files:
|
||||
self.do_backup_single(f)
|
||||
|
||||
def do_backup_wal(self):
|
||||
for f in self.wal_files:
|
||||
self.do_backup_single(f)
|
||||
|
||||
# this is the last snapshot round. backing up all the rest files
|
||||
def do_backup_final(self):
|
||||
logger.info("Backup WAL..")
|
||||
self.do_backup_wal()
|
||||
logger.info("Backup Manifest..")
|
||||
self.do_backup_manifest()
|
||||
self.do_cleanup()
|
||||
self.finished= True
|
||||
|
||||
def do_cleanup(self):
|
||||
shutil.rmtree(self.source_dir)
|
||||
logger.info("Cleaned up checkpoint from %s", self.source_dir)
|
||||
|
||||
def do_backup_until(self, time_limit):
|
||||
logger.info("Starting backup from snapshot: target files %d", len(self.target_sst))
|
||||
start_time= time.time()
|
||||
last_progress_time= start_time
|
||||
progress_size= 0
|
||||
for fname, size in self.target_sst.iteritems():
|
||||
self.do_backup_sst(fname, size)
|
||||
progress_size= progress_size + size
|
||||
elapsed_seconds = time.time() - start_time
|
||||
progress_seconds = time.time() - last_progress_time
|
||||
|
||||
if self.should_show_progress(size):
|
||||
self.show_progress(progress_size, progress_seconds)
|
||||
progress_size=0
|
||||
last_progress_time= time.time()
|
||||
|
||||
if elapsed_seconds > time_limit and self.has_sent_all_sst() is False:
|
||||
logger.info("Snapshot round finished. Elapsed Time: %5.2f. Remaining sst files: %d",
|
||||
elapsed_seconds, len(self.target_sst) - len(self.sent_sst))
|
||||
self.do_cleanup()
|
||||
break;
|
||||
if self.has_sent_all_sst():
|
||||
self.do_backup_final()
|
||||
|
||||
return self
|
||||
|
||||
def should_show_progress(self, size):
|
||||
if int(self.total_sent_sst_size/self.show_progress_size_interval) > int((self.total_sent_sst_size-size)/self.show_progress_size_interval):
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
def show_progress(self, size, seconds):
|
||||
logger.info("Backup Progress: %5.2f%% Sent %6.2f GB of %6.2f GB data, Transfer Speed: %6.2f MB/s",
|
||||
self.total_sent_sst_size*100/self.total_target_sst_size,
|
||||
self.total_sent_sst_size/1024/1024/1024,
|
||||
self.total_target_sst_size/1024/1024/1024,
|
||||
size/seconds/1024/1024)
|
||||
|
||||
def print_backup_report(self):
|
||||
logger.info("Sent %6.2f GB of sst files, %d files in total.",
|
||||
self.total_sent_sst_size/1024/1024/1024,
|
||||
len(self.total_sent_sst))
|
||||
|
||||
def has_sent_all_sst(self):
|
||||
if self.sent_sst_size == self.target_sst_size:
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
class MySQLUtil:
|
||||
@staticmethod
|
||||
def connect(user, password, port, socket=None):
|
||||
if socket:
|
||||
dbh = MySQLdb.Connect(user=user,
|
||||
passwd=password,
|
||||
unix_socket=socket)
|
||||
else:
|
||||
dbh = MySQLdb.Connect(user=user,
|
||||
passwd=password,
|
||||
port=port,
|
||||
host="127.0.0.1")
|
||||
return dbh
|
||||
|
||||
@staticmethod
|
||||
def create_checkpoint(dbh, checkpoint_dir):
|
||||
sql = ("SET GLOBAL rocksdb_create_checkpoint='{0}'"
|
||||
.format(checkpoint_dir))
|
||||
cur= dbh.cursor()
|
||||
cur.execute(sql)
|
||||
cur.close()
|
||||
|
||||
@staticmethod
|
||||
def get_datadir(dbh):
|
||||
sql = "SELECT @@datadir"
|
||||
cur = dbh.cursor()
|
||||
cur.execute(sql)
|
||||
row = cur.fetchone()
|
||||
return row[0]
|
||||
|
||||
|
||||
class BackupRunner:
|
||||
datadir = None
|
||||
start_backup_time = None
|
||||
|
||||
def __init__(self, datadir):
|
||||
self.datadir = datadir
|
||||
self.start_backup_time = time.time()
|
||||
|
||||
def start_backup_round(self, backup_round, prev_backup):
|
||||
def signal_handler(*args):
|
||||
logger.info("Got signal. Exit")
|
||||
if b is not None:
|
||||
logger.info("Cleaning up snapshot directory..")
|
||||
b.do_cleanup()
|
||||
sys.exit(1)
|
||||
|
||||
b = None
|
||||
try:
|
||||
signal.signal(signal.SIGINT, signal_handler)
|
||||
w = None
|
||||
if opts.output_stream:
|
||||
w = StreamWriter(opts.output_stream)
|
||||
else:
|
||||
raise Exception("Currently only streaming backup is supported.")
|
||||
|
||||
snapshot_dir = opts.checkpoint_directory + '/' + str(backup_round)
|
||||
dbh = MySQLUtil.connect(opts.mysql_user,
|
||||
opts.mysql_password,
|
||||
opts.mysql_port,
|
||||
opts.mysql_socket)
|
||||
if not self.datadir:
|
||||
self.datadir = MySQLUtil.get_datadir(dbh)
|
||||
logger.info("Set datadir: %s", self.datadir)
|
||||
logger.info("Creating checkpoint at %s", snapshot_dir)
|
||||
MySQLUtil.create_checkpoint(dbh, snapshot_dir)
|
||||
logger.info("Created checkpoint at %s", snapshot_dir)
|
||||
b = RocksDBBackup(snapshot_dir, w, prev_backup)
|
||||
return b.do_backup_until(opts.checkpoint_interval)
|
||||
except Exception as e:
|
||||
logger.error(e)
|
||||
logger.error(traceback.format_exc())
|
||||
if b is not None:
|
||||
logger.info("Cleaning up snapshot directory.")
|
||||
b.do_cleanup()
|
||||
sys.exit(1)
|
||||
|
||||
def backup_mysql(self):
|
||||
try:
|
||||
w = None
|
||||
if opts.output_stream:
|
||||
w = StreamWriter(opts.output_stream)
|
||||
else:
|
||||
raise Exception("Currently only streaming backup is supported.")
|
||||
b = MySQLBackup(self.datadir, w, opts.skip_check_frm_timestamp,
|
||||
self.start_backup_time)
|
||||
logger.info("Taking MySQL misc backups..")
|
||||
b.process()
|
||||
logger.info("MySQL misc backups done.")
|
||||
except Exception as e:
|
||||
logger.error(e)
|
||||
logger.error(traceback.format_exc())
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
class WDTBackup:
|
||||
datadir = None
|
||||
start_backup_time = None
|
||||
|
||||
def __init__(self, datadir):
|
||||
self.datadir = datadir
|
||||
self.start_backup_time = time.time()
|
||||
|
||||
def cleanup(self, snapshot_dir, server_log):
|
||||
if server_log:
|
||||
server_log.seek(0)
|
||||
logger.info("WDT server log:")
|
||||
logger.info(server_log.read())
|
||||
server_log.close()
|
||||
if snapshot_dir:
|
||||
logger.info("Cleaning up snapshot dir %s", snapshot_dir)
|
||||
shutil.rmtree(snapshot_dir)
|
||||
|
||||
def backup_with_timeout(self, backup_round):
|
||||
def signal_handler(*args):
|
||||
logger.info("Got signal. Exit")
|
||||
self.cleanup(snapshot_dir, server_log)
|
||||
sys.exit(1)
|
||||
|
||||
logger.info("Starting backup round %d", backup_round)
|
||||
snapshot_dir = None
|
||||
server_log = None
|
||||
try:
|
||||
signal.signal(signal.SIGINT, signal_handler)
|
||||
# create rocksdb snapshot
|
||||
snapshot_dir = os.path.join(opts.checkpoint_directory, str(backup_round))
|
||||
dbh = MySQLUtil.connect(opts.mysql_user,
|
||||
opts.mysql_password,
|
||||
opts.mysql_port,
|
||||
opts.mysql_socket)
|
||||
logger.info("Creating checkpoint at %s", snapshot_dir)
|
||||
MySQLUtil.create_checkpoint(dbh, snapshot_dir)
|
||||
logger.info("Created checkpoint at %s", snapshot_dir)
|
||||
|
||||
# get datadir if not provided
|
||||
if not self.datadir:
|
||||
self.datadir = MySQLUtil.get_datadir(dbh)
|
||||
logger.info("Set datadir: %s", self.datadir)
|
||||
|
||||
# create links for misc files
|
||||
link_creator = MiscFilesLinkCreator(self.datadir, snapshot_dir,
|
||||
opts.skip_check_frm_timestamp,
|
||||
self.start_backup_time)
|
||||
link_creator.process()
|
||||
|
||||
current_path = os.path.join(opts.backupdir, "CURRENT")
|
||||
|
||||
# construct receiver cmd, using the data directory as recovery-id.
|
||||
# we delete the current file because it is not append-only, therefore not
|
||||
# resumable.
|
||||
remote_cmd = (
|
||||
"ssh {0} rm -f {1}; "
|
||||
"{2} -directory {3} -enable_download_resumption "
|
||||
"-recovery_id {4} -start_port 0 -abort_after_seconds {5} {6}"
|
||||
).format(opts.destination,
|
||||
current_path,
|
||||
wdt_bin,
|
||||
opts.backupdir,
|
||||
self.datadir,
|
||||
opts.checkpoint_interval,
|
||||
opts.extra_wdt_receiver_options)
|
||||
logger.info("WDT remote cmd %s", remote_cmd)
|
||||
server_log = tempfile.TemporaryFile()
|
||||
remote_process = subprocess.Popen(remote_cmd.split(),
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=server_log)
|
||||
wdt_url = remote_process.stdout.readline().strip()
|
||||
if not wdt_url:
|
||||
raise Exception("Unable to get connection url from wdt receiver")
|
||||
sender_cmd = (
|
||||
"{0} -connection_url \'{1}\' -directory {2} -app_name=myrocks "
|
||||
"-avg_mbytes_per_sec {3} "
|
||||
"-enable_download_resumption -abort_after_seconds {4} {5}"
|
||||
).format(wdt_bin,
|
||||
wdt_url,
|
||||
snapshot_dir,
|
||||
opts.avg_mbytes_per_sec,
|
||||
opts.checkpoint_interval,
|
||||
opts.extra_wdt_sender_options)
|
||||
sender_status = os.system(sender_cmd) >> 8
|
||||
remote_status = remote_process.wait()
|
||||
self.cleanup(snapshot_dir, server_log)
|
||||
# TODO: handle retryable and non-retyable errors differently
|
||||
return (sender_status == 0 and remote_status == 0)
|
||||
|
||||
except Exception as e:
|
||||
logger.error(e)
|
||||
logger.error(traceback.format_exc())
|
||||
self.cleanup(snapshot_dir, server_log)
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
def backup_using_wdt():
|
||||
if not opts.destination:
|
||||
logger.error("Must provide remote destination when using WDT")
|
||||
sys.exit(1)
|
||||
|
||||
# TODO: detect whether WDT is installed
|
||||
logger.info("Backing up myrocks to %s using WDT", opts.destination)
|
||||
wdt_backup = WDTBackup(opts.datadir)
|
||||
finished = False
|
||||
backup_round = 1
|
||||
while not finished:
|
||||
start_time = time.time()
|
||||
finished = wdt_backup.backup_with_timeout(backup_round)
|
||||
end_time = time.time()
|
||||
duration_seconds = end_time - start_time
|
||||
if (not finished) and (duration_seconds < opts.checkpoint_interval):
|
||||
# round finished before timeout
|
||||
sleep_duration = (opts.checkpoint_interval - duration_seconds)
|
||||
logger.info("Sleeping for %f seconds", sleep_duration)
|
||||
time.sleep(sleep_duration)
|
||||
|
||||
backup_round = backup_round + 1
|
||||
logger.info("Finished myrocks backup using WDT")
|
||||
|
||||
|
||||
def init_logger():
|
||||
global logger
|
||||
logger = logging.getLogger('myrocks_hotbackup')
|
||||
logger.setLevel(logging.INFO)
|
||||
h1= logging.StreamHandler(sys.stderr)
|
||||
f = logging.Formatter("%(asctime)s.%(msecs)03d %(levelname)s %(message)s",
|
||||
"%Y-%m-%d %H:%M:%S")
|
||||
h1.setFormatter(f)
|
||||
logger.addHandler(h1)
|
||||
|
||||
backup_wdt_usage = ("Backup using WDT: myrocks_hotbackup "
|
||||
"--user=root --password=pw --stream=wdt "
|
||||
"--checkpoint_dir=<directory where temporary backup hard links "
|
||||
"are created> --destination=<remote host name> --backup_dir="
|
||||
"<remote directory name>. This has to be executed at the src "
|
||||
"host.")
|
||||
backup_usage= "Backup: set -o pipefail; myrocks_hotbackup --user=root --password=pw --port=3306 --checkpoint_dir=<directory where temporary backup hard links are created> | ssh -o NoneEnabled=yes remote_server 'tar -xi -C <directory on remote server where backups will be sent>' . You need to execute backup command on a server where you take backups."
|
||||
move_back_usage= "Move-Back: myrocks_hotbackup --move_back --datadir=<dest mysql datadir> --rocksdb_datadir=<dest rocksdb datadir> --rocksdb_waldir=<dest rocksdb wal dir> --backup_dir=<where backup files are stored> . You need to execute move-back command on a server where backup files are sent."
|
||||
|
||||
|
||||
def parse_options():
|
||||
global opts
|
||||
parser = OptionParser(usage = "\n\n" + backup_usage + "\n\n" + \
|
||||
backup_wdt_usage + "\n\n" + move_back_usage)
|
||||
parser.add_option('-i', '--interval', type='int', dest='checkpoint_interval',
|
||||
default=300,
|
||||
help='Number of seconds to renew checkpoint')
|
||||
parser.add_option('-c', '--checkpoint_dir', type='string', dest='checkpoint_directory',
|
||||
default='/data/mysql/backup/snapshot',
|
||||
help='Local directory name where checkpoints will be created.')
|
||||
parser.add_option('-d', '--datadir', type='string', dest='datadir',
|
||||
default=None,
|
||||
help='backup mode: src MySQL datadir. move_back mode: dest MySQL datadir')
|
||||
parser.add_option('-s', '--stream', type='string', dest='output_stream',
|
||||
default='tar',
|
||||
help='Setting streaming backup options. Currently tar, WDT '
|
||||
'and xbstream are supported. Default is tar')
|
||||
parser.add_option('--destination', type='string', dest='destination',
|
||||
default='',
|
||||
help='Remote server name. Only used for WDT mode so far.')
|
||||
parser.add_option('--avg_mbytes_per_sec', type='int',
|
||||
dest='avg_mbytes_per_sec',
|
||||
default=500,
|
||||
help='Average backup rate in MBytes/sec. WDT only.')
|
||||
parser.add_option('--extra_wdt_sender_options', type='string',
|
||||
dest='extra_wdt_sender_options',
|
||||
default='',
|
||||
help='Extra options for WDT sender')
|
||||
parser.add_option('--extra_wdt_receiver_options', type='string',
|
||||
dest='extra_wdt_receiver_options',
|
||||
default='',
|
||||
help='Extra options for WDT receiver')
|
||||
parser.add_option('-u', '--user', type='string', dest='mysql_user',
|
||||
default='root',
|
||||
help='MySQL user name')
|
||||
parser.add_option('-p', '--password', type='string', dest='mysql_password',
|
||||
default='',
|
||||
help='MySQL password name')
|
||||
parser.add_option('-P', '--port', type='int', dest='mysql_port',
|
||||
default=3306,
|
||||
help='MySQL port number')
|
||||
parser.add_option('-S', '--socket', type='string', dest='mysql_socket',
|
||||
default=None,
|
||||
help='MySQL socket path. Takes precedence over --port.')
|
||||
parser.add_option('-m', '--move_back', action='store_true', dest='move_back',
|
||||
default=False,
|
||||
help='Moving MyRocks backup files to proper locations.')
|
||||
parser.add_option('-r', '--rocksdb_datadir', type='string', dest='rocksdb_datadir',
|
||||
default=None,
|
||||
help='RocksDB target data directory where backup data files will be moved. Must be empty.')
|
||||
parser.add_option('-w', '--rocksdb_waldir', type='string', dest='rocksdb_waldir',
|
||||
default=None,
|
||||
help='RocksDB target data directory where backup wal files will be moved. Must be empty.')
|
||||
parser.add_option('-b', '--backup_dir', type='string', dest='backupdir',
|
||||
default=None,
|
||||
help='backup mode for WDT: Remote directory to store '
|
||||
'backup. move_back mode: Locations where backup '
|
||||
'files are stored.')
|
||||
parser.add_option('-f', '--skip_check_frm_timestamp',
|
||||
dest='skip_check_frm_timestamp',
|
||||
action='store_true', default=False,
|
||||
help='skipping to check if frm files are updated after starting backup.')
|
||||
parser.add_option('-D', '--debug_signal_file', type='string', dest='debug_signal_file',
|
||||
default=None,
|
||||
help='debugging purpose: waiting until the specified file is created')
|
||||
|
||||
opts, args = parser.parse_args()
|
||||
|
||||
|
||||
def create_moveback_dir(directory):
|
||||
if not os.path.exists(directory):
|
||||
os.makedirs(directory)
|
||||
else:
|
||||
for f in os.listdir(directory):
|
||||
logger.error("Directory %s has file or directory %s!", directory, f)
|
||||
raise
|
||||
|
||||
def print_move_back_usage():
|
||||
logger.warning(move_back_usage)
|
||||
|
||||
def move_back():
|
||||
if opts.rocksdb_datadir is None or opts.rocksdb_waldir is None or opts.backupdir is None or opts.datadir is None:
|
||||
print_move_back_usage()
|
||||
sys.exit()
|
||||
create_moveback_dir(opts.datadir)
|
||||
create_moveback_dir(opts.rocksdb_datadir)
|
||||
create_moveback_dir(opts.rocksdb_waldir)
|
||||
|
||||
os.chdir(opts.backupdir)
|
||||
for f in os.listdir(opts.backupdir):
|
||||
if os.path.isfile(os.path.join(opts.backupdir,f)):
|
||||
if f.endswith(rocksdb_wal_suffix):
|
||||
shutil.move(f, opts.rocksdb_waldir)
|
||||
elif f.endswith(rocksdb_data_suffix) or is_manifest(f):
|
||||
shutil.move(f, opts.rocksdb_datadir)
|
||||
else:
|
||||
shutil.move(f, opts.datadir)
|
||||
else: #directory
|
||||
if f.endswith('.rocksdb'):
|
||||
continue
|
||||
shutil.move(f, opts.datadir)
|
||||
|
||||
def start_backup():
|
||||
logger.info("Starting backup.")
|
||||
runner = BackupRunner(opts.datadir)
|
||||
b = None
|
||||
backup_round= 1
|
||||
while True:
|
||||
b = runner.start_backup_round(backup_round, b)
|
||||
backup_round = backup_round + 1
|
||||
if b.finished is True:
|
||||
b.print_backup_report()
|
||||
logger.info("RocksDB Backup Done.")
|
||||
break
|
||||
if opts.debug_signal_file:
|
||||
while not os.path.exists(opts.debug_signal_file):
|
||||
logger.info("Waiting until %s is created..", opts.debug_signal_file)
|
||||
time.sleep(1)
|
||||
runner.backup_mysql()
|
||||
logger.info("All Backups Done.")
|
||||
|
||||
|
||||
def main():
|
||||
parse_options()
|
||||
init_logger()
|
||||
|
||||
if opts.move_back is True:
|
||||
move_back()
|
||||
elif opts.output_stream == 'wdt':
|
||||
backup_using_wdt()
|
||||
else:
|
||||
start_backup()
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -1041,8 +1041,8 @@ static bool ParseUrl ( CSphSEShare * share, TABLE * table, bool bCreate )
|
|||
bool bOk = true;
|
||||
bool bQL = false;
|
||||
char * sScheme = NULL;
|
||||
char * sHost = SPHINXAPI_DEFAULT_HOST;
|
||||
char * sIndex = SPHINXAPI_DEFAULT_INDEX;
|
||||
char * sHost = (char*) SPHINXAPI_DEFAULT_HOST;
|
||||
char * sIndex = (char*) SPHINXAPI_DEFAULT_INDEX;
|
||||
int iPort = SPHINXAPI_DEFAULT_PORT;
|
||||
|
||||
// parse connection string, if any
|
||||
|
@ -1068,12 +1068,12 @@ static bool ParseUrl ( CSphSEShare * share, TABLE * table, bool bCreate )
|
|||
sHost--; // reuse last slash
|
||||
iPort = 0;
|
||||
if (!( sIndex = strrchr ( sHost, ':' ) ))
|
||||
sIndex = SPHINXAPI_DEFAULT_INDEX;
|
||||
sIndex = (char*) SPHINXAPI_DEFAULT_INDEX;
|
||||
else
|
||||
{
|
||||
*sIndex++ = '\0';
|
||||
if ( !*sIndex )
|
||||
sIndex = SPHINXAPI_DEFAULT_INDEX;
|
||||
sIndex = (char*) SPHINXAPI_DEFAULT_INDEX;
|
||||
}
|
||||
bOk = true;
|
||||
break;
|
||||
|
@ -1095,11 +1095,11 @@ static bool ParseUrl ( CSphSEShare * share, TABLE * table, bool bCreate )
|
|||
if ( sIndex )
|
||||
*sIndex++ = '\0';
|
||||
else
|
||||
sIndex = SPHINXAPI_DEFAULT_INDEX;
|
||||
sIndex = (char*) SPHINXAPI_DEFAULT_INDEX;
|
||||
|
||||
iPort = atoi(sPort);
|
||||
if ( !iPort )
|
||||
iPort = SPHINXAPI_DEFAULT_PORT;
|
||||
iPort = SPHINXAPI_DEFAULT_PORT;
|
||||
}
|
||||
} else
|
||||
{
|
||||
|
@ -1107,7 +1107,7 @@ static bool ParseUrl ( CSphSEShare * share, TABLE * table, bool bCreate )
|
|||
if ( sIndex )
|
||||
*sIndex++ = '\0';
|
||||
else
|
||||
sIndex = SPHINXAPI_DEFAULT_INDEX;
|
||||
sIndex = (char*) SPHINXAPI_DEFAULT_INDEX;
|
||||
}
|
||||
bOk = true;
|
||||
break;
|
||||
|
@ -1303,8 +1303,8 @@ CSphSEQuery::CSphSEQuery ( const char * sQuery, int iLength, const char * sIndex
|
|||
, m_sGeoLongAttr ( "" )
|
||||
, m_fGeoLatitude ( 0.0f )
|
||||
, m_fGeoLongitude ( 0.0f )
|
||||
, m_sComment ( "" )
|
||||
, m_sSelect ( "*" )
|
||||
, m_sComment ( (char*) "" )
|
||||
, m_sSelect ( (char*) "*" )
|
||||
|
||||
, m_pBuf ( NULL )
|
||||
, m_pCur ( NULL )
|
||||
|
|
|
@ -40,6 +40,11 @@ Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved.
|
|||
|
||||
#include <portability/toku_config.h>
|
||||
|
||||
#ifdef HAVE_valgrind
|
||||
#undef USE_VALGRIND
|
||||
#define USE_VALGRIND 1
|
||||
#endif
|
||||
|
||||
#if defined(__linux__) && USE_VALGRIND
|
||||
|
||||
# include <valgrind/helgrind.h>
|
||||
|
|
|
@ -3372,6 +3372,8 @@ evict_from_pool:
|
|||
mutex_enter(&buf_pool->LRU_list_mutex);
|
||||
buf_block_unfix(fix_block);
|
||||
mutex_exit(&buf_pool->LRU_list_mutex);
|
||||
|
||||
*err = DB_PAGE_CORRUPTED;
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ Created 1/20/1994 Heikki Tuuri
|
|||
|
||||
#define INNODB_VERSION_MAJOR 5
|
||||
#define INNODB_VERSION_MINOR 6
|
||||
#define INNODB_VERSION_BUGFIX 36
|
||||
#define INNODB_VERSION_BUGFIX 38
|
||||
|
||||
#ifndef PERCONA_INNODB_VERSION
|
||||
#define PERCONA_INNODB_VERSION 83.0
|
||||
|
|
|
@ -5372,6 +5372,7 @@ end:
|
|||
trx_rollback_to_savepoint(trx, NULL);
|
||||
trx->error_state = DB_SUCCESS;
|
||||
}
|
||||
table->data_dir_path= NULL;
|
||||
}
|
||||
|
||||
funct_exit:
|
||||
|
|
Loading…
Reference in a new issue