-
-
Notifications
You must be signed in to change notification settings - Fork 141
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
fix(load): fix mysqld crash when loaded data column contains double enclosed char. (#1263) #1268
fix(load): fix mysqld crash when loaded data column contains double enclosed char. (#1263) #1268
Conversation
Thanks for the contribution! Please review the labels and make any necessary changes. |
++ptr; | ||
} | ||
} else if (size == 2) { | ||
--search_end; | ||
while (ptr < search_end && (*ptr != *c_pattern || ptr[1] != c_pattern[1])) { | ||
if (escape_char_ && *ptr == escape_char_) | ||
ptr += 2; | ||
else | ||
else if (string_qualifier_ && *ptr == string_qualifier_ && ptr + 1 < search_end && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this piece of code is repeated 4 times, how about add a new function for it?
(string_qualifier_ && *ptr == string_qualifier_ && ptr + 1 < search_end &&
*(ptr + 1) == string_qualifier_)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed it.
509db0a
to
0423e1a
Compare
Codecov ReportBase: 43.28% // Head: 43.31% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## stonedb-5.7-dev #1268 +/- ##
===================================================
+ Coverage 43.28% 43.31% +0.02%
===================================================
Files 1830 1830
Lines 396156 396171 +15
===================================================
+ Hits 171483 171606 +123
+ Misses 224673 224565 -108
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
0423e1a
to
da4a8eb
Compare
@@ -0,0 +1,2 @@ | |||
"765893","37","27","44221","2021-06-28 02:01:16","计算售罄率出错:ORA-04036: PGA memory used by the instance exceeds PGA_AGGREGATE_LIMITORA-06512: at ""BOSNDS3.O2O_STORESALERATE_SET"", line 49 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what will happens? """ xxx """, and """" xxxx """"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add these test case . Please check the MTR result file or datafile(issue1263-2.txt and issue1263-3.txt).
- double enclosed char will be interpred as a normal char;
- singe enclosed char before field-terminated string will be interpred as enclose char
- sing enclosed char with non-filed-termniated string will be interpreted as a normal char;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PTAL, @RingsC
87af55d
to
8ddcfb3
Compare
…r. (stoneatom#1263) [summary] 1. crash reason is the loader column number each time is not 65535 but report 65535; occurs when using limit clause or duplicate key; 2. support double enclosed char, ref:https://dev.mysql.com/doc/refman/5.7/en/load-data.html
8ddcfb3
to
b08ae17
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Summary about this PR
Issue Number: close #1263
occurs when using limit clause or duplicate key;
Tests Check List
Changelog
Documentation