[MDEV-19609] Unsupported syntax used for auto-generation of CREATE TABLE Created: 2019-05-27  Updated: 2023-04-27

Status: Open
Project: MariaDB Server
Component/s: Replication
Affects Version/s: 5.5, 10.1, 10.2, 10.3, 10.4
Fix Version/s: 10.4

Type: Bug Priority: Minor
Reporter: Elena Stepanova Assignee: Brandon Nesterenko
Resolution: Unresolved Votes: 0
Labels: upstream


 Description   

--source include/have_binlog_format_row.inc
--source include/master-slave.inc
 
SET sql_mode='MYSQL40';
 
CREATE TEMPORARY TABLE tmp (a INT);
CREATE TABLE t1 LIKE tmp;
 
SHOW BINLOG EVENTS;
 
--sync_slave_with_master
 
# Cleanup
--connection master
DROP TABLE t1;
--source include/rpl_end.inc

CREATE TABLE is written into the binary log as

master-bin.000001	329	Gtid	1	371	GTID 0-1-1
master-bin.000001	371	Query	1	498	use `test`; CREATE TABLE `t1` (
  `a` int(11) DEFAULT NULL
) TYPE=MyISAM

– note the TYPE= clause instead of ENGINE=, even though TYPE is not supported anymore, even with sql_mode=MYSQL40. Expectedly, it causes further replication abort.

Last_Errno	1064
Last_Error	Error 'You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'TYPE=MyISAM' at line 3' on query. Default database: 'test'. Query: 'CREATE TABLE `t1` (
  `a` int(11) DEFAULT NULL
) TYPE=MyISAM'

Reproducible on all current versions of MariaDB and MySQL 5.7, 8.0 (didn't try the latest, though).



 Comments   
Comment by Andrei Elkin [ 2019-05-28 ]

sujatha.sivakumar If I got it right the report has said it all: type should be replaced with engine.

Comment by Elena Stepanova [ 2019-05-28 ]

... or, we need to revive TYPE=. I don't know if MYSQL40 mode implies it.

Generated at Thu Feb 08 08:52:59 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.