From e5b2fbd8196e610344565789690d41333f073cb7 Mon Sep 17 00:00:00 2001 From: Karl Seguin Date: Mon, 17 Nov 2014 21:21:08 +0700 Subject: [PATCH] select; is valid in 9.4. This causes the two tests to exec successfully when we're trying to get a syntax error. --- conn_pool_test.go | 3 ++- conn_test.go | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/conn_pool_test.go b/conn_pool_test.go index 6164ff44..724fcf42 100644 --- a/conn_pool_test.go +++ b/conn_pool_test.go @@ -168,9 +168,10 @@ func TestPoolReleaseWithTransactions(t *testing.T) { t.Fatalf("Unable to acquire connection: %v", err) } mustExec(t, conn, "begin") - if _, err = conn.Exec("select"); err == nil { + if _, err = conn.Exec("selct"); err == nil { t.Fatal("Did not receive expected error") } + if conn.TxStatus != 'E' { t.Fatalf("Expected TxStatus to be 'E', instead it was '%c'", conn.TxStatus) } diff --git a/conn_test.go b/conn_test.go index 517f6053..c6264f77 100644 --- a/conn_test.go +++ b/conn_test.go @@ -294,7 +294,7 @@ func TestExecFailure(t *testing.T) { conn := mustConnect(t, *defaultConnConfig) defer closeConn(t, conn) - if _, err := conn.Exec("select;"); err == nil { + if _, err := conn.Exec("selct;"); err == nil { t.Fatal("Expected SQL syntax error") }