Mysql PDO maximum LONGBLOB data length on fetch

后端 未结 1 1489
梦谈多话
梦谈多话 2020-12-21 02:45

I insert about 1.1 Mb of Data into a Mysql Field of type LONGBLOB. This is far away from the maximum supported length of a LONGBLOB field.

The insert seems to work.

相关标签:
1条回答
  • It was the MYSQL_ATTR_MAX_BUFFER_SIZE which is 1MB by default.

    This fixed the issue:

        $pdo->setAttribute(PDO::MYSQL_ATTR_MAX_BUFFER_SIZE, 1024*1024*50);  // 50 MB      
    
    0 讨论(0)
提交回复
热议问题