Bug #18463 Able to specify an invalid storage engine name with CREATE TABLE
Submitted: 23 Mar 2006 17:19 Modified: 3 May 2006 18:23
Reporter: Paul Whittington Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.1.7-beta OS:Linux (linux)
Assigned to: Sergey Vojtovich CPU Architecture:Any

[23 Mar 2006 17:19] Paul Whittington
Description:
Attempted to create a table with an invalid storage engine name, and instead of giving an error mysql processed the statement just fine.

How to repeat:
Downloaded 5.1.7-beta and configured it with

./configure --prefix=/home/tester/mysql --without-innodb --with-example-storage-engine

then I did

make
make install

and

cd /home/tester/mysql
bin/mysql_install_db
share/mysql/mysql.server start

followed by

bin/mysql

and 

use test;
create table test (a int not null) engine=FRED;

to which mysql responded

Query OK, 0 rows affected, 1 warning (0.00 sec) 

I expected mysql to respond with some sort of error indicating that "FRED" is an unknown storage engine type.
[23 Mar 2006 17:39] MySQL Verification Team
Thank you for the bug report. 5.0 behaves different than 5.1:

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3 to server version: 5.1.8-beta-debug

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> use test;
Database changed
mysql> create table test (a int not null) engine=FRED;
Query OK, 0 rows affected, 1 warning (0.02 sec)

mysql> show warnings;
+---------+------+----------------------------------------------+
| Level   | Code | Message                                      |
+---------+------+----------------------------------------------+
| Warning | 1266 | Using storage engine MyISAM for table 'test' |
+---------+------+----------------------------------------------+
1 row in set (0.00 sec)

miguel@hegel:~/dbs/5.0> bin/mysql -uroot test
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3 to server version: 5.0.20-debug

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> use test;
Database changed
mysql> create table test (a int not null) engine=FRED;
ERROR 1286 (42000): Unknown table engine 'FRED'
mysql> exit
[3 May 2006 18:23] Sergei Golubchik
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.mysql.com/documentation/ and the instructions on
how to report a bug at http://bugs.mysql.com/how-to-report.php

Additional info:

See the manual for NO_ENGINE_SUBSTITUTION
(http://dev.mysql.com/doc/refman/5.1/en/server-sql-mode.html)