Bug #15184 INOUT Field
Submitted: 23 Nov 2005 13:31 Modified: 23 Nov 2005 13:56
Reporter: Denis Dickner Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.13 OS:Windows (Windows)
Assigned to: MySQL Verification Team CPU Architecture:Any

[23 Nov 2005 13:31] Denis Dickner
Description:
Load data to database with INOUT field name.

ERROR 1064 (42000) at line 383: 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 'INOUT tinyint(4) NOT NULL default '0',
  PRIMARY KEY  (ADCLE),
  KEY IDX_autodep' at line 8

How to repeat:
Create DataBase with a field INOUT key INDEX in a table.
Dump the database with the command mysqldump...
and reload the database with DBName < DBNameDump.sql

The problem is not present on MySQL 4.1.14 and earlier.

Suggested fix:
Accept 'INOUT' field with index
[23 Nov 2005 13:56] MySQL Verification Team
Thank you for the bug report. INOUT it is a reserved word on 5.0.XX
so you need to handle it as documented.

http://dev.mysql.com/doc/refman/5.0/en/reserved-words.html

c:\mysql\bin>mysql -uroot test
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 5.0.16-nt

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

mysql> create table tb5 (INOUT tinyint(4));
ERROR 1064 (42000): You have an error in your SQL syntax; 
check the manual that corresponds to your MySQL se

mysql> create table tb5 (`INOUT` tinyint(4));
Query OK, 0 rows affected (0.08 sec)