Skip to content

Commit

Permalink
Bug 794765 - when saving as into a PostgreSQL database, things fail b…
Browse files Browse the repository at this point in the history
…ecause of renaming the numtest table twice
  • Loading branch information
gjanssens committed Mar 29, 2018
1 parent 55a2504 commit 157f43d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/backend/dbi/gnc-backend-dbi.c
Original file line number Diff line number Diff line change
Expand Up @@ -3326,7 +3326,8 @@ conn_test_dbi_library( dbi_conn conn )
GncDbiTestResult retval = GNC_DBI_PASS;
memset( doublestr, 0, sizeof(doublestr));

result = dbi_conn_query( conn, "CREATE TEMPORARY TABLE numtest "
result = dbi_conn_query( conn, "DROP TABLE IF EXISTS numtest;"
"CREATE TEMPORARY TABLE numtest "
"( test_int BIGINT, test_unsigned BIGINT,"
" test_double FLOAT8 )" );
if ( result == NULL )
Expand All @@ -3344,6 +3345,7 @@ conn_test_dbi_library( dbi_conn conn )
if ( result == NULL )
{
PWARN("Test_DBI_Library: Failed to insert test row into table" );
result = dbi_conn_query( conn, "DROP TABLE numtest" );
return GNC_DBI_FAIL_SETUP;
}
dbi_result_free( result );
Expand Down

0 comments on commit 157f43d

Please sign in to comment.