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

Fix warnings on CentOS7

This commit is contained in:
Alexey Antipovsky
2020-11-12 14:11:48 +00:00
parent 98b94c0280
commit ede047f0fa
2 changed files with 8 additions and 4 deletions

View File

@ -1868,6 +1868,8 @@ static int columnstore_init_func(void* p)
#ifdef HAVE_PSI_INTERFACE
uint count = sizeof(all_mutexes)/sizeof(all_mutexes[0]);
mysql_mutex_register("ha_mcs_cache", all_mutexes, count);
#else
(void)key_LOCK_cache_share;
#endif
mysql_mutex_init(key_LOCK_cache_share, &LOCK_cache_share, MY_MUTEX_INIT_FAST);

View File

@ -1842,9 +1842,10 @@ uint8_t WE_DMLCommandProc::processBatchInsertBinary(messageqcpp::ByteStream& bs,
{
bs >> val8;
// FIXME: IDK what would it mean if valN are unsigned
if (utils::is_negative(val8) &&
val8 != static_cast<int8_t>(joblist::TINYINTEMPTYROW) &&
val8 != static_cast<int8_t>(joblist::TINYINTNULL))
val8 != joblist::TINYINTEMPTYROW &&
val8 != joblist::TINYINTNULL)
{
val8 = 0;
pushWarning = true;
@ -1857,8 +1858,8 @@ uint8_t WE_DMLCommandProc::processBatchInsertBinary(messageqcpp::ByteStream& bs,
bs >> val16;
if (utils::is_negative(val16) &&
val16 != static_cast<int16_t>(joblist::SMALLINTEMPTYROW) &&
val16 != static_cast<int16_t>(joblist::SMALLINTNULL))
val16 != joblist::SMALLINTEMPTYROW &&
val16 != joblist::SMALLINTNULL)
{
val16 = 0;
pushWarning = true;
@ -1953,6 +1954,7 @@ uint8_t WE_DMLCommandProc::processBatchInsertBinary(messageqcpp::ByteStream& bs,
}
}
// FIXME: colValue is uint64_t (8 bytes)
memcpy(&colValue, valStr.c_str(), valStr.length());
break;