Skip to content

Error: gob: type types.MyDecimal ... #1032

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ghost opened this issue Nov 9, 2022 · 1 comment
Closed

Error: gob: type types.MyDecimal ... #1032

ghost opened this issue Nov 9, 2022 · 1 comment
Milestone

Comments

@ghost
Copy link

ghost commented Nov 9, 2022

create table ... (val decimal(10,2) DEFAULT 4.2)
ghost pushed a commit that referenced this issue Nov 9, 2022
Fixing error: gob: type types.MyDecimal...
@ghost
Copy link
Author

ghost commented Nov 9, 2022

目前利用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()

@ghost ghost added this to the 4.22.09.0 milestone Nov 9, 2022
@ghost ghost closed this as completed Nov 10, 2022
ghost pushed a commit that referenced this issue Nov 10, 2022
Fixing error: gob: type types.MyDecimal...
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants