]> granicus.if.org Git - pgbouncer/commitdiff
varcache: allow empty string for server-side variable.
authorMarko Kreen <markokr@gmail.com>
Thu, 19 Jan 2012 09:58:36 +0000 (11:58 +0200)
committerMarko Kreen <markokr@gmail.com>
Thu, 19 Jan 2012 09:58:36 +0000 (11:58 +0200)
Seems application_name is broken otherwise.

Reported-by: Tim Bunce
src/varcache.c

index ea2fc29c41d2ed97025660384897d24cf0f1f37e..7a795cd42fd45a8067a1c17d0e221cb81cf8c881 100644 (file)
@@ -67,8 +67,8 @@ set_value:
        strpool_decref(cache->var_list[lk->idx]);
        cache->var_list[lk->idx] = NULL;
 
-       /* ignore empty value */
-       if (!value || !value[0])
+       /* NULL value? */
+       if (!value)
                return false;
 
        /* set new value */