|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2020-06-21 17:48 UTC] bugreports2 at gmail dot com
[2020-06-21 17:52 UTC] cbimax at gmail dot com
[2020-06-21 17:56 UTC] bugreports2 at gmail dot com
[2020-06-21 18:06 UTC] cbimax at gmail dot com
[2020-06-21 18:08 UTC] bugreports2 at gmail dot com
[2020-06-21 18:12 UTC] cbimax at gmail dot com
[2020-06-21 18:14 UTC] bugreports2 at gmail dot com
[2020-06-21 18:18 UTC] cbimax at gmail dot com
[2020-06-21 18:23 UTC] bugreports2 at gmail dot com
[2020-06-21 18:27 UTC] cbimax at gmail dot com
[2020-06-21 18:37 UTC] bugreports2 at gmail dot com
[2020-06-21 18:42 UTC] cbimax at gmail dot com
[2020-06-21 18:50 UTC] bugreports2 at gmail dot com
[2020-06-21 18:55 UTC] cbimax at gmail dot com
[2020-06-21 18:59 UTC] bugreports2 at gmail dot com
[2020-06-21 19:03 UTC] cbimax at gmail dot com
[2020-06-21 19:08 UTC] bugreports2 at gmail dot com
[2020-06-21 19:10 UTC] nikic@php.net
[2020-06-21 19:17 UTC] cbimax at gmail dot com
[2020-12-03 23:04 UTC] dharman@php.net
-Status: Open
+Status: Not a bug
-Assigned To:
+Assigned To: dharman
[2020-12-03 23:04 UTC] dharman@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 20:00:01 2025 UTC |
Description: ------------ We run extended queries to build OLAP' indexes. On previous version, when we issue: $statement = "Insert Into summary ( operation, customs, trader, product, country, provenance, via, fob, freight, cif, quantity, net, gross, movements ) ( Select operation, customs, trader, product, country, provenance, via, sum( fob ), sum( freight ), sum( cif ), sum( quantity ), sum( net ), sum( gross ), sum( movements ) From summary Group by 1, 2, 3, 4, 5, 6, 7 )"; $connection->query( $statement ); the query could run for a few days (ordinary between 3 to 5 days). After update to PHP 7.2.24 (cli), the statement continue running on MariaDB but the PHP script throws an error without any description. Test script: --------------- function compute_totals() { $sql = "Insert Into summary ( operation, customs, trader, product, country, "; $sql.= "provenance, via, fob, freight, cif, quantity, net, gross, movements ) "; $sql.= "( Select operation, customs, trader, product, country, "; $sql.= "provenance, via, sum( fob ), sum( freight ), sum( cif ), "; $sql.= "sum( quantity ), sum( net ), sum( gross ), sum( movements ) "; $sql.= "From summary Group by 1, 2, 3, 4, 5, 6, 7 )"; if( !$connection->query( $sql ) ) { $error = mysqli_error(); echo "Critical error [$error] on compute totals."; echo "Last SQL instruction: [$sql]"; exit(1); } } We can see thru mytop that the query is up and running but the script stop after exact 1 day: MariaDB on localhost (10.4.12-MariaDB) up 1+06:28:32 [14:41:17] Queries: 216.0 qps: 0 Slow: 2.0 Se/In/Up/De(%): 08/00/00/00 Sorts: 0 qps now: 1 Slow qps: 0.0 Threads: 3 ( 8/ 1) 00/00/00/00 Handler: (R/W/U/D) 0/ 1696/ 0/ 0 Tmp: R/W/U: 104/ 104/ 0 ISAM Key Efficiency: 100.0% Bps in/out: 0.1/ 7.9 Now in/out: 22.7/ 3.7k Id User Host/IP DB Time % Cmd State Query -- ---- ------- -- ---- - --- ----- ---------- 11 root localhost br 88874 0.0 Query Creating sort i Insert Into summary ( operation, customs, trader, product, country, provenance, via, fob, freight, cif, quantity, net, gross, movements ) ( Select operation, customs, trader, product, country, provenance, via, sum( fob ), sum( freight ), sum( cif ), sum( quantity ), sum( net ), sum( gross ), sum( movements ) From summary Group by 1, 2, 3, 4, 5, 6, 7 ) And our log reports didn't show any error informed by mysqli_error: [23110] 2020-06-21 14:00:03 Critical error [] on compute_totals() [23110] 2020-06-21 14:00:03 Last SQL instruction: [Insert Into summary ( operation, customs, trader, product, country, provenance, via, fob, freight, cif, quantity, net, gross, movements ) ( Select operation, customs, trader, product, country, provenance, via, sum( fob ), sum( freight ), sum( cif ), sum( quantity ), sum( net ), sum( gross ), sum( movements ) From summary Group by 1, 2, 3, 4, 5, 6, 7 )] Expected result: ---------------- $connection->query( $statement ), should wait up to the query is finished. Actual result: -------------- $connection->query( $statement ), drops after exact 1 day of waiting the MariaDB query to complete.