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)

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.038 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.