Fix slonik_drop_table and slonik_drop_sequence altperl tools.
authorSteve Singer <ssinger@ca.afilias.info>
Thu, 24 Nov 2011 16:27:38 +0000 (11:27 -0500)
committerSteve Singer <ssinger@ca.afilias.info>
Thu, 24 Nov 2011 16:27:38 +0000 (11:27 -0500)
slonik_drop_table and slonik_drop_sequence no longer attempt to
return -1 on an error (invalid as a slonik exit code in 2.1)
(cherry picked from commit 394ffa960a71f2d0fdfaffb0f5e75fe70fe0d2d6)

Conflicts:

RELEASE

RELEASE
tools/altperl/slonik_drop_sequence.pl
tools/altperl/slonik_drop_table.pl

diff --git a/RELEASE b/RELEASE
index 0f1af5af1f515e68d1d35c79b37022732202fed2..a3cd2c298b5e0806e953d11d7c1568b09461b2fe 100644 (file)
--- a/RELEASE
+++ b/RELEASE
@@ -12,6 +12,9 @@
 - Bug #247 :: slony_logshipper can now handle the TRUNCATE commands
 - Bug #248 :: Log Shipping files will now use the sequence name directly instead of
               a tracking table.
+- slonik_drop_table and slonik_drop_sequence no longer attempt to 
+  return -1 on an error (invalid as a slonik exit code in 2.1)
+
 ** 2.1.0 
 ** 2.1.0 RC 2
 
index e8011f9a71b1c623e86e8514bde6c630f55e95ac..1a12c2dfb3b333d8c0b67c6ca9d54742ce62735d 100644 (file)
@@ -53,7 +53,7 @@ $slonik .= "  try {\n";
 $slonik .= "    SET DROP SEQUENCE (id = $SEQ_ID, origin = $SET_ORIGIN);\n";
 $slonik .= "  } on error {\n";
 $slonik .= "    echo 'Could not drop sequence $SEQ_ID for $CLUSTER_NAME!';\n";
-$slonik .= "    exit -1;\n";
+$slonik .= "    exit 1;\n";
 $slonik .= "  }\n";
 
 run_slonik_script($slonik, 'DROP SEQUENCE');
index 60c7618a6894a2dfda4043c3401f542dace73667..4c5083e43aad8e521cbe25a75c1c38addc164ad7 100644 (file)
@@ -51,7 +51,7 @@ $slonik .= "  try {\n";
 $slonik .= "    SET DROP TABLE (id = $TABLE_ID, origin = $SET_ORIGIN);\n";
 $slonik .= "  } on error {\n";
 $slonik .= "    echo 'Could not drop table $TABLE_ID for $CLUSTER_NAME!';\n";
-$slonik .= "    exit -1;\n";
+$slonik .= "    exit 1;\n";
 $slonik .= "  }\n";
 
 run_slonik_script($slonik, 'DROP TABLE');