1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-01 06:46:55 +03:00

Add support for zero date separate to NULL

NULL is now pushed through the MariaDB storage engine plugin down to the
insert processing. A '0000-00-00' date is now a separate value to NULL.

This is more in-line with MariaDB's handling.
This commit is contained in:
Andrew Hutchings
2016-08-30 16:26:36 +01:00
parent 9a76bfc0f3
commit 25851df89d
16 changed files with 34 additions and 37 deletions

View File

@ -26,6 +26,7 @@
#include <string>
#include <vector>
#include <map>
#include <bitset>
#include <stdint.h>
#if defined(_MSC_VER) && defined(xxxVENDORDMLSTATEMENT_DLLEXPORT)
@ -38,6 +39,7 @@ namespace dmlpackage
typedef std::vector<std::string> ColValuesList;
typedef std::vector<std::string> ColNameList;
typedef std::map<uint32_t, ColValuesList> TableValuesMap;
typedef std::bitset<4096> NullValuesBitset;
/** @brief describes the general interface
* and implementation of a Vendor DML Statement
@ -63,7 +65,7 @@ namespace dmlpackage
/** @brief ctor for mysql
*/
EXPORT VendorDMLStatement(std::string dmlstatement, int stmttype, std::string tName, std::string schema, int rows, int columns,
ColNameList& colNameList, TableValuesMap& tableValuesMap, int sessionID);
ColNameList& colNameList, TableValuesMap& tableValuesMap, NullValuesBitset& nullValues, int sessionID);
/** @brief destructor
*/
@ -128,6 +130,8 @@ namespace dmlpackage
*/
inline int get_SessionID() { return fSessionID; }
inline NullValuesBitset& get_nullValues() { return fNullValues; }
/** @brief Set the session ID
*/
inline void set_SessionID( int value ) { fSessionID = value; }
@ -172,6 +176,7 @@ namespace dmlpackage
std::string fDataBuffer;
ColNameList fColNameList;
TableValuesMap fTableValuesMap;
NullValuesBitset fNullValues;
int fSessionID;
bool fLogging;
bool fLogending;