Chris Browne cbbrowne at lists.slony.info
Thu Oct 4 08:31:46 PDT 2007
Update of /home/cvsd/slony1/slony1-engine/tests/testddl
In directory main.slony.info:/tmp/cvs-serv8781

Modified Files:
	exec_ddl.sh 
Added Files:
	bad_ddl.sql 
Log Message:
Add a negative test to DDL script test: try to run some wrong SQL


--- NEW FILE: bad_ddl.sql ---
-- There Is No table "snobol"
alter table snobol add column id integer not null unique;
Index: exec_ddl.sh
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/tests/testddl/exec_ddl.sh,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** exec_ddl.sh	29 Mar 2006 17:10:31 -0000	1.2
--- exec_ddl.sh	4 Oct 2007 15:31:44 -0000	1.3
***************
*** 6,8 ****
--- 6,21 ----
         EVENT NODE = 1
      );
+ 
+   try {
+        execute script (
+             set id=1,
+             filename='${testname}/bad_ddl.sql',
+             event node=1
+        );
+   } on error {
+      echo 'a bad DDL script gets rolled back on the master';
+   } on success {
+      echo 'a bad DDL script did not get rolled back - ERROR!';
+      exit -1;
+   }
  "



More information about the Slony1-commit mailing list