rryqszq4 / ngx-php

ngx-php - Embedded php7 or php8 scripting language for nginx module. Mainline development version of the ngx-php.
BSD 2-Clause "Simplified" License
626 stars 56 forks source link

Error in mysql async #83

Closed joanhey closed 3 years ago

joanhey commented 4 years ago

When using multiqueries.

while ($query_count--) {
        $id     = mt_rand(1, 10000);
        $world  = (yield from $my->query("SELECT id,randomNumber FROM World WHERE id = $id"))[0];

        $world['randomNumber'] = mt_rand(1, 10000);
        $update .="UPDATE World SET randomNumber = {$world['randomNumber']} WHERE id = $id;";
        $arr[] = $world;
    }
    yield from $my->query($update);

The update fail. https://travis-ci.org/TechEmpower/FrameworkBenchmarks/jobs/608620366#L1423