码迷,mamicode.com
首页 > 其他好文 > 详细

自增锁ID复用问题

时间:2016-07-19 09:25:36      阅读:168      评论:0      收藏:0      [点我收藏+]

标签:

mysql> select * from pp;
+----+------+
| id | name |
+----+------+
|  1 | xx   |
|  2 | xx   |
|  3 | xx   |
|  4 | xx   |
|  5 | xx   |
|  6 | xx   |
|  7 | xx   |
|  8 | xx   |
|  9 | xx   |
| 10 | xx   |
| 13 | xx   |
| 14 | xx   |
| 15 | xx   |
| 16 | xx   |
| 17 | xx   |
| 18 | xx   |
| 19 | xx   |
| 20 | xx   |
| 21 | xx   |
| 22 | xx   |
| 23 | xx   |
| 24 | xx   |
+----+------+
22 rows in set (0.00 sec)

mysql> delete from pp where id=24;
Query OK, 1 row affected (0.11 sec)

mysql> show create table pp;

CREATE TABLE `pp` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=gbk 

重起MYSQL 服务器

mysql> show create table pp;

| pp    | CREATE TABLE `pp` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=gbk |

 

自增锁ID复用问题

标签:

原文地址:http://www.cnblogs.com/zengkefu/p/5683245.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!