You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
MCOL-4931 Make cpimport charset-aware. (#2938)
1. Extend the following CalpontSystemCatalog member functions to set CalpontSystemCatalog::ColType::charsetNumber, after the system catalog update to add charset number to calpontsys.syscolumn in MCOL-5005: CalpontSystemCatalog::lookupOID CalpontSystemCatalog::colType CalpontSystemCatalog::columnRIDs CalpontSystemCatalog::getSchemaInfo 2. Update cpimport to use the CHARSET_INFO object associated with the charset number retrieved from the system catalog, for a dictionary/non-dictionary CHAR/VARCHAR/TEXT column, to truncate long strings that exceed the target column character length. 3. Add MTR test cases.
This commit is contained in:
@ -48,6 +48,7 @@
|
||||
#include "MonitorProcMem.h"
|
||||
#include "dataconvert.h"
|
||||
#include "mcsconfig.h"
|
||||
#include "mariadb_my_sys.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace WriteEngine;
|
||||
@ -1002,6 +1003,9 @@ int main(int argc, char** argv)
|
||||
{
|
||||
setupSignalHandlers();
|
||||
|
||||
// Initialize the charset library
|
||||
MY_INIT(argv[0]);
|
||||
|
||||
// Set locale language
|
||||
const char* pLoc = setlocale(LC_ALL, "");
|
||||
if (pLoc)
|
||||
@ -1316,6 +1320,9 @@ int main(int argc, char** argv)
|
||||
rc = ERR_UNKNOWN;
|
||||
}
|
||||
|
||||
// Free up resources allocated by MY_INIT() above.
|
||||
my_end(0);
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Log end of job to INFO log
|
||||
//--------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user