diff options
author | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2014-04-03 02:34:43 +0100 |
---|---|---|
committer | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2014-04-03 02:35:56 +0100 |
commit | a8fdc7409045e215a04148551bed76bdb9ec108c (patch) | |
tree | c4abd68081ae2f0627586c496cc4604ac614be33 /tests/test_lobject.py | |
parent | dfacc483b575eb46093c883966b1829c2d2f2e7e (diff) | |
download | psycopg2-a8fdc7409045e215a04148551bed76bdb9ec108c.tar.gz |
Fixed overflow opening a lobject with an oid not fitting in a signed int
Fixes :ticket:`203`.
Diffstat (limited to 'tests/test_lobject.py')
-rwxr-xr-x | tests/test_lobject.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/test_lobject.py b/tests/test_lobject.py index e62e0d8..beb277b 100755 --- a/tests/test_lobject.py +++ b/tests/test_lobject.py @@ -373,6 +373,12 @@ class LargeObjectTests(LargeObjectTestCase): finally: self.conn.tpc_commit() + def test_large_oid(self): + # Test we don't overflow with an oid not fitting a signed int + try: + self.conn.lobject(0xFFFFFFFE) + except psycopg2.OperationalError: + pass decorate_all_tests(LargeObjectTests, skip_if_no_lo, skip_lo_if_green) |