Open utterances-bot opened 3 years ago
插入数据时自增id出错了 INSERTINTOxxxx(id,name,url,info)VALUES(NULL,'blahblahblah','/xxxx','');#1467 - Failed to read auto-increment value from storage engine 看看表的自增id现在是多少: ``SHOW CREATE TABLE xxxx CREATETABLExxxx(idtinyint(3)unsignedNOTNULLAUTO_INCREMENT,namevarchar(128)NOTNULLDEFAULT'',urlvarchar(255)NOTNULLDEFAULT'',infovarchar(255)NOTNULLDEFAULT'',PRIMARYKEY(id))ENGINE=InnoDBAUTO_INCREMENT=18446744073709551615DEFAULTCHARSET=utf8mb4WTF ? AUTO_INCREMENT=18446744073709551615 ?
xxxx
id
name
url
info
``SHOW CREATE TABLE xxxx
https://ttys3.dev/post/failed-to-read-auto-increment-value-from-storage-engine/
count? 不应该是 max 吗?
这个表是自增的,没有间断也没有删除.所以 count 和 max 是一样的.
另外后面这个语句是我写博客的时候脑补的,其实当时是直接用的肉眼看到的 max id,
不过, 正确的当然是用 max 啦.
max
1467 - Failed to read auto-increment value from storage engine :: /dev/ttyS3 — 回首向来萧瑟处 也无荒野也无灯
插入数据时自增id出错了 INSERTINTO
xxxx
(id
,name
,url
,info
)VALUES(NULL,'blahblahblah','/xxxx','');#1467 - Failed to read auto-increment value from storage engine 看看表的自增id现在是多少:``SHOW CREATE TABLE xxxx
CREATETABLExxxx
(id
tinyint(3)unsignedNOTNULLAUTO_INCREMENT,name
varchar(128)NOTNULLDEFAULT'',url
varchar(255)NOTNULLDEFAULT'',info
varchar(255)NOTNULLDEFAULT'',PRIMARYKEY(id
))ENGINE=InnoDBAUTO_INCREMENT=18446744073709551615DEFAULTCHARSET=utf8mb4WTF ? AUTO_INCREMENT=18446744073709551615 ?https://ttys3.dev/post/failed-to-read-auto-increment-value-from-storage-engine/