1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Merge 10.3 into 10.4

This commit is contained in:
Marko Mäkelä
2018-10-18 12:22:48 +03:00
19 changed files with 503 additions and 113 deletions

View File

@@ -24,11 +24,19 @@ connection master;
disable_warnings;
DROP TABLE IF EXISTS t1;
enable_warnings;
if ($source_temp_format)
{
--eval SET @@global.mysql56_temporal_format= $source_temp_format
}
eval CREATE TABLE t1(
pk INT NOT NULL PRIMARY KEY,
a $source_type
) ENGINE=$engine_type;
sync_slave_with_master;
if ($target_temp_format)
{
--eval SET @@global.mysql56_temporal_format= $source_temp_format
}
eval ALTER TABLE t1 MODIFY a $target_type;
connection master;

View File

@@ -1177,5 +1177,96 @@ source suite/rpl/include/check_type.inc;
--echo # End of MDEV-15833
--echo #
--echo # MDEV-17098 DATE <-> DATETIME
--echo #
# NON-LOSSY
let $source_temp_format= 1; # irrelevant with DATE though
let $source_type= DATE;
let $target_temp_format= 1; # to produce MYSQL_TYPE_DATETIME2
let $target_type= DATETIME(6);
let $source_value= '2018-10-11';
let $target_value= '2018-10-11 00:00:00.000000';
let $can_convert = $if_is_non_lossy;
source suite/rpl/include/check_type.inc;
let $source_temp_format= 1;
let $source_type= DATE;
let $target_temp_format= 0; # to produce "old" MYSQL_TYPE_DATETIME
let $target_type= DATETIME(6);
let $source_value= '2018-10-11';
let $target_value= '2018-10-11 00:00:00.000000';
let $can_convert = $if_is_non_lossy;
source suite/rpl/include/check_type.inc;
let $source_temp_format= 0;
let $source_type= DATE;
let $target_temp_format= 1;
let $target_type= DATETIME(6);
let $source_value= '2018-10-11';
let $target_value= '2018-10-11 00:00:00.000000';
let $can_convert = $if_is_non_lossy;
source suite/rpl/include/check_type.inc;
# zero-precision test version
let $source_temp_format= 1;
let $source_type= DATE;
let $target_temp_format= 1;
let $target_type= DATETIME(0);
let $source_value= '2018-10-11';
let $target_value= '2018-10-11 00:00:00';
let $can_convert = $if_is_non_lossy;
source suite/rpl/include/check_type.inc;
# LOSSY
let $source_temp_format= 1;
let $source_type= DATETIME(6);
let $target_temp_format= 1;
let $target_type= DATE;
let $source_value= '2018-10-11 00:00:00.000001';
let $target_value= '2018-10-11';
let $can_convert = $if_is_lossy;
source suite/rpl/include/check_type.inc;
let $source_temp_format= 1;
let $source_type= DATETIME(6);
let $target_temp_format= 0;
let $target_type= DATE;
let $source_value= '2018-10-11 00:00:00.000001';
let $target_value= '2018-10-11';
let $can_convert = $if_is_lossy;
source suite/rpl/include/check_type.inc;
# zero-precision test version
let $source_temp_format= 1;
let $source_type= DATETIME(0);
let $target_temp_format= 1;
let $target_type= DATE;
let $source_value= '2018-10-11 00:00:00';
let $target_value= '2018-10-11';
let $can_convert = $if_is_lossy;
source suite/rpl/include/check_type.inc;
# TODO: fix MDEV-17394 Row-based replication DATETIME(m) to
# DATETIME(s) does not work or incorrect
#
#
# let $source_temp_format= 0;
# let $source_type= DATETIME(6);
# let $target_temp_format= 1;
# let $target_type= DATE;
# ...
# let $source_temp_format= 0;
# let $source_type= DATETIME(6);
# let $target_temp_format= 0;
# let $target_type= DATE;
# ...
let $source_temp_format=;
let $target_temp_format=;
--echo # End of MDEV-17098
--source include/rpl_reset.inc
enable_query_log;

View File

