We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Go
go1.18
GoFrame
goframe v2.2.0
yes
重现步骤:
总结:感觉是goframe请求过一次表,表的字段会被缓存,之后删除数据库中的表字段,再次查询会使用缓存中的表字段去查询,导致报错。
调用ClearTableFieldsAll 清除字段缓存,但是清除之后仍然不会自动调用 SHOW FULL COLUMNS FROM xxx。
ClearTableFieldsAll
SHOW FULL COLUMNS FROM xxx
debug 发现如图
TableFields 和 default 中间多了个@导致无法匹配。
@
调用ClearTableFields主动传递 table 的名称,结果tableFieldsMap确实被清理,但是再次调用sql,仍然没有执行 SHOW FULL COLUMNS FROM xxx,仍然会获取到被删除的字段
ClearTableFields
tableFieldsMap
The text was updated successfully, but these errors were encountered:
fix issue #2552
b53b3c9
#3300
Sorry, something went wrong.
117a6e8
fix issue #2552 (#3300)
1456856
No branches or pull requests
1. What version of
Go
and system type/arch are you using?go1.18
2. What version of
GoFrame
are you using?goframe v2.2.0
3. Can this issue be re-produced with the latest release?
yes
重现步骤:
总结:感觉是goframe请求过一次表,表的字段会被缓存,之后删除数据库中的表字段,再次查询会使用缓存中的表字段去查询,导致报错。
尝试解决方案1:无果
调用
ClearTableFieldsAll
清除字段缓存,但是清除之后仍然不会自动调用SHOW FULL COLUMNS FROM xxx
。debug 发现如图
TableFields 和 default 中间多了个
@
导致无法匹配。尝试解决方案2:无果
调用
ClearTableFields
主动传递 table 的名称,结果tableFieldsMap
确实被清理,但是再次调用sql,仍然没有执行SHOW FULL COLUMNS FROM xxx
,仍然会获取到被删除的字段The text was updated successfully, but these errors were encountered: