]> git.sur5r.net Git - bacula/bacula/commitdiff
Close cursor in big sql query
authorEric Bollengier <eric@eb.homelinux.org>
Tue, 1 Feb 2011 12:39:40 +0000 (13:39 +0100)
committerKern Sibbald <kern@sibbald.com>
Sat, 20 Apr 2013 12:39:57 +0000 (14:39 +0200)
bacula/src/cats/postgresql.c

index a0cb1302a1612e87d98c75280e324dbc356b6a1d..598b39f7d1f0126eb68a26e6b23feb64afa520f6 100644 (file)
@@ -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: