+static struct result_set *get_set(struct session_handle *sh, const char *name)
+{
+ struct result_set *set = sh->result_sets;
+ for (; set; set = set->next)
+ if (!strcmp(name, set->name))
+ return set;
+ return 0;
+}
+
+static void remove_sets(struct session_handle *sh)
+{
+ struct result_set *set = sh->result_sets;
+ while (set)
+ {
+ struct result_set *set_next = set->next;
+ xfree(set->name);
+ xfree(set->db);
+ xfree(set);
+ set = set_next;
+ }
+ sh->result_sets = 0;
+}
+