You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This library fails to read database, and sadly after 6 hours of testing I can only say "I don't what's wrong".
One possibility I can think of is trio-mysql not supporting the mysql 8.x, while pymysql does.
Should I just downgrade or switch to sqlalchemy-aio for now?
To Reproduce
Schema:
CREATEDATABASEtest_mysql CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
USE test_mysql
CREATETABLE `test` (
`id`intNOT NULL AUTO_INCREMENT,
`val`varchar(1023) COLLATE utf8mb4_0900_ai_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
AUTO_INCREMENT=1;
INSERT INTO test(val) VALUES("test post that shouldn't get deleted");
Should looks like this:
mysql> select * from test;
+----+--------------------------------------+
| id | val |
+----+--------------------------------------+
| 1 | test post that shouldn't get deleted |
+----+--------------------------------------+
DB User> root
DB Pwd >
DB Name> test_mysql
Created DB connection
E:\github\StreamNotifier-Web\venv\lib\site-packages\trio_mysql\connections.py:670: RuntimeWarning: coroutine 'caching_sha2_password_auth' was never awaited
await self._request_authentication()
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
Traceback (most recent call last):
File "C:\Users\jupiterbjy\AppData\Roaming\JetBrains\PyCharm2021.3\scratches\scratch.py", line 32, in <module>
trio.run(fetch_db)
File "E:\github\StreamNotifier-Web\venv\lib\site-packages\trio\_core\_run.py", line 1932, in run
raise runner.main_task_outcome.error
File "C:\Users\jupiterbjy\AppData\Roaming\JetBrains\PyCharm2021.3\scratches\scratch.py", line 25, in fetch_db
async with get_db() as conn:
File "E:\github\StreamNotifier-Web\venv\lib\site-packages\trio_mysql\connections.py", line 616, in __aenter__
await self.connect()
File "E:\github\StreamNotifier-Web\venv\lib\site-packages\trio_mysql\connections.py", line 683, in connect
await self.autocommit(self.autocommit_mode)
File "E:\github\StreamNotifier-Web\venv\lib\site-packages\trio_mysql\connections.py", line 442, in autocommit
await self._send_autocommit_mode()
File "E:\github\StreamNotifier-Web\venv\lib\site-packages\trio_mysql\connections.py", line 460, in _send_autocommit_mode
await self._read_ok_packet()
File "E:\github\StreamNotifier-Web\venv\lib\site-packages\trio_mysql\connections.py", line 448, in _read_ok_packet
pkt = await self._read_packet()
File "E:\github\StreamNotifier-Web\venv\lib\site-packages\trio_mysql\connections.py", line 742, in _read_packet
raise err.InternalError(
trio_mysql.err.InternalError: Packet sequence number wrong - got 3 expected 1
Describe the bug
This library fails to read database, and sadly after 6 hours of testing I can only say "I don't what's wrong".
One possibility I can think of is trio-mysql not supporting the mysql 8.x, while pymysql does.
Should I just downgrade or switch to sqlalchemy-aio for now?
To Reproduce
Schema:
Should looks like this:
Code:
Output
Expected behavior
Equivalent code:
output:
Environment
The text was updated successfully, but these errors were encountered: