select; is valid in 9.4. This causes the two tests to exec successfully when

we're trying to get a syntax error.
pull/48/head
Karl Seguin 2014-11-17 21:21:08 +07:00
parent d857f18454
commit e5b2fbd819
2 changed files with 3 additions and 2 deletions

View File

@ -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)
}

View File

@ -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")
}