Skip to content

Commit

Permalink
Fix page number size in Connection.info.get_info
Browse files Browse the repository at this point in the history
  • Loading branch information
pcisar committed Dec 23, 2024
1 parent 86f570b commit 60bca03
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [1.10.8] - 2024-12-23

### Fixed

- Fix page number size in `DatabaseInfoProvider3.get_info`.

## [1.10.7] - 2024-12-15

### Changed
Expand Down
5 changes: 5 additions & 0 deletions docs/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
Changelog
#########

Version 1.10.8
==============

- Fix page number size in `.DatabaseInfoProvider3.get_info`.

Version 1.10.7
==============

Expand Down
2 changes: 1 addition & 1 deletion src/firebird/driver/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@
Server, Statement)

#: Current driver version, SEMVER string.
__VERSION__ = '1.10.7'
__VERSION__ = '1.10.8'
4 changes: 2 additions & 2 deletions src/firebird/driver/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1299,8 +1299,8 @@ def get_info(self, info_code: DbInfoCode, page_number: int=None) -> Any:
self.response.clear()
request = bytes([info_code])
if info_code == DbInfoCode.PAGE_CONTENTS:
request += (8).to_bytes(2, 'little')
request += page_number.to_bytes(8, 'little')
request += (4).to_bytes(2, 'little')
request += page_number.to_bytes(4, 'little')
if len(self.response.raw) < self.page_size + 10:
self.response.resize(self.page_size + 10)
self._get_data(request)
Expand Down

0 comments on commit 60bca03

Please sign in to comment.