From 05250d93741a713d1d6e14e3da1360ebf832193e Mon Sep 17 00:00:00 2001 From: Lev Kokotov Date: Thu, 3 Feb 2022 18:13:36 -0800 Subject: [PATCH] fix --- src/server.rs | 2 +- tests/python/tests.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) 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