简体   繁体   English

MySQL 5.7.9是否删除了对ALTER IGNORE TABLE的支持?

[英]Did MySQL 5.7.9 remove support for ALTER IGNORE TABLE?

Consider the following query: 请考虑以下查询:

ALTER IGNORE TABLE `table_name`
ADD UNIQUE `some_id` (`some_id`);

This works fine in MySQL 5.6.25 but in 5.7.9 it gives a syntax error. 这在MySQL 5.6.25中工作正常但在5.7.9中它给出了语法错误。 Sidenote: Is it just me or was the GA of MysQL 5.7 the most quiet version upgrade ever heard of (or not, as the case may be)? 旁注:只是我或是MysQL 5.7的GA是有史以来最安静的版本升级(或不是,视情况而定)?

Anyways, in 5.7.9 I get the following error: 无论如何,在5.7.9我得到以下错误:

Error in query (1064): Syntax error near 'IGNORE TABLE ... etc

I'm hoping it's me mixing up the syntax in which case I'm sorry for wasting your time. 我希望这是我混合语法,在这种情况下,我很抱歉浪费你的时间。 In essence: I'm grateful for your help. 实质上:我很感谢你的帮助。 Thanks. 谢谢。

After checking the MySQL manual : 检查MySQL手册后

As of MySQL 5.7.4, the IGNORE clause for ALTER TABLE is removed and its use produces an error. 从MySQL 5.7.4开始,删除了ALTER TABLE的IGNORE子句,并且它的使用会产生错误。

In versions prior to 5.7.4 you get a warning if you use it. 在5.7.4之前的版本中,如果您使用它,则会收到警告。 Something like: 就像是:

1 warning(s): 1681 'IGNORE' is deprecated and will be removed in a future release. 1警告:1681'IGNORE'已弃用,将在以后的版本中删除。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM