Comment : Charset=windows-1252
Request : assert attribute,attribute(tuple(attributename(int1)typename(int))tuple(attributename(int2)typename(int)))
Reply   : 

Request : cmd(assert relvar,relvar(tuple(relvarname(dbcromin)relvarpredicate(integers int1, int2.))))cmd(assert relvarattribute,relvarattribute(tuple(relvarname(dbcromin)attributename(int1))tuple(relvarname(dbcromin)attributename(int2))))
Reply   : 

Request : cmd(assert dbmsfile,dbmsfile(tuple(filename(dbcromin.spdb)pagesize(8192))))cmd(assert storagespace,storagespace(tuple(filename(dbcromin.spdb)extentscount(2)pagecount(20)storagespaceid(1))tuple(filename(dbcromin.spdb)extentscount(2)pagecount(20)storagespaceid(2))))cmd(assert dataspace,dataspace(tuple(filename(dbcromin.spdb)storagespaceid(1)gapcompressionthreshold(5)maximumgaps(9))))cmd(assert multihashingindexspace,multihashingindexspace(tuple(filename(dbcromin.spdb)storagespaceid(2)gapcompressionthreshold(5)maximumgaps(9))))
Reply   : 

Request : cmd(assert recordtype,recordtype(tuple(filename(dbcromin.spdb)storagespaceid(1)recordtypename(rec)indexname(loc)relvarname(dbcromin))))cmd(assert index,index(tuple(filename(dbcromin.spdb)storagespaceid(2)recordtypename(rec)relvarname(dbcromin)indexname(loc))tuple(filename(dbcromin.spdb)storagespaceid(2)recordtypename(rec)relvarname(dbcromin)indexname(int2))))cmd(assert recordattribute,recordattribute(tuple(recordtypename(rec)relvarname(dbcromin)attributename(int1)ordinal(10))tuple(recordtypename(rec)relvarname(dbcromin)attributename(int2)ordinal(20))))cmd(assert indexcomponent,indexcomponent(tuple(relvarname(dbcromin)indexname(loc)ordinal(10)sp_expression(int1))tuple(relvarname(dbcromin)indexname(int2)ordinal(10)sp_expression(int2))))
Reply   : 

Comment : tests on the usage of minus in database constraints where interval types are in play

Request : delete dbcromin,dbcromin
Reply   : 
Request : commit
Reply   : 

Comment : not int2 that doesn't exist as an int1
Request : assert databaseconstraint,databaseconstraint(tuple(constraintlabel(just a test case)errorcode(121105)sp_expression(minus\(project\(dbcromin,\(int2\)\),rename\(project\(dbcromin,\(int1\)\),\(int1,int2\)\)\))))
Reply   : 

Comment : should fail
Request : assert dbcromin,dbcromin(tuple(int1(1)int2(5)))
Reply   : 201806116:121105:Constraint 121105 violated.  Violating tuple attribute values are : INT2=5.  Meaning : ((integers int1, 5.,and it is not the case that : integers int1, 5.) AND (integers 5, 5.,and it is not the case that : integers INT2, int2.,and it is not the case that : integers INT2, int2.,and it is not the case that : integers INT2, int2.)) OR ((integers int1, int2.,and it is not the case that : integers int1, int2.,and it is not the case that : integers INT2, int2.,and it is not the case that : integers INT2, int2.,and it is not the case that : integers INT2, int2.) OR ((integers INT2, int2.,and it is not the case that : integers INT2, int2.,and it is not the case that : integers INT2, int2.,and it is not the case that : integers INT2, int2.,and it is not the case that : integers int1, int2.,and it is not the case that : integers int1, int2.,and it is not the case that : integers int1, int2.,and it is not the case that : integers int1, int2.) AND (integers int1, int2.))).

Comment : should pass
Request : assert dbcromin,dbcromin(tuple(int1(1)int2(1)))
Reply   : 
Request : commit
Reply   : 

Comment : using distinct tuples in the join - should pass
Request : assert dbcromin,dbcromin(tuple(int1(2)int2(1)))
Reply   : 
Request : commit
Reply   : 

Comment : should fail
Request : unassert dbcromin,dbcromin(tuple(int1(1)int2(1)))
Reply   : 201806116:121105:Constraint 121105 violated.  Violating tuple attribute values are : INT2=1.  Meaning : ((integers int1, 1.,and it is not the case that : integers int1, 1.) AND (integers 1, 1.,and it is not the case that : integers INT2, int2.,and it is not the case that : integers INT2, int2.,and it is not the case that : integers INT2, int2.)) OR ((integers int1, int2.,and it is not the case that : integers int1, int2.,and it is not the case that : integers INT2, int2.,and it is not the case that : integers INT2, int2.,and it is not the case that : integers INT2, int2.) OR ((integers INT2, int2.,and it is not the case that : integers INT2, int2.,and it is not the case that : integers INT2, int2.,and it is not the case that : integers INT2, int2.,and it is not the case that : integers int1, int2.,and it is not the case that : integers int1, int2.,and it is not the case that : integers int1, int2.,and it is not the case that : integers int1, int2.) AND (integers int1, int2.))).
Request : commit
Reply   : 

Request : delete dbcromin,dbcromin
Reply   : 
Request : commit
Reply   : 

Comment : undo this particular databaseconstraint so the script can be run again and again
Request : unassert databaseconstraint,semijoin(databaseconstraint,relation(heading(errorcode(long))body(tuple(errorcode(121105)))))
Reply   : 

Request : cmd(unassert recordtype,recordtype(tuple(filename(dbcromin.spdb)storagespaceid(1)recordtypename(rec)indexname(loc)relvarname(dbcromin))))cmd(unassert index,index(tuple(filename(dbcromin.spdb)storagespaceid(2)recordtypename(rec)relvarname(dbcromin)indexname(loc))tuple(filename(dbcromin.spdb)storagespaceid(2)recordtypename(rec)relvarname(dbcromin)indexname(int2))))cmd(unassert recordattribute,recordattribute(tuple(recordtypename(rec)relvarname(dbcromin)attributename(int1)ordinal(10))tuple(recordtypename(rec)relvarname(dbcromin)attributename(int2)ordinal(20))))cmd(unassert indexcomponent,indexcomponent(tuple(relvarname(dbcromin)indexname(loc)ordinal(10)sp_expression(int1))tuple(relvarname(dbcromin)indexname(int2)ordinal(10)sp_expression(int2))))
Reply   : 

Request : cmd(unassert dbmsfile,dbmsfile(tuple(filename(dbcromin.spdb)pagesize(8192))))cmd(unassert storagespace,storagespace(tuple(filename(dbcromin.spdb)extentscount(2)pagecount(20)storagespaceid(1))tuple(filename(dbcromin.spdb)extentscount(2)pagecount(20)storagespaceid(2))))cmd(unassert dataspace,dataspace(tuple(filename(dbcromin.spdb)storagespaceid(1)gapcompressionthreshold(5)maximumgaps(9))))cmd(unassert multihashingindexspace,multihashingindexspace(tuple(filename(dbcromin.spdb)storagespaceid(2)gapcompressionthreshold(5)maximumgaps(9))))
Reply   : 

Request : cmd(unassert relvar,relvar(tuple(relvarname(dbcromin)relvarpredicate(integers int1, int2.))))cmd(unassert relvarattribute,relvarattribute(tuple(relvarname(dbcromin)attributename(int1))tuple(relvarname(dbcromin)attributename(int2))))
Reply   : 

Request : unassert attribute,semiminus(attribute(tuple(attributename(int1)typename(int))tuple(attributename(int2)typename(int))),relvarattribute)
Reply   : 
END
