Bug #9836 index_type, TYPE instead of USING
Submitted: 12 Apr 2005 8:49 Modified: 12 Apr 2005 11:15
Reporter: Geert Vanderkelen Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.3beta OS:
Assigned to: Sergei Golubchik CPU Architecture:Any

[12 Apr 2005 8:49] Geert Vanderkelen
Description:
Hi,

Following works in 4.1.11, but not in 5.0.3beta anymore
> create table blah ( id int, index type btree (id));

Found following that comes close to a change:
- SHOW CREATE TABLE now uses USING index_type rather than TYPE index_type to specify an index type. (Bug #7233)

Some people might still use TYPE instead of USING (see bug #9719).

Regards,

Geert

How to repeat:

mysql-5.0.3-beta-standard-log> create table blah ( id int, index type btree (id));
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'btree (id))' at line 1

Suggested fix:

Maybe a note about removing support of TYPE in v5.0 keyword on this page?
http://dev.mysql.com/doc/mysql/en/create-index.html
[12 Apr 2005 11:15] Sergei Golubchik
I cannot repeat the "works in 4.1.11" part

mysql> create table blah ( id int, index type btree (id));
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'btree (id))' at line 1
mysql> select version();
+--------------+
| version()    |
+--------------+
| 4.1.11-debug |
+--------------+
1 row in set (0.00 sec)