Home > Net >  When creating a mysql table in AWS RDS with ENGINE=MyISAM, it overrides it with InnoDB
When creating a mysql table in AWS RDS with ENGINE=MyISAM, it overrides it with InnoDB

Time:09-06

I am using '5.7.mysql_aurora.2.10.2' version of AWS Aurora MySQL instance and I have trying to create Log table with innoDB engine so I can Log things (INSERT query) combined with SIGNAL command. Something like this:

INSERT INTO Log(type, info, date) VALUES("ERROR", "Error happened...!", CURRENT_TIMESTAMP());
SIGNAL CUSTOM_EXCEPTION SET MESSAGE_TEXT = "Error happened...";

But as I found out, SIGNAL basically rolls back everything including my INSERT statement. I have been trying to figure out the workaround and I stumbled upon the DB tables with engine MyISAM which should solve my problem. So I decided to create a table for testing:

CREATE TABLE t (i INT) ENGINE = MYISAM;

And for some reason, the engine keeps being InnoDB. I have tested on my local instance and it works fine but as soon as I try it on my RDS database, it keeps changing back. I have tried to use ALTER TABLE but it doesn't work.

Is there a possibility that RDS has some configuration that doesn't let me use any other engine other than InnoDB?

CodePudding user response:

Amazon Aurora only supports InnoDB.

https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.Reference.html says:

Aurora MySQL clusters use the InnoDB storage engine for all of your data.

This is by design. They implemented their distributed storage by modifying the InnoDB storage engine. Aurora simply doesn't work with any other storage engine, so they disabled the capability to specify the storage engine for a table.

Aurora is not MySQL.

  • Related