You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-08 14:22:09 +03:00
Silence -Werror=implicit-fallthrough compiler errors - Patch from Monty.
The patch also fixes some potential bugs due to missing break statements.
This commit is contained in:
@@ -114,10 +114,10 @@ public:
|
||||
{
|
||||
case 3:
|
||||
k1 ^= tail[2] << 16;
|
||||
|
||||
/* fall through */
|
||||
case 2:
|
||||
k1 ^= tail[1] << 8;
|
||||
|
||||
/* fall through */
|
||||
case 1:
|
||||
k1 ^= tail[0];
|
||||
k1 *= c1;
|
||||
|
@@ -84,6 +84,7 @@ int64_t Func_hour::getIntVal(rowgroup::Row& row,
|
||||
{
|
||||
isNull = true;
|
||||
}
|
||||
/* fall through */
|
||||
|
||||
case execplan::CalpontSystemCatalog::VARCHAR:
|
||||
case execplan::CalpontSystemCatalog::CHAR:
|
||||
|
@@ -83,6 +83,7 @@ int64_t Func_minute::getIntVal(rowgroup::Row& row,
|
||||
{
|
||||
isNull = true;
|
||||
}
|
||||
/* fall through */
|
||||
|
||||
case execplan::CalpontSystemCatalog::VARCHAR:
|
||||
case execplan::CalpontSystemCatalog::CHAR:
|
||||
|
@@ -912,6 +912,7 @@ execplan::IDB_Decimal Func_nullif::getDecimalVal(rowgroup::Row& row,
|
||||
exp2.value = value;
|
||||
exp2.scale = 0;
|
||||
}
|
||||
/* fall through */
|
||||
|
||||
case execplan::CalpontSystemCatalog::DOUBLE:
|
||||
case execplan::CalpontSystemCatalog::UDOUBLE:
|
||||
|
@@ -130,6 +130,7 @@ int64_t Func_quarter::getIntVal(rowgroup::Row& row,
|
||||
else
|
||||
{
|
||||
isNull = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -81,8 +81,9 @@ int64_t Func_second::getIntVal(rowgroup::Row& row,
|
||||
case execplan::CalpontSystemCatalog::DOUBLE:
|
||||
case execplan::CalpontSystemCatalog::FLOAT:
|
||||
{
|
||||
isNull = true;
|
||||
isNull = true;
|
||||
}
|
||||
/* fall through */
|
||||
|
||||
case execplan::CalpontSystemCatalog::VARCHAR:
|
||||
case execplan::CalpontSystemCatalog::CHAR:
|
||||
|
@@ -129,6 +129,7 @@ string Func_timediff::getStrVal(rowgroup::Row& row,
|
||||
|
||||
case execplan::CalpontSystemCatalog::TIME:
|
||||
isTime1 = true;
|
||||
/* fall through */
|
||||
case execplan::CalpontSystemCatalog::DATETIME:
|
||||
// Diff between time and datetime returns NULL in MariaDB
|
||||
if ((type2 == execplan::CalpontSystemCatalog::TIME ||
|
||||
@@ -229,6 +230,7 @@ string Func_timediff::getStrVal(rowgroup::Row& row,
|
||||
|
||||
case execplan::CalpontSystemCatalog::TIME:
|
||||
isTime2 = true;
|
||||
/* fall through */
|
||||
case execplan::CalpontSystemCatalog::DATETIME:
|
||||
val2 = parm[1]->data()->getDatetimeIntVal(row, isNull);
|
||||
break;
|
||||
|
@@ -1709,6 +1709,7 @@ void RowAggregation::updateEntry(const Row& rowIn)
|
||||
|
||||
// if NOT null, let execution fall through.
|
||||
if (isNull(&fRowGroupIn, rowIn, colIn) == true) break;
|
||||
/* fall through */
|
||||
|
||||
case ROWAGG_COUNT_ASTERISK:
|
||||
fRow.setUintField<8>(fRow.getUintField<8>(colOut) + 1, colOut);
|
||||
@@ -2467,6 +2468,7 @@ void RowAggregationUM::updateEntry(const Row& rowIn)
|
||||
|
||||
// if NOT null, let execution fall through.
|
||||
if (isNull(&fRowGroupIn, rowIn, colIn) == true) break;
|
||||
/* fall through */
|
||||
|
||||
case ROWAGG_COUNT_ASTERISK:
|
||||
fRow.setUintField<8>(fRow.getUintField<8>(colOut) + 1, colOut);
|
||||
|
@@ -744,6 +744,7 @@ void Row::initToNull()
|
||||
|
||||
case CalpontSystemCatalog::LONGDOUBLE:
|
||||
*((long double*) &data[offsets[i]]) = joblist::LONGDOUBLENULL;
|
||||
break;
|
||||
|
||||
case CalpontSystemCatalog::DATETIME:
|
||||
*((uint64_t*) &data[offsets[i]]) = joblist::DATETIMENULL;
|
||||
|
Reference in New Issue
Block a user