aio-libs / aiomysql

aiomysql is a library for accessing a MySQL database from the asyncio
https://aiomysql.rtfd.io
MIT License
1.76k stars 257 forks source link

Aiomysql query returns data from another query #783

Closed Vinc135 closed 2 years ago

Vinc135 commented 2 years ago

Describe the bug

Hello. I have the same error as this guy from 2016: https://github.com/aio-libs/aiomysql/issues/88

When two connections are creating at the same time and selecting a data from the database, the results are switching. Exactly like this guy from the other issue. I had the error at version 0.1.0 and then downgraded the version to 0.0.22 and now this error is already gone but sometimes it happens again. Pls help me

To Reproduce

Creating a pool and then creating two cursor in different files at the same time like with an event and selecting two datas from two different tables. Then fetch the results.

Expected behavior

I expect that I get the result I selected from the table.

Logs/tracebacks

I get the result from the other connection, which selected an other data from an other table.

Python Version

$ python --version
3.10.2

aiomysql Version

$ python -m pip show aiomysql
First 0.1.0 and after downgrading 0.0.22

PyMySQL Version

$ python -m pip show PyMySQL
0.9.3

SQLAlchemy Version

$ python -m pip show sqlalchemy

OS

I dont know on which OS my server runs.

Database type and version

SELECT VERSION();
('10.6.7-MariaDB-1:10.6.7+maria~bionic',)

Additional context

No response

Code of Conduct

Vinc135 commented 2 years ago

The error is back, but I am using 0.0.22

Nothing4You commented 2 years ago

Hi,

sorry for the late response.

If you're still experiencing this, can you provide a reproducible example?

Are you using multiple cursors from the same connection or are you using different connections? Multiple cursors from the same connection are just pointing to the same data, see also #24.

Vinc135 commented 2 years ago

Hello. No my friend helped me and the error is gone now

rsking01 commented 1 year ago

Hello. No my friend helped me and the error is gone now

Hello, I faced the same problem. What helped you solve it?

yujiacheng12138 commented 7 months ago

你好。不,我的朋友帮助了我,错误现在消失了

Hello. No my friend helped me and the error is gone now

Hello, I faced the same problem,How was it resolved?

yujiacheng12138 commented 7 months ago

@Vinc135 help!!!