Skip to content

Commit

Permalink
Fixed page size handling, it's an little endian int and not a big end…
Browse files Browse the repository at this point in the history
…ian int
  • Loading branch information
tiran committed Nov 6, 2011
1 parent 9f1179b commit 1cdee60
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion firebirdsql/wireprotocol.py
Expand Up @@ -230,7 +230,7 @@ def _op_create(self, page_size=4096):
dpb += bytes([63, 4]) + int_to_bytes(3, 4) # isc_dpb_sql_dialect = 3
dpb += bytes([24, 4]) + bint_to_bytes(1, 4) # isc_dpb_force_write = 1
dpb += bytes([54, 4]) + bint_to_bytes(1, 4) # isc_dpb_overwirte = 1
dpb += bytes([4, 4]) + bint_to_bytes(page_size, 4)
dpb += bytes([4, 4]) + int_to_bytes(page_size, 4)
p = xdrlib.Packer()
p.pack_int(self.op_create)
p.pack_int(0) # Database Object ID
Expand Down
2 changes: 1 addition & 1 deletion tests/tests.py
Expand Up @@ -28,7 +28,7 @@ def debug_print(msg):
print('dsn=', TEST_DSN)
TEST_USER = 'sysdba'
TEST_PASS = 'masterkey'
conn = firebirdsql.create_database(dsn=TEST_DSN, user=TEST_USER, password=TEST_PASS)
conn = firebirdsql.create_database(dsn=TEST_DSN, user=TEST_USER, password=TEST_PASS, page_size=2<<13)
conn.cursor().execute('''
CREATE TABLE foo (
a INTEGER NOT NULL,
Expand Down

0 comments on commit 1cdee60

Please sign in to comment.