Bug #1189 Statement syntax is not properly checked
Submitted: 3 Sep 2003 9:46 Modified: 2 Dec 2003 6:14
Reporter: Peter Zaitsev (Basic Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.0.15 OS:Any (all)
Assigned to: Alexey Botchkov CPU Architecture:Any

[3 Sep 2003 9:46] Peter Zaitsev
Description:
The suntax of the following statement is wrong, while it is accepted by MySQL 
as right:

  alter table TEST add constraint UC1 UNIQUE (C1)

The correct one is

alter table TEST add constraint UNIQUE UC1(C1)

That produces confusion as result is constraint named C1 not UC1 as one can expect

How to repeat:
create table TEST ( C1 int );
alter table TEST add constraint UC1 UNIQUE (C1);
[2 Dec 2003 0:27] Alexey Botchkov
bk commit - 4.1 tree (hf:1.1635)