Req #70020 [Opn->Wfx]: Make mysqli->multi_query use separate packets

From: Date: Thu, 06 Apr 2017 09:52:59 +0000
Subject: Req #70020 [Opn->Wfx]: Make mysqli->multi_query use separate packets
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-208352@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=70020&edit=1 ID: 70020 Updated by: johannes@php.net Reported by: mail at tomsommer dot dk Summary: Make mysqli->multi_query use separate packets -Status: Open +Status: Wont fix Type: Feature/Change Request Package: MySQLi related PHP Version: 5.6.10 Block user comment: N Private report: N New Comment: doing this would require parsing the string, as a MySQL package only allows complete commands. Also the client doesn't know the servers max packet size, making it hard to find the optimal splitting. Thirdly we'd have an issue with error situations. If sent in one big query the server won't continue after an error with the remaining items. To emulate this behaviour we'd have to wait for the response from first batch, till we can send the next batch. Previous Comments: ------------------------------------------------------------------------ [2015-07-08 11:20:23] mail at tomsommer dot dk Description: ------------ When executing a large query through mysqli->multi_query() you can hit MySQL's max_allowed_packet setting, because all queries are sent as one packet, rather than one query per packet. Test script: --------------- $largefiledata = file_get_contents('10G.sql'); $mysqli->multi_query($largefiledata); ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=70020&edit=1

« previous php.bugs (#208352) next »