Fixed a double increment bug in the statement scanner for execute script.
authorJan Wieck <JanWieck@Yahoo.com>
Wed, 29 Feb 2012 19:21:55 +0000 (14:21 -0500)
committerJan Wieck <JanWieck@Yahoo.com>
Wed, 29 Feb 2012 19:21:55 +0000 (14:21 -0500)
clustertest/disorder/tests/disorder_tests.js
src/parsestatements/scanner.c

index 63ddb617d6e20978a9b66162d11d4993a9928731..b45ca1cdebb1a9be4962daea340b91eeb110c6a8 100644 (file)
@@ -60,7 +60,7 @@ var tests =
      ,new CleanupTest(coordinator,results) //cleanup_interval does not (yet) do what the test wants
     ];
 
-//tests=[new MultinodeFailover(coordinator,results)];
+//tests=[new ExecuteScript(coordinator,results)];
 
 var basicTest = new BasicTest(coordinator,results);
 
index 57c988da2f2505211edd0e811bb226eb2bf7d7e1..4b5c5d6f0ccdf8c48198baffa666ff0dfc0ecbc5 100644 (file)
@@ -32,7 +32,7 @@ int scan_for_statements (const char *extended_statement) {
     cchar = extended_statement[cpos];
     switch (cchar) {
     case '\0':
-      STMTS[statements++] = ++cpos;
+      STMTS[statements++] = cpos;
       state = Q_DONE;
       break;
 
@@ -211,7 +211,7 @@ int scan_for_statements (const char *extended_statement) {
       break;
     case ';':
       if ((state == Q_NORMAL_STATE) && (nparens == 0) && (nbrokets == 0) && (nsquigb == 0)) {
-       STMTS[statements++] = ++cpos;
+       STMTS[statements++] = cpos + 1;
        if (statements >= MAXSTATEMENTS) {
          return statements;
        }