Bug #55228 Unknown table engine error message contains some garbage
Submitted: 13 Jul 2010 19:30 Modified: 15 Oct 2012 14:39
Reporter: Shane Bester (Platinum Quality Contributor) Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Partitions Severity:S3 (Non-critical)
Version:5.1.48 OS:Any
Assigned to: CPU Architecture:Any
Triage: Triaged: D1 (Critical)

[13 Jul 2010 19:30] Shane Bester
Description:
on a server with partitioning, create a table.  then move this table to a server built without partitioning and do this:

mysql> show create table t1\G
ERROR 1286 (42000): Unknown table engine 'partition['

The last character after engine name is random, and read from the .frm file.

How to repeat:
on a server build with partitioning:

set sql_mode='';
drop table if exists t1;
create table t1(a varbinary(10))
partition by list (dayofweek(second(a)))
(partition a1 values in (1,null) engine = myisam);

now copy datadir to a server without partitioning (e.g. our oem pro binaries).

show create table t1;

Suggested fix:
null terminate the "partition" string when writing it to the .frm file.
[13 Jul 2010 21:07] Sveta Smirnova
Thank you for the report.

Verified as described.