Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Not a Bug
-
None
-
None
-
None
-
2018-01, 2018-02
Description
The following example will cause corruption due to the extra NULs at the end of the first string:
#include <libmcsapi/mcsapi.h>
|
#include <iostream>
|
|
int main(void) |
{
|
mcsapi::ColumnStoreDriver* driver = nullptr;
|
mcsapi::ColumnStoreBulkInsert* bulk = nullptr;
|
try { |
driver = new mcsapi::ColumnStoreDriver(); |
bulk = driver->createBulkInsert("test", "t1", 0, 0); |
bulk->setColumn(0, 1);
|
std::string str("hello world1"); |
str.resize(14);
|
bulk->setColumn(1, str);
|
bulk->writeRow();
|
bulk->setColumn(0, 2);
|
bulk->setColumn(1, "hello world4"); |
bulk->writeRow();
|
bulk->setColumn(0, 3);
|
bulk->setColumn(1, "hello world9"); |
bulk->writeRow();
|
bulk->setColumn(0, 4);
|
bulk->setColumn(1, "hello world16"); |
bulk->writeRow();
|
bulk->commit();
|
} catch (mcsapi::ColumnStoreError &e) { |
std::cout << "Error caught: " << e.what() << std::endl; |
}
|
delete bulk; |
delete driver; |
}
|
Attachments
Issue Links
- relates to
-
MCOL-1160 Bulk write API doesn't start new block for dictionary
-
- Closed
-
Activity
Field | Original Value | New Value |
---|---|---|
Assignee | Andrew Hutchings [ linuxjedi ] | Jens Rowekamp [ jens.rowekamp ] |
Status | Open [ 1 ] | In Review [ 10002 ] |
Status | In Review [ 10002 ] | Needs Feedback [ 10501 ] |
Assignee | Jens Rowekamp [ jens.rowekamp ] | Andrew Hutchings [ linuxjedi ] |
Status | Needs Feedback [ 10501 ] | In Review [ 10002 ] |
Assignee | Andrew Hutchings [ linuxjedi ] | Jens Rowekamp [ jens.rowekamp ] |
Sprint | 2018-01 [ 218 ] | 2018-01, 2018-02 [ 218, 222 ] |
Status | In Review [ 10002 ] | Needs Feedback [ 10501 ] |
Assignee | Jens Rowekamp [ jens.rowekamp ] | Andrew Hutchings [ linuxjedi ] |
Status | Needs Feedback [ 10501 ] | In Review [ 10002 ] |
Resolution | Not a Bug [ 6 ] | |
Status | In Review [ 10002 ] | Closed [ 6 ] |
Fix Version/s | N/A [ 22302 ] | |
Fix Version/s | 1.1.3 [ 22801 ] |
Component/s | mcsapi [ 14100 ] |
Patch trims off trailing NULs from VARCHAR/CHAR/TEXT data.
For QA: test mcol1154 included in regression suite