1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +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:
Gagan Goel
2020-06-26 12:28:39 -04:00
parent 31df46168d
commit 2ba9263df4
15 changed files with 25 additions and 6 deletions

View File

@ -84,6 +84,7 @@ int64_t Func_hour::getIntVal(rowgroup::Row& row,
{
isNull = true;
}
/* fall through */
case execplan::CalpontSystemCatalog::VARCHAR:
case execplan::CalpontSystemCatalog::CHAR:

View File

@ -83,6 +83,7 @@ int64_t Func_minute::getIntVal(rowgroup::Row& row,
{
isNull = true;
}
/* fall through */
case execplan::CalpontSystemCatalog::VARCHAR:
case execplan::CalpontSystemCatalog::CHAR:

View File

@ -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:

View File

@ -130,6 +130,7 @@ int64_t Func_quarter::getIntVal(rowgroup::Row& row,
else
{
isNull = true;
break;
}
}

View File

@ -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:

View File

@ -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;