summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/extra/rpl_tests/type_conversions.test139
-rw-r--r--mysql-test/suite/rpl/r/rpl_typeconv.result72
2 files changed, 210 insertions, 1 deletions
diff --git a/mysql-test/extra/rpl_tests/type_conversions.test b/mysql-test/extra/rpl_tests/type_conversions.test
index 791e07c4822..731eef8f41e 100644
--- a/mysql-test/extra/rpl_tests/type_conversions.test
+++ b/mysql-test/extra/rpl_tests/type_conversions.test
@@ -12,6 +12,142 @@ connection slave;
let $if_is_lossy = `SELECT FIND_IN_SET('ALL_LOSSY', @@SLAVE_TYPE_CONVERSIONS)`;
let $if_is_non_lossy = `SELECT FIND_IN_SET('ALL_NON_LOSSY', @@SLAVE_TYPE_CONVERSIONS)`;
+# TINYBLOB
+
+let $source_type = TINYBLOB;
+let $target_type = TINYBLOB;
+let $source_value = 'aaa';
+let $target_value = 'aaa';
+let $can_convert = 1;
+source extra/rpl_tests/check_type.inc;
+
+let $source_type= TINYBLOB;
+let $target_type= BLOB;
+let $source_value= 'aaa';
+let $target_value= 'aaa';
+let $can_convert= $if_is_non_lossy;
+source extra/rpl_tests/check_type.inc;
+
+let $source_type= TINYBLOB;
+let $target_type= MEDIUMBLOB;
+let $source_value= 'aaa';
+let $target_value= 'aaa';
+let $can_convert= $if_is_non_lossy;
+source extra/rpl_tests/check_type.inc;
+
+let $source_type= TINYBLOB;
+let $target_type= LONGBLOB;
+let $source_value= 'aaa';
+let $target_value= 'aaa';
+let $can_convert= $if_is_non_lossy;
+source extra/rpl_tests/check_type.inc;
+
+# BLOB
+
+let $source_type = BLOB;
+let $target_type = TINYBLOB;
+let $source_value = 'aaa';
+let $target_value = 'aaa';
+let $can_convert = $if_is_lossy;
+source extra/rpl_tests/check_type.inc;
+
+let $source_type= BLOB;
+let $target_type= BLOB;
+let $source_value= 'aaa';
+let $target_value= 'aaa';
+let $can_convert= 1;
+source extra/rpl_tests/check_type.inc;
+
+let $source_type= BLOB;
+let $target_type= MEDIUMBLOB;
+let $source_value= 'aaa';
+let $target_value= 'aaa';
+let $can_convert= $if_is_non_lossy;
+source extra/rpl_tests/check_type.inc;
+
+let $source_type= BLOB;
+let $target_type= LONGBLOB;
+let $source_value= 'aaa';
+let $target_value= 'aaa';
+let $can_convert= $if_is_non_lossy;
+source extra/rpl_tests/check_type.inc;
+
+# MEDIUMBLOB
+
+let $source_type = MEDIUMBLOB;
+let $target_type = TINYBLOB;
+let $source_value = 'aaa';
+let $target_value = 'aaa';
+let $can_convert = $if_is_lossy;
+source extra/rpl_tests/check_type.inc;
+
+let $source_type= MEDIUMBLOB;
+let $target_type= BLOB;
+let $source_value= 'aaa';
+let $target_value= 'aaa';
+let $can_convert= $if_is_lossy;
+source extra/rpl_tests/check_type.inc;
+
+let $source_type= MEDIUMBLOB;
+let $target_type= MEDIUMBLOB;
+let $source_value= 'aaa';
+let $target_value= 'aaa';
+let $can_convert= 1;
+source extra/rpl_tests/check_type.inc;
+
+let $source_type= MEDIUMBLOB;
+let $target_type= LONGBLOB;
+let $source_value= 'aaa';
+let $target_value= 'aaa';
+let $can_convert= $if_is_non_lossy;
+source extra/rpl_tests/check_type.inc;
+
+# LONGBLOB
+
+let $source_type = LONGBLOB;
+let $target_type = TINYBLOB;
+let $source_value = 'aaa';
+let $target_value = 'aaa';
+let $can_convert = $if_is_lossy;
+source extra/rpl_tests/check_type.inc;
+
+let $source_type= LONGBLOB;
+let $target_type= BLOB;
+let $source_value= 'aaa';
+let $target_value= 'aaa';
+let $can_convert= $if_is_lossy;
+source extra/rpl_tests/check_type.inc;
+
+let $source_type= LONGBLOB;
+let $target_type= MEDIUMBLOB;
+let $source_value= 'aaa';
+let $target_value= 'aaa';
+let $can_convert= $if_is_lossy;
+source extra/rpl_tests/check_type.inc;
+
+let $source_type= LONGBLOB;
+let $target_type= LONGBLOB;
+let $source_value= 'aaa';
+let $target_value= 'aaa';
+let $can_convert= 1;
+source extra/rpl_tests/check_type.inc;
+
+# BUG#49836 (additional tests - GEOMETRY TYPE)
+
+let $source_type = GEOMETRY;
+let $target_type = BLOB;
+let $source_value = PointFromText('POINT(10 10)');
+let $target_value = PointFromText('POINT(10 10)');
+let $can_convert = 0;
+source extra/rpl_tests/check_type.inc;
+
+let $source_type = BLOB;
+let $target_type = GEOMETRY;
+let $source_value = 'aaa';
+let $target_value = 'aaa';
+let $can_convert = 0;
+source extra/rpl_tests/check_type.inc;
+
let $source_type = GEOMETRY;
let $target_type = GEOMETRY;
let $source_value = PointFromText('POINT(10 10)');
@@ -739,7 +875,8 @@ let $target_value= b'11111';
let $can_convert = $if_is_lossy;
source extra/rpl_tests/check_type.inc;
+
disable_warnings;
source include/reset_master_and_slave.inc;
enable_warnings;
-enable_query_log; \ No newline at end of file
+enable_query_log;
diff --git a/mysql-test/suite/rpl/r/rpl_typeconv.result b/mysql-test/suite/rpl/r/rpl_typeconv.result
index 34ec81973ae..89096153c14 100644
--- a/mysql-test/suite/rpl/r/rpl_typeconv.result
+++ b/mysql-test/suite/rpl/r/rpl_typeconv.result
@@ -69,6 +69,24 @@ RESET MASTER;
include/start_slave.inc
**** Result of conversions ****
Source_Type Target_Type All_Type_Conversion_Flags Value_On_Slave
+TINYBLOB TINYBLOB <Correct value>
+TINYBLOB BLOB <Correct error>
+TINYBLOB MEDIUMBLOB <Correct error>
+TINYBLOB LONGBLOB <Correct error>
+BLOB TINYBLOB <Correct error>
+BLOB BLOB <Correct value>
+BLOB MEDIUMBLOB <Correct error>
+BLOB LONGBLOB <Correct error>
+MEDIUMBLOB TINYBLOB <Correct error>
+MEDIUMBLOB BLOB <Correct error>
+MEDIUMBLOB MEDIUMBLOB <Correct value>
+MEDIUMBLOB LONGBLOB <Correct error>
+LONGBLOB TINYBLOB <Correct error>
+LONGBLOB BLOB <Correct error>
+LONGBLOB MEDIUMBLOB <Correct error>
+LONGBLOB LONGBLOB <Correct value>
+GEOMETRY BLOB <Correct error>
+BLOB GEOMETRY <Correct error>
GEOMETRY GEOMETRY <Correct value>
BIT(1) BIT(1) <Correct value>
DATE DATE <Correct value>
@@ -172,6 +190,24 @@ 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 TINYBLOB ALL_NON_LOSSY <Correct value>
+TINYBLOB BLOB ALL_NON_LOSSY <Correct value>
+TINYBLOB MEDIUMBLOB ALL_NON_LOSSY <Correct value>
+TINYBLOB LONGBLOB ALL_NON_LOSSY <Correct value>
+BLOB TINYBLOB ALL_NON_LOSSY <Correct error>
+BLOB BLOB ALL_NON_LOSSY <Correct value>
+BLOB MEDIUMBLOB ALL_NON_LOSSY <Correct value>
+BLOB LONGBLOB ALL_NON_LOSSY <Correct value>
+MEDIUMBLOB TINYBLOB ALL_NON_LOSSY <Correct error>
+MEDIUMBLOB BLOB ALL_NON_LOSSY <Correct error>
+MEDIUMBLOB MEDIUMBLOB ALL_NON_LOSSY <Correct value>
+MEDIUMBLOB LONGBLOB ALL_NON_LOSSY <Correct value>
+LONGBLOB TINYBLOB ALL_NON_LOSSY <Correct error>
+LONGBLOB BLOB ALL_NON_LOSSY <Correct error>
+LONGBLOB MEDIUMBLOB ALL_NON_LOSSY <Correct error>
+LONGBLOB LONGBLOB ALL_NON_LOSSY <Correct value>
+GEOMETRY BLOB ALL_NON_LOSSY <Correct error>
+BLOB GEOMETRY ALL_NON_LOSSY <Correct error>
GEOMETRY GEOMETRY ALL_NON_LOSSY <Correct value>
BIT(1) BIT(1) ALL_NON_LOSSY <Correct value>
DATE DATE ALL_NON_LOSSY <Correct value>
@@ -275,6 +311,24 @@ 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 TINYBLOB ALL_LOSSY <Correct value>
+TINYBLOB BLOB ALL_LOSSY <Correct error>
+TINYBLOB MEDIUMBLOB ALL_LOSSY <Correct error>
+TINYBLOB LONGBLOB ALL_LOSSY <Correct error>
+BLOB TINYBLOB ALL_LOSSY <Correct value>
+BLOB BLOB ALL_LOSSY <Correct value>
+BLOB MEDIUMBLOB ALL_LOSSY <Correct error>
+BLOB LONGBLOB ALL_LOSSY <Correct error>
+MEDIUMBLOB TINYBLOB ALL_LOSSY <Correct value>
+MEDIUMBLOB BLOB ALL_LOSSY <Correct value>
+MEDIUMBLOB MEDIUMBLOB ALL_LOSSY <Correct value>
+MEDIUMBLOB LONGBLOB ALL_LOSSY <Correct error>
+LONGBLOB TINYBLOB ALL_LOSSY <Correct value>
+LONGBLOB BLOB ALL_LOSSY <Correct value>
+LONGBLOB MEDIUMBLOB ALL_LOSSY <Correct value>
+LONGBLOB LONGBLOB ALL_LOSSY <Correct value>
+GEOMETRY BLOB ALL_LOSSY <Correct error>
+BLOB GEOMETRY ALL_LOSSY <Correct error>
GEOMETRY GEOMETRY ALL_LOSSY <Correct value>
BIT(1) BIT(1) ALL_LOSSY <Correct value>
DATE DATE ALL_LOSSY <Correct value>
@@ -378,6 +432,24 @@ 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 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>
+TINYBLOB LONGBLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value>
+BLOB TINYBLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value>
+BLOB BLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value>
+BLOB MEDIUMBLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value>
+BLOB LONGBLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value>
+MEDIUMBLOB TINYBLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value>
+MEDIUMBLOB BLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value>
+MEDIUMBLOB MEDIUMBLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value>
+MEDIUMBLOB LONGBLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value>
+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 LONGBLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value>
+GEOMETRY BLOB ALL_LOSSY,ALL_NON_LOSSY <Correct error>
+BLOB GEOMETRY ALL_LOSSY,ALL_NON_LOSSY <Correct error>
GEOMETRY GEOMETRY ALL_LOSSY,ALL_NON_LOSSY <Correct value>
BIT(1) BIT(1) ALL_LOSSY,ALL_NON_LOSSY <Correct value>
DATE DATE ALL_LOSSY,ALL_NON_LOSSY <Correct value>