1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

MCOL-3536 collation

This commit is contained in:
David Hall
2020-05-14 16:02:49 -05:00
parent 04fdacb927
commit 1f3d1e6fd6
41 changed files with 667 additions and 797 deletions

View File

@ -1091,9 +1091,8 @@ int main(int argc, char** argv)
#endif
setupSignalHandlers();
// Set up LOCALE - BUG 5362
std::string systemLang("C");
systemLang = funcexp::utf8::idb_setlocale();
// Set locale language
utf8::idb_setlocale();
// Initialize singleton instance of syslogging
if (argc > 0)
@ -1377,7 +1376,7 @@ int main(int argc, char** argv)
//--------------------------------------------------------------------------
task = TASK_LOAD_JOBFILE;
rc = curJob.loadJobInfo( sFileName.string(), bUseTempJobFile,
systemLang, argc, argv, bLogInfo2ToConsole, bValidateColumnList );
argc, argv, bLogInfo2ToConsole, bValidateColumnList );
if ( rc != NO_ERROR )
{

View File

@ -231,7 +231,6 @@ int BulkLoad::setAlternateImportDir(const std::string& loadDir,
// PARAMETERS:
// fullName - full filename for job description file
// bUseTempJobFile - are we using a temporary job XML file
// systemLang-SystemLang setting used to set locale.
// argc - command line arg count
// argv - command line arguments
// bLogInfo2ToConsole - Log info2 msgs to the console
@ -244,7 +243,6 @@ int BulkLoad::setAlternateImportDir(const std::string& loadDir,
int BulkLoad::loadJobInfo(
const string& fullName,
bool bUseTempJobFile,
const string& systemLang,
int argc,
char** argv,
bool bLogInfo2ToConsole,
@ -285,13 +283,8 @@ int BulkLoad::loadJobInfo(
else
fLog.setLogFileName(logFile.c_str(), errlogFile.c_str(), (int)bLogInfo2ToConsole);
std::ostringstream ossLocale;
ossLocale << "Locale is : " << systemLang;
if (!(disableConsoleOutput()))
{
fLog.logMsg( ossLocale.str(), MSGLVL_INFO2 );
if (!BulkLoad::disableConsoleOutput())
cout << "Log file for this job: " << logFile << std::endl;

View File

@ -78,7 +78,6 @@ public:
*/
EXPORT int loadJobInfo( const std::string& fullFileName,
bool bUseTempJobFile,
const std::string& systemLang,
int argc,
char** argv,
bool bLogInfo2ToConsole,

View File

@ -561,7 +561,7 @@ void BulkLoadBuffer::convert(char* field, int fieldLength,
// on disk (e.g. 5 for a varchar(5) instead of 8).
if (fieldLength > column.definedWidth)
{
uint8_t truncate_point = funcexp::utf8::utf8_truncate_point(field, column.definedWidth);
uint8_t truncate_point = utf8::utf8_truncate_point(field, column.definedWidth);
memcpy( charTmpBuf, field, column.definedWidth - truncate_point );
bufStats.satCount++;
}

View File

@ -862,7 +862,7 @@ int Dctnry::insertDctnry(const char* buf,
// @Bug 2565: Truncate any strings longer than schema's column width
if (curSig.size > m_colWidth)
{
uint8_t truncate_point = funcexp::utf8::utf8_truncate_point((const char*)curSig.signature, m_colWidth);
uint8_t truncate_point = utf8::utf8_truncate_point((const char*)curSig.signature, m_colWidth);
curSig.size = m_colWidth - truncate_point;
++truncCount;
}

View File

@ -101,15 +101,12 @@ int setupResources()
int main(int argc, char** argv)
{
// get and set locale language
string systemLang = "C";
systemLang = funcexp::utf8::idb_setlocale();
// Set locale language
utf8::idb_setlocale();
// This is unset due to the way we start it
program_invocation_short_name = const_cast<char*>("WriteEngineServ");
printf ("Locale is : %s\n", systemLang.c_str() );
int gDebug = 0;
int c;
while ((c = getopt(argc, argv, "d")) != EOF)