Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion async_gaussdb/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@

import typing

__version__: typing.Final = '0.30.0'
__version__: typing.Final = '0.30.1'
10 changes: 8 additions & 2 deletions async_gaussdb/protocol/protocol.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -895,8 +895,14 @@ cdef class BaseProtocol(CoreProtocol):

if self.result_type == RESULT_FAILED:
if isinstance(self.result, dict):
exc = apg_exc_base.GaussDBError.new(
self.result, query=self.last_query)
sql_state = self.result.get('C')
if sql_state and sql_state=='29P06':
exc = apg_exc.InvalidCachedStatementError(
'cached statement plan is invalid'
)
else:
exc = apg_exc_base.GaussDBError.new(
self.result, query=self.last_query)
else:
exc = self.result
waiter.set_exception(exc)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ dependencies = [
]

[project.urls]
github = "https://github.com/MagicStack/async_gaussdb"
github = "https://github.com/HuaweiCloudDeveloper/gaussdb-python-async"

[project.optional-dependencies]
gssauth = [
Expand Down
4 changes: 1 addition & 3 deletions tests/test_cache_invalidation.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ def _check_statements_are_closed(self, statements):
self.assertGreater(len(statements), 0)
self.assertTrue(all(s.closed for s in statements))

@unittest.skip('cached plan must not change result type')
async def test_prepare_cache_invalidation_silent(self):
await self.con.execute('CREATE TABLE tab1(a int, b int)')

Expand All @@ -49,7 +48,6 @@ async def test_prepare_cache_invalidation_silent(self):
finally:
await self.con.execute('DROP TABLE tab1')

@unittest.skip('cached plan must not change result type')
async def test_prepare_cache_invalidation_in_transaction(self):
await self.con.execute('CREATE TABLE tab1(a int, b int)')

Expand Down Expand Up @@ -311,7 +309,7 @@ async def test_type_cache_invalidation_on_change_attr(self):

@unittest.skip('UNLISTEN statement is not yet supported.')
async def test_type_cache_invalidation_in_pool(self):
await self.con.execute('CREATE DATABASE IF NOT EXISTS testdb')
await self.con.execute('CREATE DATABASE testdb')
pool = await self.create_pool(database='postgres',
min_size=2, max_size=2)

Expand Down