SA-MP Forums Archive
Max query size - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Max query size (/showthread.php?tid=557582)



Max query size - Banditukas - 14.01.2015

Hi,

What is max query size? because i see syntax error sometimes, and there is no mistakes in format like field bad write or something else, string is escaping and normal query is working, but how i said maybe when it'is longer, maybe more money or messages which are saving is longer then query become with errors, when i drop some staff from query and no more problems, but i think there is a max query size i can use then query is no more reading. Maybe possible to change it? i use mysql BLUEG r38 latest plugin.


Re: Max query size - CalvinC - 14.01.2015

Just found this after a quick ****** search.
Quote:
Originally Posted by Misiur
Посмотреть сообщение
There are at least four limitations:
1. MySQL max allowed packet size http://dev.mysql.com/doc/refman/5.1/...too-large.html
2. http://dev.mysql.com/doc/refman/5.0/...eal-query.html (max unsigned long, so 4,294,967,295 - 1 bytes)
3. I'm not sure about this one, but unpacked strings (the default ones) are not char sized, but cell sized (so 4 bytes, not 1).
4. Your heap size (which in turn will make AMX gigantic [well, you could use y_malloc to do this at runtime though])

Are there better options? Yup, split your insert query into smaller chunks, and wrap it with a transaction to ensure that everything is saved only if all of the queries were successful.



Re: Max query size - Banditukas - 14.01.2015

But why i get syntax error? i don't get error for not allowed pack, my string is about [ 6000 ]