8000 support for longtext data in mysql by syss710 · Pull Request #281 · wfrest/wfrest · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

support for longtext data in mysql #281

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
wants to merge 2 commits into from

Conversation

syss710
Copy link
@syss710 syss710 commented Apr 21, 2025

No description provided.

@Barenboim
Copy link
Contributor

感谢PR。麻烦提交的代码保持和原有代码风格一致!

@@ -195,6 +195,10 @@ wfrest::Json mysql_concat_json_res(WFMySQLTask *mysql_task)
{
row.push_back(arr[i].as_ulonglong());
}
else
{
row.push_back(arr[i].as_binary_string());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chanchann 这里会不会有编码问题?可能拼接出来的json不合法吗。

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

判定数据类型时 longtext 类型被判定为 MYSQL_TYPE_BLOB,潜在问题是除了 if 判断的数据类型之外其余类型都要走这个分支

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

主要问题是,如果非utf-8编码的数据,是不能这样直接装进JSON的。而且这里Json解析器也不清楚数据是什么编码,也没办法做转换。我怀疑这里没有加binary string的数据,原因可能是chanchan觉得编码问题解决不了。

@syss710 syss710 closed this May 8, 2025
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

Successfully merging this pull request may close these issues.

2 participants
0