Skip to content
Permalink
Browse files
MDEV-15821 Row format replication from LONGBLOB COMPRESSED to LONGBLO…
…B does not work
  • Loading branch information
abarkov committed Apr 10, 2018
1 parent 9bd3af9 commit 9e9ea4f
Show file tree
Hide file tree
Showing 5 changed files with 375 additions and 10 deletions.
@@ -7,9 +7,9 @@ TestNo INT AUTO_INCREMENT PRIMARY KEY,
Source TEXT,
Target TEXT,
Flags TEXT,
On_Master TEXT,
On_Slave TEXT,
Expected TEXT,
On_Master LONGTEXT,
On_Slave LONGTEXT,
Expected LONGTEXT,
Compare INT,
Error TEXT);
SELECT @@global.slave_type_conversions;
@@ -39,18 +39,34 @@ ALL_LOSSY,ALL_NON_LOSSY
connection slave;
SET GLOBAL SLAVE_TYPE_CONVERSIONS='';
**** Running tests with @@SLAVE_TYPE_CONVERSIONS = '' ****
#
# MDEV-15821 Row format replication from LONGBLOB COMPRESSED to LONGBLOB does not work
#
# End of MDEV-15833
include/rpl_reset.inc
connection slave;
SET GLOBAL SLAVE_TYPE_CONVERSIONS='ALL_NON_LOSSY';
**** Running tests with @@SLAVE_TYPE_CONVERSIONS = 'ALL_NON_LOSSY' ****
#
# MDEV-15821 Row format replication from LONGBLOB COMPRESSED to LONGBLOB does not work
#
# End of MDEV-15833
include/rpl_reset.inc
connection slave;
SET GLOBAL SLAVE_TYPE_CONVERSIONS='ALL_LOSSY';
**** Running tests with @@SLAVE_TYPE_CONVERSIONS = 'ALL_LOSSY' ****
#
# MDEV-15821 Row format replication from LONGBLOB COMPRESSED to LONGBLOB does not work
#
# End of MDEV-15833
include/rpl_reset.inc
connection slave;
SET GLOBAL SLAVE_TYPE_CONVERSIONS='ALL_LOSSY,ALL_NON_LOSSY';
**** Running tests with @@SLAVE_TYPE_CONVERSIONS = 'ALL_LOSSY,ALL_NON_LOSSY' ****
#
# MDEV-15821 Row format replication from LONGBLOB COMPRESSED to LONGBLOB does not work
#
# End of MDEV-15833
include/rpl_reset.inc
connection slave;
**** Result of conversions ****
@@ -176,6 +192,26 @@ BIT(5) BIT(6) <Correct error>
BIT(6) BIT(5) <Correct error>
BIT(5) BIT(12) <Correct error>
BIT(12) BIT(5) <Correct error>
TINYBLOB COMPRE TINYBLOB <Correct error>
TINYBLOB COMPRE BLOB <Correct error>
TINYBLOB COMPRE MEDIUMBLOB <Correct error>
TINYBLOB COMPRE LONGBLOB <Correct error>
TINYBLOB COMPRE VARBINARY(255) <Correct error>
BLOB COMPRESSED TINYBLOB <Correct error>
BLOB COMPRESSED BLOB <Correct error>
BLOB COMPRESSED MEDIUMBLOB <Correct error>
BLOB COMPRESSED LONGBLOB <Correct error>
BLOB COMPRESSED VARBINARY(65500 <Correct error>
MEDIUMBLOB COMP TINYBLOB <Correct error>
MEDIUMBLOB COMP BLOB <Correct error>
MEDIUMBLOB COMP MEDIUMBLOB <Correct error>
MEDIUMBLOB COMP LONGBLOB <Correct error>
MEDIUMBLOB COMP VARBINARY(65500 <Correct error>
LONGBLOB COMPRE TINYBLOB <Correct error>
LONGBLOB COMPRE BLOB <Correct error>
LONGBLOB COMPRE MEDIUMBLOB <Correct error>
LONGBLOB COMPRE LONGBLOB <Correct error>
LONGBLOB COMPRE VARBINARY(65500 <Correct error>
TINYBLOB TINYBLOB ALL_NON_LOSSY <Correct value>
TINYBLOB BLOB ALL_NON_LOSSY <Correct value>
TINYBLOB MEDIUMBLOB ALL_NON_LOSSY <Correct value>
@@ -297,6 +333,26 @@ BIT(5) BIT(6) ALL_NON_LOSSY <Correct value>
BIT(6) BIT(5) ALL_NON_LOSSY <Correct error>
BIT(5) BIT(12) ALL_NON_LOSSY <Correct value>
BIT(12) BIT(5) ALL_NON_LOSSY <Correct error>
TINYBLOB COMPRE TINYBLOB ALL_NON_LOSSY <Correct value>
TINYBLOB COMPRE BLOB ALL_NON_LOSSY <Correct value>
TINYBLOB COMPRE MEDIUMBLOB ALL_NON_LOSSY <Correct value>
TINYBLOB COMPRE LONGBLOB ALL_NON_LOSSY <Correct value>
TINYBLOB COMPRE VARBINARY(255) ALL_NON_LOSSY <Correct value>
BLOB COMPRESSED TINYBLOB ALL_NON_LOSSY <Correct error>
BLOB COMPRESSED BLOB ALL_NON_LOSSY <Correct value>
BLOB COMPRESSED MEDIUMBLOB ALL_NON_LOSSY <Correct value>
BLOB COMPRESSED LONGBLOB ALL_NON_LOSSY <Correct value>
BLOB COMPRESSED VARBINARY(65500 ALL_NON_LOSSY <Correct error>
MEDIUMBLOB COMP TINYBLOB ALL_NON_LOSSY <Correct error>
MEDIUMBLOB COMP BLOB ALL_NON_LOSSY <Correct error>
MEDIUMBLOB COMP MEDIUMBLOB ALL_NON_LOSSY <Correct value>
MEDIUMBLOB COMP LONGBLOB ALL_NON_LOSSY <Correct value>
MEDIUMBLOB COMP VARBINARY(65500 ALL_NON_LOSSY <Correct error>
LONGBLOB COMPRE TINYBLOB ALL_NON_LOSSY <Correct error>
LONGBLOB COMPRE BLOB ALL_NON_LOSSY <Correct error>
LONGBLOB COMPRE MEDIUMBLOB ALL_NON_LOSSY <Correct error>
LONGBLOB COMPRE LONGBLOB ALL_NON_LOSSY <Correct value>
LONGBLOB COMPRE VARBINARY(65500 ALL_NON_LOSSY <Correct error>
TINYBLOB TINYBLOB ALL_LOSSY <Correct value>
TINYBLOB BLOB ALL_LOSSY <Correct error>
TINYBLOB MEDIUMBLOB ALL_LOSSY <Correct error>
@@ -418,6 +474,26 @@ BIT(5) BIT(6) ALL_LOSSY <Correct error>
BIT(6) BIT(5) ALL_LOSSY <Correct value>
BIT(5) BIT(12) ALL_LOSSY <Correct error>
BIT(12) BIT(5) ALL_LOSSY <Correct value>
TINYBLOB COMPRE TINYBLOB ALL_LOSSY <Correct error>
TINYBLOB COMPRE BLOB ALL_LOSSY <Correct error>
TINYBLOB COMPRE MEDIUMBLOB ALL_LOSSY <Correct error>
TINYBLOB COMPRE LONGBLOB ALL_LOSSY <Correct error>
TINYBLOB COMPRE VARBINARY(255) ALL_LOSSY <Correct error>
BLOB COMPRESSED TINYBLOB ALL_LOSSY <Correct value>
BLOB COMPRESSED BLOB ALL_LOSSY <Correct error>
BLOB COMPRESSED MEDIUMBLOB ALL_LOSSY <Correct error>
BLOB COMPRESSED LONGBLOB ALL_LOSSY <Correct error>
BLOB COMPRESSED VARBINARY(65500 ALL_LOSSY <Correct value>
MEDIUMBLOB COMP TINYBLOB ALL_LOSSY <Correct value>
MEDIUMBLOB COMP BLOB ALL_LOSSY <Correct value>
MEDIUMBLOB COMP MEDIUMBLOB ALL_LOSSY <Correct error>
MEDIUMBLOB COMP LONGBLOB ALL_LOSSY <Correct error>
MEDIUMBLOB COMP VARBINARY(65500 ALL_LOSSY <Correct value>
LONGBLOB COMPRE TINYBLOB ALL_LOSSY <Correct value>
LONGBLOB COMPRE BLOB ALL_LOSSY <Correct value>
LONGBLOB COMPRE MEDIUMBLOB ALL_LOSSY <Correct value>
LONGBLOB COMPRE LONGBLOB ALL_LOSSY <Correct error>
LONGBLOB COMPRE VARBINARY(65500 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>
@@ -539,6 +615,26 @@ BIT(5) BIT(6) ALL_LOSSY,ALL_NON_LOSSY <Correct value>
BIT(6) BIT(5) ALL_LOSSY,ALL_NON_LOSSY <Correct value>
BIT(5) BIT(12) ALL_LOSSY,ALL_NON_LOSSY <Correct value>
BIT(12) BIT(5) ALL_LOSSY,ALL_NON_LOSSY <Correct value>
TINYBLOB COMPRE TINYBLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value>
TINYBLOB COMPRE BLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value>
TINYBLOB COMPRE MEDIUMBLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value>
TINYBLOB COMPRE LONGBLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value>
TINYBLOB COMPRE VARBINARY(255) ALL_LOSSY,ALL_NON_LOSSY <Correct value>
BLOB COMPRESSED TINYBLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value>
BLOB COMPRESSED BLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value>
BLOB COMPRESSED MEDIUMBLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value>
BLOB COMPRESSED LONGBLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value>
BLOB COMPRESSED VARBINARY(65500 ALL_LOSSY,ALL_NON_LOSSY <Correct value>
MEDIUMBLOB COMP TINYBLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value>
MEDIUMBLOB COMP BLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value>
MEDIUMBLOB COMP MEDIUMBLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value>
MEDIUMBLOB COMP LONGBLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value>
MEDIUMBLOB COMP VARBINARY(65500 ALL_LOSSY,ALL_NON_LOSSY <Correct value>
LONGBLOB COMPRE TINYBLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value>
LONGBLOB COMPRE BLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value>
LONGBLOB COMPRE MEDIUMBLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value>
LONGBLOB COMPRE LONGBLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value>
LONGBLOB COMPRE VARBINARY(65500 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;
@@ -14,9 +14,9 @@ CREATE TABLE type_conversions (
Source TEXT,
Target TEXT,
Flags TEXT,
On_Master TEXT,
On_Slave TEXT,
Expected TEXT,
On_Master LONGTEXT,
On_Slave LONGTEXT,
Expected LONGTEXT,
Compare INT,
Error TEXT);

@@ -876,5 +876,175 @@ let $can_convert = $if_is_lossy;
source suite/rpl/include/check_type.inc;


--echo #
--echo # MDEV-15821 Row format replication from LONGBLOB COMPRESSED to LONGBLOB does not work
--echo #

# This is to make sure that the compressed data is longer than 64K
SET column_compression_threshold=16*256*256;

# TINYBLOB COMPRESSED

let $source_type= TINYBLOB COMPRESSED;
let $target_type= TINYBLOB;
let $source_value= REPEAT('a',250);
let $target_value= REPEAT('a',250);
let $can_convert = $if_is_non_lossy;
source suite/rpl/include/check_type.inc;

let $source_type= TINYBLOB COMPRESSED;
let $target_type= BLOB;
let $source_value= REPEAT('a',250);
let $target_value= REPEAT('a',250);
let $can_convert = $if_is_non_lossy;
source suite/rpl/include/check_type.inc;

let $source_type= TINYBLOB COMPRESSED;
let $target_type= MEDIUMBLOB;
let $source_value= REPEAT('a',250);
let $target_value= REPEAT('a',250);
let $can_convert = $if_is_non_lossy;
source suite/rpl/include/check_type.inc;

let $source_type= TINYBLOB COMPRESSED;
let $target_type= LONGBLOB;
let $source_value= REPEAT('a',250);
let $target_value= REPEAT('a',250);
let $can_convert = $if_is_non_lossy;
source suite/rpl/include/check_type.inc;

let $source_type= TINYBLOB COMPRESSED;
let $target_type= VARBINARY(255);
let $source_value= REPEAT('a',250);
let $target_value= REPEAT('a',250);
let $can_convert = $if_is_non_lossy;
source suite/rpl/include/check_type.inc;


# BLOB COMPRESSED

let $source_type= BLOB COMPRESSED;
let $target_type= TINYBLOB;
let $source_value= REPEAT('a',64000);
let $target_value= REPEAT('a',255);
let $can_convert = $if_is_lossy;
source suite/rpl/include/check_type.inc;

let $source_type= BLOB COMPRESSED;
let $target_type= BLOB;
let $source_value= REPEAT('a',64000);
let $target_value= REPEAT('a',64000);
let $can_convert = $if_is_non_lossy;
source suite/rpl/include/check_type.inc;

let $source_type= BLOB COMPRESSED;
let $target_type= MEDIUMBLOB;
let $source_value= REPEAT('a',64000);
let $target_value= REPEAT('a',64000);
let $can_convert = $if_is_non_lossy;
source suite/rpl/include/check_type.inc;

let $source_type= BLOB COMPRESSED;
let $target_type= LONGBLOB;
let $source_value= REPEAT('a',64000);
let $target_value= REPEAT('a',64000);
let $can_convert = $if_is_non_lossy;
source suite/rpl/include/check_type.inc;

let $source_type= BLOB COMPRESSED;
let $target_type= VARBINARY(65500);
let $source_value= REPEAT('a',65500);
let $target_value= REPEAT('a',65500);
let $can_convert = $if_is_lossy;
source suite/rpl/include/check_type.inc;


# MEDIUMBLOB COMPRESSED

let $source_type= MEDIUMBLOB COMPRESSED;
let $target_type= TINYBLOB;
let $source_value= REPEAT('a',66000);
let $target_value= REPEAT('a',255);
let $can_convert = $if_is_lossy;
source suite/rpl/include/check_type.inc;

# This failed before the fix
let $source_type= MEDIUMBLOB COMPRESSED;
let $target_type= BLOB;
let $source_value= REPEAT('a',66000);
let $target_value= REPEAT('a',65535);
let $can_convert = $if_is_lossy;
source suite/rpl/include/check_type.inc;

# This failed before the fix
let $source_type= MEDIUMBLOB COMPRESSED;
let $target_type= MEDIUMBLOB;
let $source_value= REPEAT('a',66000);
let $target_value= REPEAT('a',66000);
let $can_convert = $if_is_non_lossy;
source suite/rpl/include/check_type.inc;

# This failed before the fix
let $source_type= MEDIUMBLOB COMPRESSED;
let $target_type= LONGBLOB;
let $source_value= REPEAT('a',66000);
let $target_value= REPEAT('a',66000);
let $can_convert = $if_is_non_lossy;
source suite/rpl/include/check_type.inc;

# This failed before the fix
let $source_type= MEDIUMBLOB COMPRESSED;
let $target_type= VARBINARY(65500);
let $source_value= REPEAT('a',66000);
let $target_value= REPEAT('a',65500);
let $can_convert = $if_is_lossy;
source suite/rpl/include/check_type.inc;


# LONGBLOB COMPRESSED

let $source_type= LONGBLOB COMPRESSED;
let $target_type= TINYBLOB;
let $source_value= REPEAT('a',66000);
let $target_value= REPEAT('a',255);
let $can_convert = $if_is_lossy;
source suite/rpl/include/check_type.inc;

# This failed before the fix
let $source_type= LONGBLOB COMPRESSED;
let $target_type= BLOB;
let $source_value= REPEAT('a',66000);
let $target_value= REPEAT('a',65535);
let $can_convert = $if_is_lossy;
source suite/rpl/include/check_type.inc;

# This failed before the fix
let $source_type= LONGBLOB COMPRESSED;
let $target_type= MEDIUMBLOB;
let $source_value= REPEAT('a',66000);
let $target_value= REPEAT('a',66000);
let $can_convert = $if_is_lossy;
source suite/rpl/include/check_type.inc;

# This failed before the fix
let $source_type= LONGBLOB COMPRESSED;
let $target_type= LONGBLOB;
let $source_value= REPEAT('a',66000);
let $target_value= REPEAT('a',66000);
let $can_convert = $if_is_non_lossy;
source suite/rpl/include/check_type.inc;

# This failed before the fix
let $source_type= LONGBLOB COMPRESSED;
let $target_type= VARBINARY(65500);
let $source_value= REPEAT('a',66000);
let $target_value= REPEAT('a',65500);
let $can_convert = $if_is_lossy;
source suite/rpl/include/check_type.inc;

SET column_compression_threshold=DEFAULT;
--echo # End of MDEV-15833


--source include/rpl_reset.inc
enable_query_log;

0 comments on commit 9e9ea4f

Please sign in to comment.