Comment 5 for bug 1488055

This bug also affects "OPTIMIZE TABLE".
When there is already a table "t" created with engine "xxx" and Percona Server is restarted with "--enforce_storage_engine=yyy" the behavior is the following.
1. When "sql_mode" includes "NO_ENGINE_SUBSTITUTION" - "OPTIMIZE TABLE t" generates an error.
Table Op Msg_type Msg_text
test.t optimize note Table does not support optimize, doing recreate + analyze instead
test.t optimize error Unknown storage engine 'InnoDB'
test.t optimize status Operation failed

2. When "sql_mode" does not include "NO_ENGINE_SUBSTITUTION" - "OPTIMIZE TABLE t" silently changes table storage engine to "yyy" producing a substitution warning "1266 Using storage engine yyy for table 't'"