summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorMagnus Blåudd <magnus.blaudd@oracle.com>2011-05-11 09:49:23 +0200
committerMagnus Blåudd <magnus.blaudd@oracle.com>2011-05-11 09:49:23 +0200
commit46c08b9459ee85dce22504596d7dec7f69808542 (patch)
tree681239aee2e22af7f2aa5ce11fedb1ee8d80aae7 /mysql-test
parent724cc4002387c3f8cf02e7039482440514559172 (diff)
downloadmariadb-git-46c08b9459ee85dce22504596d7dec7f69808542.tar.gz
Bug#12384993 EXTRA/RPL_TEST/CHECK_TYPE.INC NEED SUPPORT FOR SPECIFIC ENGINE
- add support for choosing the engine of test table(t1) with $engine_type - add primary key to the test table(t1) to support replication of BLOB/TEXT (also with ENGINE=ndb) - change the suppression since the warning printed to error log now says "Column 1"
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/extra/rpl_tests/check_type.inc14
-rw-r--r--mysql-test/suite/rpl/r/rpl_typeconv.result2
-rw-r--r--mysql-test/suite/rpl/t/rpl_typeconv.test2
3 files changed, 14 insertions, 4 deletions
diff --git a/mysql-test/extra/rpl_tests/check_type.inc b/mysql-test/extra/rpl_tests/check_type.inc
index 63491d81da4..97300753d38 100644
--- a/mysql-test/extra/rpl_tests/check_type.inc
+++ b/mysql-test/extra/rpl_tests/check_type.inc
@@ -11,18 +11,28 @@
# on the slave)
# $can_convert True if conversion shall work, false if it
# shall generate an error
+# $engine_type The storage engine to be used for storing table
+# on both master and slave
+if (!$engine_type)
+{
+ # Use the default storage engine
+ let $engine_type=`SELECT @@storage_engine`;
+}
connection master;
disable_warnings;
DROP TABLE IF EXISTS t1;
enable_warnings;
-eval CREATE TABLE t1 (a $source_type);
+eval CREATE TABLE t1(
+ pk INT NOT NULL PRIMARY KEY,
+ a $source_type
+) ENGINE=$engine_type;
sync_slave_with_master;
eval ALTER TABLE t1 MODIFY a $target_type;
connection master;
-eval INSERT INTO t1 VALUES($source_value);
+eval INSERT INTO t1 VALUES(1, $source_value);
if ($can_convert) {
sync_slave_with_master;
eval SELECT a = $target_value into @compare FROM t1;
diff --git a/mysql-test/suite/rpl/r/rpl_typeconv.result b/mysql-test/suite/rpl/r/rpl_typeconv.result
index 0d2f3cb26f7..f9d5b50b4e2 100644
--- a/mysql-test/suite/rpl/r/rpl_typeconv.result
+++ b/mysql-test/suite/rpl/r/rpl_typeconv.result
@@ -534,7 +534,7 @@ 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>
DROP TABLE type_conversions;
-call mtr.add_suppression("Slave SQL.*Column 0 of table .test.t1. cannot be converted from type.* Error_code: 1677");
+call mtr.add_suppression("Slave SQL.*Column 1 of table .test.t1. cannot be converted from type.* Error_code: 1677");
DROP TABLE t1;
set global slave_type_conversions = @saved_slave_type_conversions;
include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_typeconv.test b/mysql-test/suite/rpl/t/rpl_typeconv.test
index efe3dc15353..efcbe97049f 100644
--- a/mysql-test/suite/rpl/t/rpl_typeconv.test
+++ b/mysql-test/suite/rpl/t/rpl_typeconv.test
@@ -61,7 +61,7 @@ SELECT RPAD(Source, 15, ' ') AS Source_Type,
enable_query_log;
DROP TABLE type_conversions;
-call mtr.add_suppression("Slave SQL.*Column 0 of table .test.t1. cannot be converted from type.* Error_code: 1677");
+call mtr.add_suppression("Slave SQL.*Column 1 of table .test.t1. cannot be converted from type.* Error_code: 1677");
connection master;
DROP TABLE t1;