remove SET ID as an option from EXECUTE SCRIPT
authorSteve Singer <ssinger@ca.afilias.info>
Fri, 20 Jan 2012 14:52:08 +0000 (09:52 -0500)
committerSteve Singer <ssinger@ca.afilias.info>
Fri, 20 Jan 2012 14:52:08 +0000 (09:52 -0500)
since we no longer pay attention to it.

src/slonik/parser.y
src/slonik/slonik.c
src/slonik/slonik.h

index 4290a082ac2495fbf1723723f4a87a36fce58ccc..b5b2151a777de566cafe8c215fa03f42f43ef501 100644 (file)
@@ -1303,10 +1303,9 @@ stmt_ddl_script          : lno K_EXECUTE K_SCRIPT option_list
                                        {
                                                SlonikStmt_ddl_script *new;
                                                statement_option opt[] = {
-                                                       STMT_OPTION_INT( O_SET_ID, -1 ),
                                                        STMT_OPTION_STR( O_FILENAME, NULL ),
                                                        STMT_OPTION_INT( O_EVENT_NODE, -1 ),
-                                                       STMT_OPTION_STR( O_EXECUTE_ONLY_ON, NULL ),
+                                                       STMT_OPTION_STR( O_EXECUTE_ONLY_LIST, NULL ),
                                                        STMT_OPTION_INT( O_EXECUTE_ONLY_ON, -1 ),
                                                        STMT_OPTION_END
                                                };
@@ -1320,12 +1319,11 @@ stmt_ddl_script         : lno K_EXECUTE K_SCRIPT option_list
 
                                                if (assign_options(opt, $4) == 0)
                                                {
-                                                       new->ddl_setid          = opt[0].ival;
-                                                       new->ddl_fname          = opt[1].str;
-                                                       new->ev_origin          = opt[2].ival;
-                                                       new->only_on_nodes      = opt[3].str;
-                                                       new->only_on_node   = opt[4].ival;
-                                                       new->ddl_fd             = NULL;
+                                                       new->ddl_fname          = opt[0].str;
+                                                       new->ev_origin          = opt[1].ival;
+                                                       new->only_on_nodes      = opt[2].str;
+                                                       new->only_on_node   = opt[3].ival;
+                                                       new->ddl_fd                     = NULL;
                                                }
                                                else
                                                        parser_errors++;
@@ -1700,7 +1698,7 @@ option_list_item  : K_ID '=' option_item_id
                                        }
                                        | K_EXECUTE K_ONLY K_ON '=' option_item_literal
                                        {
-                                               $5->opt_code    = O_EXECUTE_ONLY_ON;
+                                               $5->opt_code    = O_EXECUTE_ONLY_LIST;
                                                $$ = $5;
                                        }
                                        | K_SECONDS '=' option_item_id
@@ -1849,6 +1847,7 @@ option_str(option_code opt_code)
                case O_DATE_FORMAT:             return "format";
                case O_EVENT_NODE:              return "event node";
                case O_EXECUTE_ONLY_ON: return "execute only on";
+               case O_EXECUTE_ONLY_LIST:       return "execute only on";
                case O_FILENAME:                return "filename";
                case O_FORWARD:                 return "forward";
                case O_FQNAME:                  return "full qualified name";
index f6ae536dfd67006ed062f717dd07e57e2f258308..7acff205ac8fa7008ad3dae6a6adc88087375a55 100644 (file)
@@ -1000,13 +1000,6 @@ script_check_stmts(SlonikScript * script, SlonikStmt * hdr)
                                                       hdr->stmt_filename, hdr->stmt_lno);
                                                errors++;
                                        }
-                                       if (stmt->ddl_setid < 0)
-                                       {
-                                               printf("%s:%d: Error: "
-                                                          "set id must be specified\n",
-                                                          hdr->stmt_filename, hdr->stmt_lno);
-                                               errors++;
-                                       }
                                        if (stmt->ddl_fname == NULL)
                                        {
                                                printf("%s:%d: Error: "
index 62ba26e85716bce7f1e1c5172f6e80187a2195e5..96fd72ade1749e0b298b3ddcf0a5a16e784a4e1e 100644 (file)
@@ -404,7 +404,6 @@ struct SlonikStmt_move_set_s
 struct SlonikStmt_ddl_script_s
 {
        SlonikStmt      hdr;
-       int                     ddl_setid;
        char       *ddl_fname;
        int                     ev_origin;
        char       *only_on_nodes;
@@ -645,6 +644,7 @@ typedef enum {
        O_DATE_FORMAT,
        O_EVENT_NODE,
        O_EXECUTE_ONLY_ON,
+       O_EXECUTE_ONLY_LIST,
        O_FILENAME,
        O_FORWARD,
        O_FQNAME,