diff --git a/src/server.rs b/src/server.rs index 5305e33..6d03a35 100644 --- a/src/server.rs +++ b/src/server.rs @@ -193,7 +193,7 @@ impl Server { // Error client didn't clean up! // We shuold drop this server 'E' => { - self.in_transaction = false; + self.in_transaction = true; } _ => { diff --git a/tests/python/tests.py b/tests/python/tests.py index c3fa47a..34f1933 100644 --- a/tests/python/tests.py +++ b/tests/python/tests.py @@ -3,7 +3,9 @@ import psycopg2 conn = psycopg2.connect("postgres://random:password@127.0.0.1:5433/db") cur = conn.cursor() -cur.execute("SELECT 123"); +cur.execute("SELECT $1", [1234]); res = cur.fetchall() -print(res) \ No newline at end of file +print(res) + +conn.commit() \ No newline at end of file