Permalink
Browse files

Fix for bug244.

Require a set id on create set.
Otherwise it will create set -1 which casues problems later on.
  • Loading branch information...
1 parent d18618f commit 0573d0d049c596bc837840160f16d49e48947123 @ssinger ssinger committed Nov 9, 2011
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/slonik/slonik.c
View
@@ -541,7 +541,13 @@ script_check_stmts(SlonikScript * script, SlonikStmt * hdr)
{
SlonikStmt_create_set *stmt =
(SlonikStmt_create_set *) hdr;
-
+ if (stmt->set_id < 0)
+ {
+ printf("%s:%d: Error: "
+ "set id must be specified\n",
+ hdr->stmt_filename, hdr->stmt_lno);
+ errors++;
+ }
if (script_check_adminfo(hdr, stmt->set_origin) < 0)
errors++;
}

0 comments on commit 0573d0d

Please sign in to comment.