xorm icon indicating copy to clipboard operation
xorm copied to clipboard

关于 uint64@Mysql

Open Anveena opened this issue 5 years ago • 3 comments

复现 type A struct { Id int64 xorm:"pk autoincr" Test uint64 } 生成表以后 DBTool.DBEngine().Exec("REPLACE INTO a (test) VALUES"+ "(?)", uint64(18446744073709551615)) 执行会报错 Error 1264: Out of range value for column 'xxxx' at row xxx

Anveena avatar Jun 12 '19 09:06 Anveena

how to fixed it?

machelcheng avatar Aug 02 '19 06:08 machelcheng

I just find, use the UINT64_MAX value to insert the table, and the error is found: Error 1264: Out of range value for column 'xxx' at row 1 my table column defined with bigint(20) unsigned

machelcheng avatar Aug 02 '19 06:08 machelcheng

I found the max value of integer can not be more than INT64_MAX

machelcheng avatar Aug 04 '19 03:08 machelcheng