From: Eric Bollengier Date: Tue, 1 Feb 2011 12:39:40 +0000 (+0100) Subject: Close cursor in big sql query X-Git-Tag: Release-7.0.0~1185 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=4b485f8f290aa4113b3ed4e0ae0300fbca3201a9;p=bacula%2Fbacula Close cursor in big sql query --- diff --git a/bacula/src/cats/postgresql.c b/bacula/src/cats/postgresql.c index a0cb1302a1..598b39f7d1 100644 --- a/bacula/src/cats/postgresql.c +++ b/bacula/src/cats/postgresql.c @@ -510,9 +510,10 @@ bool B_DB_POSTGRESQL::db_big_sql_query(const char *query, } while (m_num_rows > 0); /* TODO: Can probably test against 100 */ - sql_free_result(); + sql_query("CLOSE _bac_cursor"); Dmsg0(500, "db_big_sql_query finished\n"); + sql_free_result(); retval = true; bail_out: