Bug 233

Summary: slonik segfaults on subscribe set, when the set does not exist.
Product: Slony-I Reporter: Steve Singer <ssinger>
Component: slonikAssignee: Steve Singer <ssinger>
Status: RESOLVED FIXED    
Severity: enhancement CC: slony1-bugs
Priority: low    
Version: 2.0   
Hardware: PC   
OS: Linux   
Attachments: fix for bug

Description Steve Singer 2011-08-18 06:43:36 UTC
If you try a slonik command like

subscribe set(id=9999, provider=1,receiver=2);

where set id 9999 does not exist:

#0  0xaf5c2c29 in ____strtol_l_internal (nptr=0x0, endptr=0x0,
base=10, group=0, loc=0xaf6cd360) at strtol_l.c:298
#1  0xaf5c29d8 in strtol (nptr=0x0, endptr=0x0, base=10) at strtol.c:110
#2  0x1747b8b1 in atoi (stmt=0x1749bb68) at /usr/include/stdlib.h:286
#3  slonik_subscribe_set (stmt=0x1749bb68) at slonik.c:3506
#4  0x1747deca in script_exec_stmts (script=<value optimized out>,
hdr=0x1749bb68) at slonik.c:1416
#5  0x1747e281 in script_exec_stmts (script=<value optimized out>,
hdr=0x1749bdd0) at slonik.c:1127
#6  0x1747e372 in script_exec (script=0x1749be18) at slonik.c:1091
#7  0x1747f2a5 in main (argc=1, argv=0xb8f874f4) at slonik.c:156
Comment 1 Steve Singer 2011-08-18 06:46:43 UTC
Created attachment 123 [details]
fix for bug

Fix for patch.
Based against REL_2_0_STABLE.
https://github.com/ssinger/slony1-engine/commit/ea2861bfd7fac5587977e6420047ef34d2aeb686
Comment 2 Christopher Browne 2011-08-24 12:23:41 UTC
Patch looks good.