Re: mysqldump table change engine definition

From: Gordon Burditt <gordonb.vf334_at_burditt.org>
Date: Sat, 15 Nov 2014 05:39:59 -0600
Message-ID: <a5-dnYiPJIoSpvrJnZ2dnUU7-fudnZ2d_at_posted.internetamerica>


>> mysqldump --compatibility=no_table_options

>
> hmmm, interesting, a reply on some article from 2010, without context
> (for context see:
> http://compgroups.net/comp.databases.mysql/mysqldump-table-change-engine-definition/334447
> )
>
> and more interesting, this gives an error
>
> mysqldump: unknown variable 'compatibility=no_table_options'

It works if you spell 'compatible' correctly. If in doubt, using a sh-compatible shell, run:

        $ mysqldump --help 2>&1 | more

to see what options your mysqldump takes.

I'd like to suggest that you copy the database as-is, then use

        ALTER TABLE foo ENGINE=InnoDB
afterwards, although this doesn't work if you have MyISAM compiled out.

None of the solutions using sed or awk come remotely close to working because they clobber the string 'MyISAM'. This appears on 37 lines on my system, particularly in the `mysql` database, table `help_topic`. If you limit it to changing 'ENGINE=MyISAM' to 'ENGINE=InnoDB', you still clobber the help_topic' table, just in fewer places.

This could become considerably worse if your database contains the newsgroup comp.databases.mysql articles or email relating to discussions about MySQL. Received on Sat Nov 15 2014 - 12:39:59 CET

Original text of this message