Error: gob: type types.MyDecimal ...
c0494133d4 opened this issue · 1 comments
c0494133d4 commented
create table ... (val decimal(10,2) DEFAULT 4.2)
Deleted user commented
目前利用gob序列化Table
表结构.
Table.OriginalTableColumns.Columns[i].Default
有类型interface{}
, 可被赋值为各种tidb类型.
// tidb.types
func (d *Datum) GetValue() interface{} {
Only types that will be transferred as implementations of interface values need to be registered.
修复: 将赋予Default
的值转换为基础类型. 则不需要 gob.Register()