@@ -47,6 +47,10 @@ SET GLOBAL SLAVE_TYPE_CONVERSIONS='';
# MDEV-15833 Row format replication between LONGBLOB and MEDIUMBLOB does not work for long values
#
# End of MDEV-15833
#
# MDEV-17098 DATE <-> DATETIME
#
# End of MDEV-17098
include/rpl_reset.inc
connection slave;
SET GLOBAL SLAVE_TYPE_CONVERSIONS='ALL_NON_LOSSY';
@@ -59,6 +63,10 @@ SET GLOBAL SLAVE_TYPE_CONVERSIONS='ALL_NON_LOSSY';
# MDEV-15833 Row format replication between LONGBLOB and MEDIUMBLOB does not work for long values
#
# End of MDEV-15833
#
# MDEV-17098 DATE <-> DATETIME
#
# End of MDEV-17098
include/rpl_reset.inc
connection slave;
SET GLOBAL SLAVE_TYPE_CONVERSIONS='ALL_LOSSY';
@@ -71,6 +79,10 @@ SET GLOBAL SLAVE_TYPE_CONVERSIONS='ALL_LOSSY';
# MDEV-15833 Row format replication between LONGBLOB and MEDIUMBLOB does not work for long values
#
# End of MDEV-15833
#
# MDEV-17098 DATE <-> DATETIME
#
# End of MDEV-17098
include/rpl_reset.inc
connection slave;
SET GLOBAL SLAVE_TYPE_CONVERSIONS='ALL_LOSSY,ALL_NON_LOSSY';
@@ -83,6 +95,10 @@ SET GLOBAL SLAVE_TYPE_CONVERSIONS='ALL_LOSSY,ALL_NON_LOSSY';
# MDEV-15833 Row format replication between LONGBLOB and MEDIUMBLOB does not work for long values
#
# End of MDEV-15833
#
# MDEV-17098 DATE <-> DATETIME
#
# End of MDEV-17098
include/rpl_reset.inc
connection slave;
**** Result of conversions ****
@@ -244,6 +260,13 @@ LONGBLOB TINYBLOB <Correct error>
LONGBLOB BLOB <Correct error>
LONGBLOB MEDIUMBLOB <Correct error>
LONGBLOB VARBINARY(65500 <Correct error>
DATE DATETIME(6) <Correct error>
DATE DATETIME(6) <Correct error>
DATE DATETIME(6) <Correct error>
DATE DATETIME(0) <Correct error>
DATETIME(6) DATE <Correct error>
DATETIME(6) DATE <Correct error>
DATETIME(0) DATE <Correct error>
TINYBLOB TINYBLOB ALL_NON_LOSSY <Correct value>
TINYBLOB BLOB ALL_NON_LOSSY <Correct value>
TINYBLOB MEDIUMBLOB ALL_NON_LOSSY <Correct value>
@@ -401,6 +424,13 @@ LONGBLOB TINYBLOB ALL_NON_LOSSY <Correct error>
LONGBLOB BLOB ALL_NON_LOSSY <Correct error>
LONGBLOB MEDIUMBLOB ALL_NON_LOSSY <Correct error>
LONGBLOB VARBINARY(65500 ALL_NON_LOSSY <Correct error>
DATE DATETIME(6) ALL_NON_LOSSY <Correct value>
DATE DATETIME(6) ALL_NON_LOSSY <Correct value>
DATE DATETIME(6) ALL_NON_LOSSY <Correct value>
DATE DATETIME(0) ALL_NON_LOSSY <Correct value>
DATETIME(6) DATE ALL_NON_LOSSY <Correct error>
DATETIME(6) DATE ALL_NON_LOSSY <Correct error>
DATETIME(0) DATE ALL_NON_LOSSY <Correct error>
TINYBLOB TINYBLOB ALL_LOSSY <Correct value>
TINYBLOB BLOB ALL_LOSSY <Correct error>
TINYBLOB MEDIUMBLOB ALL_LOSSY <Correct error>
@@ -558,6 +588,13 @@ LONGBLOB TINYBLOB ALL_LOSSY <Correct value>
LONGBLOB BLOB ALL_LOSSY <Correct value>
LONGBLOB MEDIUMBLOB ALL_LOSSY <Correct value>
LONGBLOB VARBINARY(65500 ALL_LOSSY <Correct value>
DATE DATETIME(6) ALL_LOSSY <Correct error>
DATE DATETIME(6) ALL_LOSSY <Correct error>
DATE DATETIME(6) ALL_LOSSY <Correct error>
DATE DATETIME(0) ALL_LOSSY <Correct error>
DATETIME(6) DATE ALL_LOSSY <Correct value>
DATETIME(6) DATE ALL_LOSSY <Correct value>
DATETIME(0) DATE ALL_LOSSY <Correct value>
TINYBLOB TINYBLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value>
TINYBLOB BLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value>
TINYBLOB MEDIUMBLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value>
@@ -715,6 +752,13 @@ LONGBLOB TINYBLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value>
LONGBLOB BLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value>
LONGBLOB MEDIUMBLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value>
LONGBLOB VARBINARY(65500 ALL_LOSSY,ALL_NON_LOSSY <Correct value>
DATE DATETIME(6) ALL_LOSSY,ALL_NON_LOSSY <Correct value>
DATE DATETIME(6) ALL_LOSSY,ALL_NON_LOSSY <Correct value>
DATE DATETIME(6) ALL_LOSSY,ALL_NON_LOSSY <Correct value>
DATE DATETIME(0) ALL_LOSSY,ALL_NON_LOSSY <Correct value>
DATETIME(6) DATE ALL_LOSSY,ALL_NON_LOSSY <Correct value>
DATETIME(6) DATE ALL_LOSSY,ALL_NON_LOSSY <Correct value>
DATETIME(0) DATE ALL_LOSSY,ALL_NON_LOSSY <Correct value>
DROP TABLE type_conversions;
call mtr.add_suppression("Slave SQL.*Column 1 of table .test.t1. cannot be converted from type.* error.* 1677");
connection master;