<h3 dir="auto">Describe the bug</h3>
<p dir="auto">when i execute db.fetch_all(query), then ValueError: not enough values to unpack expected 5, got 4 is existed</p>
<h3 dir="auto">To Reproduce</h3>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Settings = Table(
    &quot;settings&quot;,
    METADATA,
    Column(&quot;key&quot;, String(length=128), nullable=False, index=True, unique=True),
    Column(&quot;value&quot;, JSON, nullable=True),
)

query = select([Settings])
    db = DB.get()
    async with db.transaction():
        result = await db.fetch_all(query)"><pre class="notranslate"><span class="pl-v">Settings</span> <span class="pl-c1">=</span> <span class="pl-v">Table</span>(
    <span class="pl-s">"settings"</span>,
    <span class="pl-v">METADATA</span>,
    <span class="pl-v">Column</span>(<span class="pl-s">"key"</span>, <span class="pl-v">String</span>(<span class="pl-s1">length</span><span class="pl-c1">=</span><span class="pl-c1">128</span>), <span class="pl-s1">nullable</span><span class="pl-c1">=</span><span class="pl-c1">False</span>, <span class="pl-s1">index</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">unique</span><span class="pl-c1">=</span><span class="pl-c1">True</span>),
    <span class="pl-v">Column</span>(<span class="pl-s">"value"</span>, <span class="pl-v">JSON</span>, <span class="pl-s1">nullable</span><span class="pl-c1">=</span><span class="pl-c1">True</span>),
)

<span class="pl-s1">query</span> <span class="pl-c1">=</span> <span class="pl-en">select</span>([<span class="pl-v">Settings</span>])
    <span class="pl-s1">db</span> <span class="pl-c1">=</span> <span class="pl-v">DB</span>.<span class="pl-en">get</span>()
    <span class="pl-k">async</span> <span class="pl-k">with</span> <span class="pl-s1">db</span>.<span class="pl-en">transaction</span>():
        <span class="pl-s1">result</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-s1">db</span>.<span class="pl-en">fetch_all</span>(<span class="pl-s1">query</span>)</pre></div>
<h3 dir="auto">Error</h3>
<p dir="auto">ERROR:    Exception in ASGI application<br>
Traceback (most recent call last):<br>
File "/usr/local/lib/python3.8/dist-packages/xxx/api/v1/setting.py", line 114, in list_settings<br>
db_settings = await db_api.list_settings()<br>
File "/usr/local/lib/python3.8/dist-packages/xxx/db/api.py", line 35, in wrapper<br>
return await fn(*args, **kwargs)<br>
File "/usr/local/lib/python3.8/dist-packages/xxx/db/api.py", line 84, in list_settings<br>
result = await db.fetch_all(sql)<br>
File "/usr/local/lib/python3.8/dist-packages/databases/core.py", line 149, in fetch_all<br>
return await connection.fetch_all(query, values)<br>
File "/usr/local/lib/python3.8/dist-packages/databases/core.py", line 271, in fetch_all<br>
return await self._connection.fetch_all(built_query)<br>
File "/usr/local/lib/python3.8/dist-packages/databases/backends/sqlite.py", line 95, in fetch_all<br>
metadata = CursorResultMetaData(context, cursor.description)<br>
File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/engine/cursor.py", line 190, in <strong>init</strong></p>
<h3 dir="auto">Versions</h3>
<ul dir="auto">
<li>OS: Centos 8</li>
<li>Python: 3.8</li>
<li>SQLAlchemy: 1.4.42</li>
<li>Database: sqlite3</li>
<li>DBAPI (eg: psycopg, cx_oracle, mysqlclient):</li>
</ul>
<h3 dir="auto">Additional context</h3>
<p dir="auto">I modified /usr/local/lib/python3.8/dist-packages/sqlalchemy/engine/cursor.py<br>
_compile():<br>
execution_context.result_column_struct = (<br>
compiled._result_columns,<br>
compiled._ordered_columns,<br>
compiled._textual_ordered_columns,<br>
None,  # add<br>
compiled._loose_column_name_matching,<br>
)<br>
when I add None in excution_context.result_column_struct，the error disappeared.</p>
<h3 dir="auto">Describe the bug</h3>
<p dir="auto">When following the FastAPI Async Rational DB(<a href="https://fastapi.tiangolo.com/advanced/async-sql-databases/" rel="nofollow">https://fastapi.tiangolo.com/advanced/async-sql-databases/</a>) turtorial I was unable to complete it as I kept getting the issue(see stackoverflow <a href="https://stackoverflow.com/questions/74089620/python-databases-library-cant-fetch-all-from-mysql-database" rel="nofollow">https://stackoverflow.com/questions/74089620/python-databases-library-cant-fetch-all-from-mysql-database</a>)<br>
However after downgrading it fixed the issue</p>
<h3 dir="auto">To Reproduce</h3>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="see fastapi turtorial"><pre class="notranslate"><span class="pl-s1">see</span> <span class="pl-s1">fastapi</span> <span class="pl-s1">turtorial</span></pre></div>
<h3 dir="auto">Error</h3>
<p dir="auto">File "c:\users\nikhi\desktop\upwork\srinath srinath\api_project\venv\lib\site-packages\databases\backends\mysql.py", line 115, in fetch_all<br>
metadata = CursorResultMetaData(context, cursor.description)<br>
File "c:\users\nikhi\desktop\upwork\srinath srinath\api_project\venv\lib\site-packages\sqlalchemy\engine\cursor.py", line 164, in <strong>init</strong><br>
(<br>
ValueError: not enough values to unpack (expected 5, got 4)</p>
<h3 dir="auto">Versions</h3>
<ul dir="auto">
<li>OS:</li>
<li>Python: 3,10</li>
<li>SQLAlchemy: 1.4.42</li>
<li>Database: Mysql seems to be every version</li>
<li>DBAPI (eg: psycopg, cx_oracle, mysqlclient):</li>
</ul>
<h3 dir="auto">Additional context</h3>
<p dir="auto"><em>No response</em></p>