How important is the MySQL subsystem? For example, I need to synchronize two databases called events . Those. do not even synchronize, but make sure that the second database has a structure similar to the first one, and the data is from the second database. And when comparing schemas in SQLyog (the Schema Syncronyzation Tool tool), I see that the differences in the table structures of these databases are only in the subsystems (in the first InnoDB , in the second MyISAM ):
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; USE `events`; /* Alter table in target */ ALTER TABLE `eventlog` ENGINE=InnoDB; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; schema of the eventlog table of the first database:
CREATE TABLE `eventlog` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `source` varchar(50) NOT NULL DEFAULT '', `date` date NOT NULL DEFAULT '0000-00-00', `time` time NOT NULL DEFAULT '00:00:00', `level` smallint(6) NOT NULL DEFAULT '0', `type` smallint(6) NOT NULL DEFAULT '0', `message` blob NOT NULL, `description` blob, `flag` tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=cp1251 Scheme of the eventlog table of the second database:
CREATE TABLE `eventlog` ( `id` bigint(20) NOT NULL auto_increment, `source` varchar(50) NOT NULL default '', `date` date NOT NULL default '0000-00-00', `time` time NOT NULL default '00:00:00', `level` smallint(6) NOT NULL default '0', `type` smallint(6) NOT NULL default '0', `message` blob NOT NULL, `description` blob, `flag` tinyint(1) NOT NULL default '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=21 DEFAULT CHARSET=cp1251 In this regard, I have a question, how will the change of the subsystem affect the application? Those. If the application used to work with the tables created in the MyISAM subsystem and starts working with the tables created in the InnoDB subsystem, will this affect the performance, security, etc.?
MyISAMnot a transaction engine, butInnoDBtransactional one (if you record 10 values ββinInnoDB, and there is an error on 10, then the changes can be rolled back, but you cannot do it withMyISAM). And since inMyISAMthere is no transaction, the database will work with it much faster, but there is no rollBack, but no transactions, which can lead to data loss. - MrFylypenko