Resolve the issue of Chinese truncation during varchar insertion #195
Resolve the issue of Chinese truncation during varchar insertion #195zhangyongding wants to merge 5 commits intoalexbrainman:masterfrom
Conversation
| "unsafe" | ||
| ) | ||
|
|
||
| func TestBufferLen_IsNull(t *testing.T) { |
There was a problem hiding this comment.
I can see that you added test as I requested here #182 (comment) , but I was asking for a different test. Your test does not prove that there is a problem with current code.
Perhaps if you adjust TestMSSQLTypes
Line 704 in bcbcb68
TestMSSQLTextColumnParamTypes Line 1271 in bcbcb68
Thank you.
There was a problem hiding this comment.
I have added test
Your test is wrong. For any Unicode values you should be using nvarchar instead of varchar type.
I just added this commit 25af894#diff-fa7d078a77ac77b6c32112f98183f4a221d30d0f460e50456b2ba995efaf0f23R675 with proper tests, and they all pass here.
I will not review your PR, because I don't believe it is required. Nothing is broken.
Alex
There was a problem hiding this comment.
This issue does not occur in all databases, only some databases exist. I think setting the size to p.size is the correct approach
There was a problem hiding this comment.
This issue does not occur in all databases, only some databases exist.
If you have a way for me to reproduce the issue, I will look at it again.
I think setting the size to p.size is the correct approach
I disagree.
No description provided.