In MySQL, you might run into the error 1153, where it said: “Got a packet bigger than ‘max_allowed_packet’ bytes”.
To fix this, you have to modify the max_allowed_packet size and make it bigger.
From the query editor:
SET GLOBAL max_allowed_packet=100000;
From the command line:
mysql --max_allowed_packet=100M
Or modify the file my.ini or my.cnf and put this line under [mysqld] section in your file:
max_allowed_packet=100M
The size is up to you, the bigger it is, the bigger packet size is allowed. The largest possible packet that can be transmitted to or from a MySQL 8.0 server or client is 1GB. You can see more from the documentation.
https://tableplus.com/blog/2018/08/mysq ... -size.html
Isso é muito interessante.
Independente do limite da tabela, com certeza não adianta aumentar o tamanho na tabela, se o pacote de transmissão não puder transmitir o que precisa.
À primeira vista, 4MB pra um comando é muito.
Mas, se for transmitir uma bíblia em json de 4.1MB.... o comando vai ser maior do que 4MB.
Nos meus testes, usando MariaDB não tive problema nenhum, nem no MySQL que tenho na internet, onde eles já devem colocar um limite gigante.
Isso é sobre o comando de gravação.
E isso depende de CADA SERVIDOR MYSQL/MARIADB, é uma configuração NO SERVIDOR.
Quem pretende salvar documentos em geral, é bom ficar atento ao limite, e a mensagem de erro referente ao limite.
NÃO importa se é ADO, hbMySQL, SQLMIX, etc. Isso é configuração no servidor.