Bug #70416 consistent bracket syntax with INSERT and DELETE
Submitted: 25 Sep 2013 10:49 Modified: 28 Dec 2013 9:04
Reporter: Miha Svalina Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: DML Severity:S3 (Non-critical)
Version:5.6.14-log OS:Windows (8)
Assigned to: CPU Architecture:Any

[25 Sep 2013 10:49] Miha Svalina
Description:
CREATE TABLE `person`
(
  `name`      char(128) NOT NULL,
  `lastname` char(128) NOT NULL,
  `email`      char(128) NOT NULL
);     

INSERT query:
insert into `person` (`name`, `lastname`, `email`) values ('1','1','1'), ('2','2','2'), ('3','3','3');
3 row(s) affected Records: 3  Duplicates: 0  Warnings: 0

This DELETE query does execute successfully, notice the extra brackets:
delete from `person` where `name` in ( ('1'), ('2'), ('3') );
3 row(s) affected

Why insert query does not support extra brackets like this:

insert into `person` (`name`, `lastname`, `email`) values ( ('1','1','1'), ('2','2','2'), ('3','3','3') );

in delete query extra brackets must be written.

How to repeat:
CREATE TABLE `person`
(
  `name`      char(128) NOT NULL,
  `lastname` char(128) NOT NULL,
  `email`      char(128) NOT NULL
);

insert into `person` (`name`, `lastname`, `email`) values ('1','1','1'), ('2','2','2'), ('3','3','3');

insert into `person` (`name`, `lastname`, `email`) values ( ('1','1','1'), ('2','2','2'), ('3','3','3') );
[26 Dec 2013 9:36] MySQL Verification Team
Hello Miha,

Thank you for the report.
IMHO this is not a bug, it is a well documented behavior. 
You are mixing insert ... values (), (), () (MySQL extended syntax) with DELETE ... WHERE col IN ( <expression>, <expression>, ...).
Your suggested syntax INSERT assumes inserting ('1','1','1') into a column for one row which would raise an exception such as ERROR 1241 (21000): Operand should contain 1 column(s).

mysql> insert into `person` (`name`, `lastname`, `email`) values ( ('1','1','1'), ('2','2','2'), ('3','3','3') );
ERROR 1241 (21000): Operand should contain 1 column(s)

Thanks,
Umesh
[28 Dec 2013 9:04] Miha Svalina
Hi, Umesh
yes you are right this is not a bug, but a suggestion of consistency. I apologize for that. Just wanted to suggest new insert syntax 'insert into ( (), (), () )'.