小编Kra*_*mar的帖子

在 mysql 5.6 中添加没有元数据锁的列

我正在使用MySQL Server version: 5.6.15 Homebrew. 我需要添加新null列。alter table不需要metadata锁。为了避免这种MySQL 5.6引入algorithm=inplace。这里是参考文章http://www.mysqlperformanceblog.com/2013/07/05/schema-changes-whats-new-in-mysql-5-6/

执行以下sql抛出

mysql> alter table candidate_candidate add column responsible_user_id int, algorithm=INPLACE, lock=NONE;
ERROR 1845 (0A000): ALGORITHM=INPLACE is not supported for this operation.
Try ALGORITHM=COPY.
Run Code Online (Sandbox Code Playgroud)

有没有办法add column不影响应用程序read/write

mysql mysql-5.6

5
推荐指数
1
解决办法
2万
查看次数

标签 统计

mysql ×1

mysql-5.6 ×1