Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swoole-v4.7.1-dev postgresql 多并发insert 报错。 #4373

Closed
c2498168786 opened this issue Aug 13, 2021 · 2 comments
Closed

Swoole-v4.7.1-dev postgresql 多并发insert 报错。 #4373

c2498168786 opened this issue Aug 13, 2021 · 2 comments

Comments

@c2498168786
Copy link

c2498168786 commented Aug 13, 2021

Please answer these questions before submitting your issue. Thanks!

  1. What did you do? If possible, provide a simple script for reproducing the error.
<?php
use Swoole\Coroutine\PostgreSQL;
use function Swoole\Coroutine\run;

run(function () {
    $pg = new PostgreSQL();
    $conn = $pg->connect("host=127.0.0.1 port=5432 dbname=test user=root password=");
    //  Super long, such as 1000 lines,once inserted
    $result = $pg->query("insert into table(\"id\"......) value(........)");
    $arr = $pg->fetchAll($result);
    var_dump($arr);
});

12
121

1211

  1. What did you expect to see?

  2. What did you see instead?

  3. What version of Swoole are you using (show your php --ri swoole)?
    swoole
    Swoole => enabled
    Author => Swoole Team [email protected]
    Version => 4.7.1-dev

swoole_postgresql

Swoole PostgreSQL => enabled
Author => Swoole Team [email protected]
Version => 4.7.1-dev
Built => Aug 13 2021 19:34:18
trace_log => enabled

  1. What is your machine environment used (show your uname -a & php -v & gcc -v) ?

Linux .qcd.ak.lan 3.10.0-1127.19.1.el7.x86_64 #1 SMP Tue Aug 25 17:23:54 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

PHP 7.2.34 (cli) (built: Aug 13 2021 15:40:51) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies

@matyhtf matyhtf closed this as completed Sep 30, 2021
@matyhtf
Copy link
Member

matyhtf commented Sep 30, 2021

This problem has been fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants