• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/internals/database/helper/mysql.php
  • Класс: BitrixTasksInternalsDataBaseHelper
  • Вызов: Helper::getMaxTransferUnit
static function getMaxTransferUnit()
{
	static $mtu;

	if(!$mtu)
	{
		$dbConnection = MainHttpApplication::getConnection();

		$res = $dbConnection->query("SHOW VARIABLES LIKE 'max_allowed_packet'")->fetch();
		if(!($res['Variable_name'] == 'max_allowed_packet' && $mtu = intval($res['Value'])))
		{
			return 0;
		}
	}

	return $mtu;
}