You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-01 06:46:55 +03:00
Merge pull request #5 from LinuxJedi/MCOL-171
Add support for zero date separate to NULL
This commit is contained in:
@ -187,15 +187,18 @@ uint32_t buildValueList (TABLE* table, cal_connection_info& ci )
|
||||
uint32_t size=0;
|
||||
int columnPos = 0;
|
||||
double dbval;
|
||||
ci.nullValuesBitset.reset();
|
||||
for (Field** field = table->field; *field; field++)
|
||||
{
|
||||
if((*field)->is_null())
|
||||
{
|
||||
ci.tableValuesMap[columnPos].push_back (""); //currently, empty string is treated as null.
|
||||
ci.nullValuesBitset[columnPos] = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
bitmap_set_bit(table->read_set, (*field)->field_index);
|
||||
ci.nullValuesBitset[columnPos] = false;
|
||||
// @bug 3798 get real value for float/double type
|
||||
if ((*field)->result_type() == REAL_RESULT)
|
||||
{
|
||||
@ -330,7 +333,7 @@ int doProcessInsertValues ( TABLE* table, uint32_t size, cal_connection_info& ci
|
||||
|
||||
VendorDMLStatement dmlStmts(idb_mysql_query_str(thd), DML_INSERT, table->s->table_name.str,
|
||||
table->s->db.str, size, ci.colNameList.size(), ci.colNameList,
|
||||
ci.tableValuesMap, sessionID);
|
||||
ci.tableValuesMap, ci.nullValuesBitset, sessionID);
|
||||
|
||||
CalpontDMLPackage* pDMLPackage = CalpontDMLFactory::makeCalpontDMLPackageFromMysqlBuffer(dmlStmts);
|
||||
//@Bug 2466 Move the clean up earlier to avoid the second insert in another session to get the data
|
||||
|
@ -195,6 +195,7 @@ typedef std::tr1::unordered_map<TABLE*, cal_table_info> CalTableMap;
|
||||
typedef std::vector<std::string> ColValuesList;
|
||||
typedef std::vector<std::string> ColNameList;
|
||||
typedef std::map<uint32_t, ColValuesList> TableValuesMap;
|
||||
typedef std::bitset<4096> NullValuesBitset;
|
||||
struct cal_connection_info
|
||||
{
|
||||
enum AlterTableState { NOT_ALTER, ALTER_SECOND_RENAME, ALTER_FIRST_RENAME };
|
||||
@ -257,6 +258,7 @@ struct cal_connection_info
|
||||
ha_rows rowsHaveInserted;
|
||||
ColNameList colNameList;
|
||||
TableValuesMap tableValuesMap;
|
||||
NullValuesBitset nullValuesBitset;
|
||||
int rc;
|
||||
uint32_t tableOid;
|
||||
querystats::QueryStats stats;
|
||||
|
Reference in New Issue
Block a user