mySQL max_allowed_packet

Hi!

I just got the following mySQL error with a large blob: Communication link failure: 1153 Got a packet bigger than ‘max_allowed_packet’

Assuming, I cannot change the mySQL configuration, is there any way to make this whole thing work with Yii? A Yii option maybe?

Thanks

try to use:


'db'=>array(

   ...

   'initSQLs' => array(

      'set global max_allowed_packet = 1500000', // 1500000 - your value (if you have permissions to change this value - it helps)

   ),

),



in your main.php (‘components’ section)

Thanks. I get, however, an error message that CDbConnection.initSQLs was not defined. The documentation agrees with that.

If you want to try that out, you have to use the latest unreleased yii version from svn.

Thanks. The newest stable release (released today) does know this parameter. (However, I don’t need it any more. In the meantime, I found out that the oversized data came from wrong export data. An image (included in XML) was of the wrong format.)