Saturday, May 26, 2018

[google-cloud-sql-discuss] Re: MyISAM tables on Cloud SQL

OK, now that's weird.

I fired up another Cloud SQL instance, created a "testdb" database and then executed "create table test (a int) engine=myISAM;" as you did, and got the same error you did (which is what's supposed to happen, and what I believe originally happened when my original instance was created a couple of months ago).

Yet, when I do the same on the Cloud SQL instance I've had running for awhile now, the same procedure allows me to create the table with a MyISAM engine, and I don't get any errors.

In the Google Cloud Platform SQL dashboard, both instances are listed as being MySQL 2nd Gen 5.7. When I do a "select version()" on either instance, I get the same result - 5.7.14-google-log (I don't think first generation can support 5.7 at any rate).  Yet one instance lets me create a table with MyISAM and the other doesn't.  Both my original instance (where MyISAM seems to be allowed) and my test instance I just created are in the same zone, and neither had any special flags set.

I can chalk it up to just "one of those things" and ensure I don't use MyISAM in case the rug gets pulled out from the instance that allows it.  Though I'm now a bit concerned that if it has that weird behaviour, the instance itself may be flaky in other ways.

Thanks for your response.

Dan



On Saturday, May 26, 2018 at 5:40:58 PM UTC-6, Fady (Google Cloud Platform) wrote:

Hello Dan,


As you mentioned, Innodb is only supported on a second generation Cloud SQL instance. Trying to reproduce your results above, instead I got an error:

 

MySQL [test]> create table test (a int) engine=myISAM;
ERROR 3161 (HY000): Storage engine MyISAM is disabled (Table creation is disallowed).


And that is consistent with this official troubleshooting guide where for second generation instances it throws this error. However when trying the same on a First generation Cloud SQL instance it works fine, as per this document InnoDB is only recommended and not enforced.


MySQL [firstGen]> create table test (a int) engine=myISAM;

Query OK, 0 rows affected (0.15 sec)


That said, if you are using a second generation instance, it could be an intermittent issue at the time, or a missing flag (maybe at instance creation) that allowed using "myISAM". Hence, if you are still affected, you may open a private report (GCP Private issues component) including your instance name and project for further investigation.


--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/1dbcd422-c906-450b-bcf4-6d6f1d0c61f5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment