Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
10.3.16, 10.3.18, 10.3(EOL), 10.4(EOL)
Description
Test case 1 |
--source include/have_binlog_format_row.inc
|
--source include/master-slave.inc
|
|
CREATE TABLE t1 (a BLOB); |
INSERT INTO t1 VALUES (0); |
SET SQL_MODE= 'ORACLE'; |
CREATE TABLE t2 SELECT * FROM t1; |
--sync_slave_with_master
|
|
# Cleanup
|
--connection master
|
DROP TABLE t1, t2; |
--source include/rpl_end.inc |
10.3 617d34ae |
2019-05-29 15:19:53 13 [ERROR] Slave SQL: Column 0 of table 'test.t2' cannot be converted from type 'tinyblob' to type 'longblob', Gtid 0-1-3, Internal MariaDB error code: 1677
|
2019-05-29 15:19:53 13 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START". We stopped at log 'master-bin.000001' position 708
|
master-bin.000001 708 Gtid 1 750 BEGIN GTID 0-1-3
|
master-bin.000001 750 Query 1 862 use `test`; CREATE TABLE "t2" (
|
"a" blob DEFAULT NULL
|
)
|
master-bin.000001 862 Annotate_rows 1 917 CREATE TABLE t2 SELECT * FROM t1
|
master-bin.000001 917 Table_map 1 963 table_id: 33 (test.t2)
|
master-bin.000001 963 Write_rows_v1 1 1000 table_id: 33 flags: STMT_END_F
|
master-bin.000001 1000 Query 1 1073 COMMIT
|
Same idea, different types:
Test case 2 |
--source include/have_binlog_format_row.inc
|
--source include/master-slave.inc
|
|
CREATE TABLE t1 (a DATE); |
INSERT INTO t1 VALUES (NULL); |
SET SQL_MODE= 'ORACLE'; |
CREATE TABLE t2 SELECT * FROM t1; |
--sync_slave_with_master
|
|
# Cleanup
|
--connection master
|
DROP TABLE t1, t2; |
--source include/rpl_end.inc |
2019-05-29 19:53:05 13 [ERROR] Slave SQL: Column 0 of table 'test.t2' cannot be converted from type 'date' to type 'datetime', Gtid 0-1-3, Internal MariaDB error code: 1677
|
2019-05-29 19:53:05 13 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START". We stopped at log 'master-bin.000001' position 707
|
Attachments
Issue Links
- is blocked by
-
MDEV-20263 sql_mode=ORACLE: BLOB(65535) should not translate to LONGBLOB
-
- Closed
-
- relates to
-
MDEV-23353 Qualified data types in SP
-
- Open
-
-
MDEV-23005 sql_mode mixture: a table with DECODE() in a virtual column refuses to work
-
- Open
-
-
MDEV-23040 sql_mode mixture: a table with TRIM() in DEFAULT refuses to INSERT
-
- Open
-
sujatha.sivakumar: So sql_mode force the input DATE type in CREATE TABLE become DATETYPE as SHOW can prove:
+-------+-----------------------------------------------------+
| Table | Create Table |
+-------+-----------------------------------------------------+
)
Notice
CREATE-LIKE when run in oracle mode also converts(NO, it does not, the created one should have been LIKE t1 not what is below):+-------+-----------------------------------------------------+
| Table | Create Table |
+-------+-----------------------------------------------------+
)
+-------+-----------------------------------------------------+
| Table | Create Table |
+-------+-----------------------------------------------------+
)
But CREATE-SELECT does not -
+---------+----------------------------------------------------+
| Table | Create Table |
+---------+----------------------------------------------------+
)
which must be the reason of the bug.
The fixes must make sure the conversion takes place in this case as well.
This is not really the replication issue and if you feel clueless about how to enforce the conversion we may send the bug to runtime.