Skip to content

Commit 69d5989

Browse files
authored
fix: trans physical_pos into int when calculate the layout of disk (#75)
1 parent 1566a63 commit 69d5989

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "pyinnodb"
3-
version = "0.0.20"
3+
version = "0.0.21"
44
description = "A parser for InnoDB file formats, in Python"
55
authors = [
66
{ name = "WinChua", email = "winchua@foxmail.com" }

src/pyinnodb/cli/validate.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from pyinnodb.disk_struct.fil import MFil
22
from pyinnodb.disk_struct.fsp import MFspHeader
3+
from io import BytesIO
34

45
from . import *
56

src/pyinnodb/sdi/table.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ def get_disk_data_layout(self):
381381
data_layout_col = []
382382
for i, c in enumerate(self.columns):
383383
data_layout_col.append((c, c_l.get(i, const.FFFFFFFF)))
384-
data_layout_col.sort(key=lambda c: c[0].private_data.get("physical_pos", 0))
384+
data_layout_col.sort(key=lambda c: int(c[0].private_data.get("physical_pos", 0)))
385385
return data_layout_col
386386

387387
data_layout_col = []

0 commit comments

Comments
 (0)