MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Petr Chardin Date:February 14 2006 12:09am
Subject:bk commit into 5.0 tree (petr:1.2044) BUG#12813
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of cps. When cps does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.2044 06/02/14 03:09:17 petr@stripped +3 -0
  fix Bug#12813 "Instance Manager: START/STOP INSTANCE
                 commands accept a list as argument"

  server-tools/instance-manager/parse.cc
    1.12 06/02/14 03:09:14 petr@stripped +10 -7
    check for nonaplhanumeric symbols at the end of the commands

  mysql-test/t/im_life_cycle.imtest
    1.4 06/02/14 03:09:14 petr@stripped +15 -0
    add a test for the bug

  mysql-test/r/im_life_cycle.result
    1.4 06/02/14 03:09:14 petr@stripped +4 -0
    update result file

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	petr
# Host:	outpost.site
# Root:	/home/cps/mysql/devel/im/5.0-im-add-error-message

--- 1.3/mysql-test/r/im_life_cycle.result	2006-02-10 02:15:52 +03:00
+++ 1.4/mysql-test/r/im_life_cycle.result	2006-02-14 03:09:14 +03:00
@@ -64,3 +64,7 @@
 mysqld2	offline
 SHOW INSTANCE STATUS;
 ERROR 42000: You have an error in your command syntax. Check the manual that corresponds to your MySQL Instance Manager version for the right syntax to use
+START INSTANCE mysqld1,mysqld2,mysqld3;
+ERROR 42000: You have an error in your command syntax. Check the manual that corresponds to your MySQL Instance Manager version for the right syntax to use
+STOP INSTANCE mysqld1,mysqld2,mysqld3;
+ERROR 42000: You have an error in your command syntax. Check the manual that corresponds to your MySQL Instance Manager version for the right syntax to use

--- 1.3/mysql-test/t/im_life_cycle.imtest	2006-02-10 02:15:52 +03:00
+++ 1.4/mysql-test/t/im_life_cycle.imtest	2006-02-14 03:09:14 +03:00
@@ -149,3 +149,18 @@
 ###########################################################################
 --error 1149
 SHOW INSTANCE STATUS;
+
+#
+# Tests for bug fixes
+#
+
+#
+# Bug #12813    Instance Manager: START/STOP INSTANCE commands accept
+#                                 a list as argument.
+#
+
+--error 1149
+START INSTANCE mysqld1,mysqld2,mysqld3;
+
+--error 1149
+STOP INSTANCE mysqld1,mysqld2,mysqld3;

--- 1.11/server-tools/instance-manager/parse.cc	2006-02-10 02:15:52 +03:00
+++ 1.12/server-tools/instance-manager/parse.cc	2006-02-14 03:09:14 +03:00
@@ -143,7 +143,7 @@
     instance_name_len= word_len;
     text+= word_len;
     /* it should be the end of command */
-    get_word(&text, &word_len);
+    get_word(&text, &word_len, NONSPACE);
     if (word_len)
       goto syntax_error;
 
@@ -156,7 +156,7 @@
     if (shift_token(&text, &word_len) != TOK_INSTANCES)
       goto syntax_error;
 
-    get_word(&text, &word_len);
+    get_word(&text, &word_len, NONSPACE);
     if (word_len)
       goto syntax_error;
 
@@ -197,7 +197,7 @@
     }
 
     /* should be empty */
-    get_word(&text, &word_len);
+    get_word(&text, &word_len, NONSPACE);
     if (word_len)
       goto syntax_error;
 
@@ -213,7 +213,7 @@
   case TOK_SHOW:
     switch (shift_token(&text, &word_len)) {
     case TOK_INSTANCES:
-      get_word(&text, &word_len);
+      get_word(&text, &word_len, NONSPACE);
       if (word_len)
         goto syntax_error;
       command= new Show_instances(map);
@@ -226,7 +226,7 @@
           goto syntax_error;
         text+= instance_name_len;
         /* check that this is the end of the command */
-        get_word(&text, &word_len);
+        get_word(&text, &word_len, NONSPACE);
         if (word_len)
           goto syntax_error;
         if (tok2 == TOK_STATUS)
@@ -250,7 +250,7 @@
         case TOK_LOG:
           switch (Token tok3= shift_token(&text, &word_len)) {
           case TOK_FILES:
-            get_word(&text, &word_len);
+            get_word(&text, &word_len, NONSPACE);
             /* check that this is the end of the command */
             if (word_len)
               goto syntax_error;
@@ -293,7 +293,10 @@
                 command= new Show_instance_log(map, instance_name,
                                                instance_name_len, log_type,
                                                log_size, text);
-
+                get_word(&text, &word_len, NONSPACE);
+                /* check that this is the end of the command */
+                if (word_len)
+                  goto syntax_error;
                 break;
               case '\0':
                 command= new Show_instance_log(map, instance_name,
Thread
bk commit into 5.0 tree (petr:1.2044) BUG#12813Petr Chardin14 Feb