Hi Sergei, frankly speaking I have no better idea. Let's give your patch a try. Regards, Sergey On Tue, Jul 08, 2014 at 10:43:24AM +0200, Sergei Golubchik wrote:
Hi, Sergey!
On Jul 08, Sergey Vojtovich wrote:
Hi Sergei,
I believe options handling is way too confusing in general: - CREATE TABLE warns/errors about unknown options - ALTER TABLE ... ENGINE doesn't - ALTER TABLE ... UNKNOWN_OPTION=1 does - CREATE TABLE ... LIKE doesn't
This is consistent. You get a warning or an error about options that you explicitly specify, but not about options that are implicitly ihnerited.
- different engines may assign different meaning to the same option - IGNORE_BAD_TABLE_OPTIONS doesn't actually _ignore_ _bad_ options but rather _accepts_ _unkown_ options
Yes, I know :(
That's why I tried to say in the manual that SHOW CREATE TABLE *filters out* invalid options, and IGNORE_BAD_TABLE_OPTIONS disables this filtering, they are ignored and not filtered out.
But the question is if we should show unknown options by default. I have no opinion: both cases are equally wrong to me.
On the one hand we get unusable CREATE TABLE statement, on the other hand hidden metadata which may affect further statements.
I'm fine with hidding unknown options that were accepted due to IGNORE_BAD_TABLE_OPTIONS, but hidding things that were accepted by fully successful ALTER TABLE statement sounds confusing.
Do you have a better idea?
My logic was - SHOW CREATE TABLE should generate a valid CREATE TABLE statement.
Regards, Sergei