createCommand() in MariaDB and MySQL

Hi,

My MariaDB server gives wrong variable type when using Yii::$app->db->createCommand(‘SELECT…’)->getOne();

In MySQL 5.6

$product=Product::find()->where([‘id’=>$id])->one();

$product->id is of type (int).

$product=Yii::$app->db->createCommand(‘SELECT * FROM product WHERE id=:id’, [‘id’=>$id])->getOne();

$product[‘id’] is of type (int).

In MariaDB 5.5

$product=Product::find()->where([‘id’=>$id])->one();

$product->id is of type (int).

$product=Yii::$app->db->createCommand(‘SELECT * FROM product WHERE id=:id’, [‘id’=>$id])->getOne();

$product[‘id’] is of type (string).

I did not check this with MariaDB 10.x. Is there any configuration changes required if we use MariaDB?