OptimizedBigInt on Mysql 8.*

OptimizedBigInt on Mysql 8.*

Hi,

I have OptimizedBigInt on in options, and in MySQL server 5.7 this SQL works well and produces an integer field type:

FLOOR((DATEDIFF(CURRENT_DATE, STR_TO_DATE(Birthdate, "%Y-%m-%d")) / 365)) AS Age

But on MySQL 8.*, I am getting:

Type mismatch for field 'Age', expecting: Integer, actual: LargeInt.

How can I resolve this so it works on both MySQL versions?

I already tried to CAST(... AS SIGNED) but no success.

Thanks!

Pedja