You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
MCOL-444 Truncate UTF8 correctly
cpimport would truncate UTF8 data half way through a character which would cause problems for functions using that data. This patch calculates the correct truncation point when inserting the data.
This commit is contained in:
@ -47,6 +47,7 @@ using namespace BRM;
|
||||
#include "IDBPolicy.h"
|
||||
#include "cacheutils.h"
|
||||
using namespace idbdatafile;
|
||||
#include "utils_utf8.h"
|
||||
|
||||
namespace
|
||||
{
|
||||
@ -731,7 +732,8 @@ int Dctnry::insertDctnry(const char* buf,
|
||||
// @Bug 2565: Truncate any strings longer than schema's column width
|
||||
if (curSig.size > m_colWidth)
|
||||
{
|
||||
curSig.size = m_colWidth;
|
||||
uint8_t truncate_point = funcexp::utf8::utf8_truncate_point((const char*)curSig.signature, m_colWidth);
|
||||
curSig.size = m_colWidth - truncate_point;
|
||||
++truncCount;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user