diff options
author | Alexander Barkov <bar@mariadb.org> | 2015-06-09 12:05:06 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2015-06-09 12:05:06 +0400 |
commit | 92b365981bbb5c36e6605295ca24fd266a90a937 (patch) | |
tree | 82bb7707fd283037a2af6a8987e51bf20d7a475c | |
parent | b1e10399f4ec7a37f432c33e1c94e21c1f74f30b (diff) | |
download | mariadb-git-92b365981bbb5c36e6605295ca24fd266a90a937.tar.gz |
MDEV-7268 Column of table cannot be converted from type 'decimal(0,?)' to type ' 'decimal(10,7)'
Changing the error message to:
"...from type 'decimal(0,?)/*old*/' to type ' 'decimal(10,7)'..."
So it's now clear that the master data type is OLD decimal.
-rw-r--r-- | mysql-test/suite/rpl/r/rpl_old_decimal.result | 9 | ||||
-rw-r--r-- | mysql-test/suite/rpl/t/rpl_old_decimal.test | 25 | ||||
-rw-r--r-- | sql/rpl_utility.cc | 2 |
3 files changed, 35 insertions, 1 deletions
diff --git a/mysql-test/suite/rpl/r/rpl_old_decimal.result b/mysql-test/suite/rpl/r/rpl_old_decimal.result new file mode 100644 index 00000000000..3e2fa3bf241 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_old_decimal.result @@ -0,0 +1,9 @@ +include/master-slave.inc +[connection master] +CREATE TABLE t1dec102 (a DECIMAL(10,2)); +INSERT INTO t1dec102 VALUES(999.99); +call mtr.add_suppression("Slave SQL.*Column 0 of table .* cannot be converted from type.* Error_code: 1677"); +include/wait_for_slave_sql_error_and_skip.inc [errno=1677] +Last_SQL_Error = 'Column 0 of table 'test.t1dec102' cannot be converted from type 'decimal(0,?)/*old*/' to type 'decimal(10,2)'' +DROP TABLE t1dec102; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_old_decimal.test b/mysql-test/suite/rpl/t/rpl_old_decimal.test new file mode 100644 index 00000000000..79fd2754079 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_old_decimal.test @@ -0,0 +1,25 @@ +--source include/have_binlog_format_row.inc +--source include/master-slave.inc + + +--connection slave +CREATE TABLE t1dec102 (a DECIMAL(10,2)); + +--connection master +let $MYSQLD_DATADIR= `select @@datadir`; + +--copy_file std_data/old_decimal/t1dec102.frm $MYSQLD_DATADIR/test/t1dec102.frm +--copy_file std_data/old_decimal/t1dec102.MYD $MYSQLD_DATADIR/test/t1dec102.MYD +--copy_file std_data/old_decimal/t1dec102.MYI $MYSQLD_DATADIR/test/t1dec102.MYI +INSERT INTO t1dec102 VALUES(999.99); + +--let $slave_sql_errno=1677 +--let $show_slave_sql_error= 1 +call mtr.add_suppression("Slave SQL.*Column 0 of table .* cannot be converted from type.* Error_code: 1677"); +--source include/wait_for_slave_sql_error_and_skip.inc + +--connection master +DROP TABLE t1dec102; +--sync_slave_with_master + +--source include/rpl_end.inc diff --git a/sql/rpl_utility.cc b/sql/rpl_utility.cc index 22241da1348..e05ad5a8d43 100644 --- a/sql/rpl_utility.cc +++ b/sql/rpl_utility.cc @@ -417,7 +417,7 @@ void show_sql_type(enum_field_types type, uint16 metadata, String *str, CHARSET_ CHARSET_INFO *cs= str->charset(); uint32 length= cs->cset->snprintf(cs, (char*) str->ptr(), str->alloced_length(), - "decimal(%d,?)", metadata); + "decimal(%d,?)/*old*/", metadata); str->length(length); } break; |