Comment : Charset=windows-1252
Comment : test cases for enforcement of keys
Request : assert attribute,attribute(tuple(attributename(scalar1)typename(long))tuple(attributename(intinterval1)typename(intinterval))tuple(attributename(scalar2)typename(long)))
Reply   : 
Request : cmd(assert relvar,relvar(tuple(relvarname(k1scalar2)relvarpredicate(fullkey scalar1.))tuple(relvarname(k1interval2)relvarpredicate(fullkey intinterval1.))tuple(relvarname(k1scalar1)relvarpredicate(singleton scalar1.))tuple(relvarname(k1)relvarpredicate(the shop is open.))tuple(relvarname(k1interval1)relvarpredicate(singleton intinterval1.))))cmd(assert key,key(tuple(relvarname(k1scalar1)errorcode(1234567))tuple(relvarname(k1interval1)errorcode(1234568))))cmd(assert relvarattribute,relvarattribute(tuple(relvarname(k1scalar2)attributename(scalar1))tuple(relvarname(k1interval2)attributename(intinterval1))tuple(relvarname(k1scalar1)attributename(scalar1))tuple(relvarname(k1interval1)attributename(intinterval1))))
Reply   : 
Request : cmd(assert dbmsfile,dbmsfile(tuple(filename(dbmkeys.spdb)pagesize(8192))))cmd(assert storagespace,storagespace(tuple(filename(dbmkeys.spdb)extentscount(2)pagecount(2)storagespaceid(1))tuple(filename(dbmkeys.spdb)extentscount(2)pagecount(2)storagespaceid(2))tuple(filename(dbmkeys.spdb)extentscount(2)pagecount(2)storagespaceid(3))tuple(filename(dbmkeys.spdb)extentscount(2)pagecount(2)storagespaceid(4))tuple(filename(dbmkeys.spdb)extentscount(2)pagecount(2)storagespaceid(5))tuple(filename(dbmkeys.spdb)extentscount(2)pagecount(2)storagespaceid(6))))cmd(assert dataspace,dataspace(tuple(filename(dbmkeys.spdb)storagespaceid(1)gapcompressionthreshold(5)maximumgaps(9))))cmd(assert hashingindexspace,hashingindexspace(tuple(filename(dbmkeys.spdb)storagespaceid(2))tuple(filename(dbmkeys.spdb)storagespaceid(3))tuple(filename(dbmkeys.spdb)storagespaceid(4))tuple(filename(dbmkeys.spdb)storagespaceid(5))tuple(filename(dbmkeys.spdb)storagespaceid(6))))
Reply   : 
Request : cmd(assert recordtype,recordtype(tuple(indexname(loc)filename(dbmkeys.spdb)storagespaceid(1)recordtypename(rec)relvarname(k1))tuple(filename(dbmkeys.spdb)indexname(loc)storagespaceid(1)recordtypename(rec)relvarname(k1interval2))tuple(recordtypename(rec)relvarname(k1interval1)indexname(loc)filename(dbmkeys.spdb)storagespaceid(1))tuple(filename(dbmkeys.spdb)storagespaceid(1)recordtypename(rec)indexname(loc)relvarname(k1scalar2))tuple(recordtypename(rec)relvarname(k1scalar1)filename(dbmkeys.spdb)indexname(loc)storagespaceid(1))))cmd(assert index,index(tuple(filename(dbmkeys.spdb)storagespaceid(2)recordtypename(rec)relvarname(k1scalar2)indexname(loc))tuple(filename(dbmkeys.spdb)storagespaceid(3)recordtypename(rec)relvarname(k1scalar1)indexname(loc))tuple(filename(dbmkeys.spdb)storagespaceid(4)recordtypename(rec)relvarname(k1interval2)indexname(loc))tuple(filename(dbmkeys.spdb)storagespaceid(5)recordtypename(rec)relvarname(k1interval1)indexname(loc))tuple(filename(dbmkeys.spdb)storagespaceid(6)recordtypename(rec)relvarname(k1)indexname(loc))))cmd(assert recordattribute,recordattribute(tuple(recordtypename(rec)relvarname(k1scalar2)attributename(scalar1)ordinal(10))tuple(recordtypename(rec)relvarname(k1scalar1)attributename(scalar1)ordinal(20))tuple(recordtypename(rec)relvarname(k1interval2)attributename(intinterval1)ordinal(30))tuple(recordtypename(rec)relvarname(k1interval1)attributename(intinterval1)ordinal(10))))cmd(assert indexcomponent,indexcomponent(tuple(relvarname(k1scalar2)indexname(loc)ordinal(10)sp_expression(scalar1))tuple(relvarname(k1scalar1)indexname(loc)ordinal(10)sp_expression(scalar1))))
Reply   : 

Comment : test cases with niladic relvar
Comment : add nothing to k1, but with wrong syntax
Request : assert k1,relation(heading()body())
Reply   : 
Comment : add nothing to k1, with correct syntax
Request : assert k1,k1()
Reply   : 
Comment : should be relation(heading()body())
Request : inquire k1
Reply   : RELATION(HEADING()BODY())
Comment : add tuple_dee
Request : assert k1,table_dee
Reply   : 
Comment : should be relation(heading()tuple())
Request : inquire k1
Reply   : RELATION(HEADING()BODY(TUPLE()))
Comment : add tuple_dee
Request : assert k1,relation(heading()body(t()))
Reply   : 
Comment : should be relation(heading()tuple())
Request : inquire k1
Reply   : RELATION(HEADING()BODY(TUPLE()))
Comment : add tuple_dee again
Request : assert k1,relation(heading()body(t()))
Reply   : 
Comment : should still be relation(heading()tuple())
Request : inquire k1
Reply   : RELATION(HEADING()BODY(TUPLE()))
Comment : unassert nothing from k1
Request : unassert k1,table_dum
Reply   : 
Comment : should still be relation(heading()tuple())
Request : inquire k1
Reply   : RELATION(HEADING()BODY(TUPLE()))
Comment : unassert nothing from k1
Request : unassert k1,k1()
Reply   : 
Comment : should still be relation(heading()tuple())
Request : inquire k1
Reply   : RELATION(HEADING()BODY(TUPLE()))
Comment : unassert from k1
Request : unassert k1,k1
Reply   : 
Comment : should be relation(heading()body())
Request : inquire k1
Reply   : RELATION(HEADING()BODY())

Comment : tests with empty keys on a relation holding a scalar value
Comment : clear the relation
Request : unassert k1scalar1,k1scalar1
Reply   : 
Comment : avoid this clearance from being rolled back by any error
Request : commit
Reply   : 
Comment : assert wrong tuple to k1scalar1, should give exception
Request : assert k1scalar1,relation(heading()body(tuple()))
Reply   : 1497858657:290:The heading { } of the relation to be added or deleted does not match the heading { SCALAR1:LONG } of relvar Relvar K1SCALAR1
Comment : assert nothing to k1scalar1
Request : assert k1scalar1,k1scalar1()
Reply   : 
Comment : should be k1scalar1()
Request : inquire k1scalar1
Reply   : RELATION(HEADING(SCALAR1(LONG))BODY())
Comment : assert wrong tuple to k1scalar1, should give exception
Request : assert k1scalar1,relation(heading(scalar1(long)scalar2(long))body(tuple(scalar1(4)scalar2(5))))
Reply   : 1497858657:290:The heading { SCALAR2:LONG SCALAR1:LONG } of the relation to be added or deleted does not match the heading { SCALAR1:LONG } of relvar Relvar K1SCALAR1
Comment : assert wrong tuple to k1scalar1, should give exception
Request : assert k1scalar1,relation(heading(scalar2(long))body(tuple(scalar2(5))))
Reply   : 1497858657:290:The heading { SCALAR2:LONG } of the relation to be added or deleted does not match the heading { SCALAR1:LONG } of relvar Relvar K1SCALAR1
Comment : assert wrong tuple to k1scalar1, should give exception
Request : assert k1scalar1,relation(heading(scalar1(int))body(tuple(scalar1(5))))
Reply   : 1497858657:290:The heading { SCALAR1:INT } of the relation to be added or deleted does not match the heading { SCALAR1:LONG } of relvar Relvar K1SCALAR1
Comment : assert tuple
Request : assert k1scalar1,k1scalar1(tuple(scalar1(5)))
Reply   : 
Comment : should be k1scalar1(tuple(scalar1(5)))
Request : inquire k1scalar1
Reply   : RELATION(HEADING(SCALAR1(LONG))BODY(TUPLE(SCALAR1(5))))
Comment : assert tuple again
Request : assert k1scalar1,k1scalar1
Reply   : 
Comment : should still be k1scalar1(tuple(scalar1(5)))
Request : inquire k1scalar1
Reply   : RELATION(HEADING(SCALAR1(LONG))BODY(TUPLE(SCALAR1(5))))
Comment : avoid rollback in next command
Request : commit
Reply   : 
Comment : unassert wrong tuple from k1scalar1, should give headingexception
Request : unassert k1scalar1,table_dum
Reply   : 1497858657:290:The heading { } of the relation to be added or deleted does not match the heading { SCALAR1:LONG } of relvar Relvar K1SCALAR1
Comment : unassert nothing from k1scalar1, but now correctly
Request : unassert k1scalar1,k1scalar1()
Reply   : 
Comment : should still be k1scalar1(tuple(scalar1(5)))
Request : inquire k1scalar1
Reply   : RELATION(HEADING(SCALAR1(LONG))BODY(TUPLE(SCALAR1(5))))
Comment : avoid rollback in next command
Request : commit
Reply   : 
Comment : assert second tuple, should give key violation
Request : assert k1scalar1,k1scalar1(tuple(scalar1(6)))
Reply   : 201806116:1234567:Constraint 1234567 violated.  Violating tuple attribute values are : SCALAR1=6,__SCALAR1=5.  Meaning : (singleton 6. AND singleton 5.) OR ((singleton 6. AND singleton 5.,and it is not the case that : singleton 5.) OR (singleton 5. AND singleton 6.,and it is not the case that : singleton 6.))and it holds that 'NOT(EQ(SCALAR1,__SCALAR1))'.
Comment : should still be k1scalar1(tuple(scalar1(5)))
Request : inquire k1scalar1
Reply   : RELATION(HEADING(SCALAR1(LONG))BODY(TUPLE(SCALAR1(5))))
Comment : unassert from k1scalar1
Request : unassert k1scalar1,k1scalar1
Reply   : 
Comment : should be k1scalar1()
Request : inquire k1scalar1
Reply   : RELATION(HEADING(SCALAR1(LONG))BODY())
Comment : assert second tuple, should be ok
Request : assert k1scalar1,k1scalar1(tuple(scalar1(6)))
Reply   : 
Comment : unassert nonexisting tuple, should be ok
Request : unassert k1scalar1,k1scalar1(tuple(scalar1(7)))
Reply   : 
Comment : should be k1scalar1(tuple(scalar1(6)))
Request : inquire k1scalar1
Reply   : RELATION(HEADING(SCALAR1(LONG))BODY(TUPLE(SCALAR1(6))))
Comment : unassert the tuple specified as a constant
Request : unassert k1scalar1,k1scalar1(tuple(scalar1(6)))
Reply   : 
Comment : should be k1scalar1()
Request : inquire k1scalar1
Reply   : RELATION(HEADING(SCALAR1(LONG))BODY())
Comment : assert tuple, should be ok
Request : assert k1scalar1,k1scalar1(tuple(scalar1(16)))
Reply   : 
Comment : update tuple
Request : update k1scalar1,k1scalar1(tuple(scalar1(16))),(scalar1(long(17)))
Reply   : 
Comment : should be k1scalar1(tuple(scalar1(long(17))))
Request : inquire k1scalar1
Reply   : RELATION(HEADING(SCALAR1(LONG))BODY(TUPLE(SCALAR1(17))))
Comment : avoid rollback in next command
Request : commit
Reply   : 
Comment : update nonexisting tuple, should give error
Request : update k1scalar1,k1scalar1(tuple(scalar1(18))),(scalar1(long(19)))
Reply   : 1497858657:291:A request to remove tuple TUPLE(SCALAR1(18)) could not be satisfied because such a tuple does not exist.
Comment : should be k1scalar1(tuple(scalar1(long(17))))
Request : inquire k1scalar1
Reply   : RELATION(HEADING(SCALAR1(LONG))BODY(TUPLE(SCALAR1(17))))
Comment : clear the relation
Request : unassert k1scalar1,k1scalar1
Reply   : 

Comment : tests on a full-key relation holding a scalar value
Comment : clear the relation
Request : unassert k1scalar2,k1scalar2
Reply   : 
Comment : avoid this clearance from being rolled back by any error
Request : commit
Reply   : 
Comment : assert tuple
Request : assert k1scalar2,k1scalar2(tuple(scalar1(5)))
Reply   : 
Comment : should be relation(tuple(scalar1(long(5))))
Request : inquire k1scalar2
Reply   : RELATION(HEADING(SCALAR1(LONG))BODY(TUPLE(SCALAR1(5))))
Comment : assert tuple again
Request : assert k1scalar2,k1scalar2
Reply   : 
Comment : should still be relation(tuple(scalar1(long(5))))
Request : inquire k1scalar2
Reply   : RELATION(HEADING(SCALAR1(LONG))BODY(TUPLE(SCALAR1(5))))
Comment : unassert nothing from k1scalar2, but now correctly
Request : unassert k1scalar2,k1scalar2()
Reply   : 
Comment : should still be relation(tuple(scalar1(long(5))))
Request : inquire k1scalar2
Reply   : RELATION(HEADING(SCALAR1(LONG))BODY(TUPLE(SCALAR1(5))))
Comment : assert second tuple, should be ok
Request : assert k1scalar2,k1scalar2(tuple(scalar1(6)))
Reply   : 
Comment : should now be relation(tuple(scalar1(long(5)))tuple(scalar1(long(6))))
Request : inquire k1scalar2
Reply   : RELATION(HEADING(SCALAR1(LONG))BODY(TUPLE(SCALAR1(5))TUPLE(SCALAR1(6))))
Comment : unassert from k1scalar2
Request : unassert k1scalar2,k1scalar2
Reply   : 
Comment : should be relation()
Request : inquire k1scalar2
Reply   : RELATION(HEADING(SCALAR1(LONG))BODY())
Comment : assert two tuples, should be ok
Request : assert k1scalar2,k1scalar2(tuple(scalar1(6))tuple(scalar1(16)))
Reply   : 
Comment : unassert one existing and one nonexisting tuple, should be ok
Request : unassert k1scalar2,k1scalar2(tuple(scalar1(7))tuple(scalar1(6)))
Reply   : 
Comment : should be relation(tuple(scalar1(long(16))))
Request : inquire k1scalar2
Reply   : RELATION(HEADING(SCALAR1(LONG))BODY(TUPLE(SCALAR1(16))))
Comment : assert tuple, should be ok
Request : assert k1scalar2,k1scalar2(tuple(scalar1(5)))
Reply   : 
Comment : avoid rollback
Request : commit
Reply   : 
Comment : update tuple to one that already exists, should fail
Request : update k1scalar2,k1scalar2(tuple(scalar1(5))),(scalar1(long(16)))
Reply   : 1497858657:421:A request to add a new tuple TUPLE(SCALAR1(16)) could not be satisfied because such a tuple already exists.
Comment : should be relation(tuple(scalar1(long(5)))tuple(scalar1(long(16))))
Request : inquire k1scalar2
Reply   : RELATION(HEADING(SCALAR1(LONG))BODY(TUPLE(SCALAR1(5))TUPLE(SCALAR1(16))))
Comment : clear the relation
Request : unassert k1scalar2,k1scalar2
Reply   : 

Comment : tests with empty keys on a relation holding a scalar value
Comment : clear the relation
Request : unassert k1interval1,k1interval1
Reply   : 
Comment : avoid this clearance from being rolled back by any error
Request : commit
Reply   : 
Comment : assert wrong tuple to k1interval1, should give exception
Request : assert k1interval1,relation(heading()body(tuple()))
Reply   : 1497858657:290:The heading { } of the relation to be added or deleted does not match the heading { INTINTERVAL1:INTINTERVAL } of relvar Relvar K1INTERVAL1
Comment : assert nothing to k1interval1
Request : assert k1interval1,k1interval1()
Reply   : 
Comment : should be k1interval1()
Request : inquire k1interval1
Reply   : RELATION(HEADING(INTINTERVAL1(INTINTERVAL))BODY())
Comment : assert wrong tuple to k1interval1, should give exception
Request : assert k1interval1,relation(heading(intinterval1(int)scalar2(int))body(tuple(intinterval1(4)scalar2(5))))
Reply   : 1497858657:290:The heading { SCALAR2:INT INTINTERVAL1:INT } of the relation to be added or deleted does not match the heading { INTINTERVAL1:INTINTERVAL } of relvar Relvar K1INTERVAL1
Comment : assert wrong tuple to k1interval1, should give exception
Request : assert k1interval1,relation(heading(scalar2(int))body(tuple(scalar2(5))))
Reply   : 1497858657:290:The heading { SCALAR2:INT } of the relation to be added or deleted does not match the heading { INTINTERVAL1:INTINTERVAL } of relvar Relvar K1INTERVAL1
Comment : assert wrong tuple to k1interval1, should give exception
Request : assert k1interval1,relation(heading(intinterval1(intinterval))body(tuple(intinterval1(begin(5)end(4)))))
Reply   : 858993459:-1:java.lang.IllegalArgumentException:The begin component of interval value BEGIN(5)END(4) is greater than the end component.
Comment : assert empty interval, should be ok but without a tuple effectively appearing
Request : assert k1interval1,relation(heading(intinterval1(intinterval))body(tuple(intinterval1(begin(5)end(5)))))
Reply   : 
Comment : should be k1interval1()
Request : inquire k1interval1
Reply   : RELATION(HEADING(INTINTERVAL1(INTINTERVAL))BODY())
Comment : assert tuple
Request : assert k1interval1,k1interval1(tuple(intinterval1(begin(5)end(8))))
Reply   : 
Comment : should be k1interval1(tuple(intinterval1(begin(5)end(8))))
Request : inquire k1interval1
Reply   : RELATION(HEADING(INTINTERVAL1(INTINTERVAL))BODY(TUPLE(INTINTERVAL1(BEGIN(5)END(8)))))
Comment : assert tuple again
Request : assert k1interval1,k1interval1
Reply   : 
Comment : should still be k1interval1(tuple(intinterval1(begin(5)end(8))))
Request : inquire k1interval1
Reply   : RELATION(HEADING(INTINTERVAL1(INTINTERVAL))BODY(TUPLE(INTINTERVAL1(BEGIN(5)END(8)))))
Comment : assert overlapping tuple, should be ok, tuples should be merged
Request : assert k1interval1,k1interval1(tuple(intinterval1(begin(7)end(9))))
Reply   : 
Comment : should be k1interval1(tuple(intinterval1(begin(5)end(9))))
Request : inquire k1interval1
Reply   : RELATION(HEADING(INTINTERVAL1(INTINTERVAL))BODY(TUPLE(INTINTERVAL1(BEGIN(5)END(9)))))
Comment : assert meeting tuple, should be ok, tuples should be merged
Request : assert k1interval1,k1interval1(tuple(intinterval1(begin(9)end(19))))
Reply   : 
Comment : should be k1interval1(tuple(intinterval1(begin(5)end(19))))
Request : inquire k1interval1
Reply   : RELATION(HEADING(INTINTERVAL1(INTINTERVAL))BODY(TUPLE(INTINTERVAL1(BEGIN(5)END(19)))))
Comment : assert meeting tuple, should be ok, tuples should be merged
Request : assert k1interval1,k1interval1(tuple(intinterval1(begin(4)end(5))))
Reply   : 
Comment : should be k1interval1(tuple(intinterval1(begin(4)end(19))))
Request : inquire k1interval1
Reply   : RELATION(HEADING(INTINTERVAL1(INTINTERVAL))BODY(TUPLE(INTINTERVAL1(BEGIN(4)END(19)))))
Comment : avoid rollback in next command
Request : commit
Reply   : 
Comment : assert disjoint tuple, should give key violation
Request : assert k1interval1,k1interval1(tuple(intinterval1(begin(1)end(3))))
Reply   : 201806116:1234568:Constraint 1234568 violated.  Violating tuple attribute values are : INTINTERVAL1=BEGIN(4)END(19),__INTINTERVAL1=BEGIN(1)END(3).  Meaning : (((singleton BEGIN(4)END(19). AND singleton BEGIN(1)END(3).) OR (singleton BEGIN(1)END(3). AND singleton BEGIN(4)END(19).)) OR ((singleton BEGIN(4)END(19). AND singleton BEGIN(1)END(3).) OR ((singleton BEGIN(4)END(19). AND singleton BEGIN(1)END(3).,and it is not the case that : singleton __INTINTERVAL1.) OR (singleton __INTINTERVAL1. AND singleton intinterval1.,and it is not the case that : singleton intinterval1.))) AND singleton intinterval1. AND singleton __INTINTERVAL1.,and it is not the case that : (singleton intinterval1. AND singleton __INTINTERVAL1.) OR (singleton __INTINTERVAL1. AND singleton intinterval1.)) OR ((singleton intinterval1. AND singleton __INTINTERVAL1.) OR ((singleton intinterval1. AND singleton __INTINTERVAL1.,and it is not the case that : singleton __INTINTERVAL1.) OR (singleton __INTINTERVAL1. AND singleton intinterval1.,and it is not the case that : singleton intinterval1.)))and it holds that 'NOT(EQ(INTINTERVAL1,__INTINTERVAL1))',and it is not the case that : ((singleton intinterval1. AND singleton __INTINTERVAL1.) OR (singleton __INTINTERVAL1. AND singleton intinterval1.)) OR ((singleton intinterval1. AND singleton __INTINTERVAL1.) OR ((singleton intinterval1. AND singleton __INTINTERVAL1.,and it is not the case that : singleton __INTINTERVAL1.) OR (singleton __INTINTERVAL1. AND singleton intinterval1.,and it is not the case that : singleton intinterval1.))) AND singleton intinterval1. AND singleton __INTINTERVAL1.and it holds that 'NOT(EQ(INTINTERVAL1,__INTINTERVAL1))'.
Comment : unassert nothing from k1interval1, but now correctly
Request : unassert k1interval1,k1interval1()
Reply   : 
Comment : should still be k1interval1(tuple(intinterval1(begin(4)end(19))))
Request : inquire k1interval1
Reply   : RELATION(HEADING(INTINTERVAL1(INTINTERVAL))BODY(TUPLE(INTINTERVAL1(BEGIN(4)END(19)))))
Comment : unassert nonexisting tuple, should be ok
Request : unassert k1interval1,k1interval1(tuple(intinterval1(begin(44))))
Reply   : 
Comment : should still be k1interval1(tuple(intinterval1(begin(4)end(19))))
Request : inquire k1interval1
Reply   : RELATION(HEADING(INTINTERVAL1(INTINTERVAL))BODY(TUPLE(INTINTERVAL1(BEGIN(4)END(19)))))
Comment : unassert partially existing tuple, should be ok
Request : unassert k1interval1,k1interval1(tuple(intinterval1(begin(18))))
Reply   : 
Comment : should still be k1interval1(tuple(intinterval1(begin(4)end(18))))
Request : inquire k1interval1
Reply   : RELATION(HEADING(INTINTERVAL1(INTINTERVAL))BODY(TUPLE(INTINTERVAL1(BEGIN(4)END(18)))))
Comment : unassert partially existing tuple, should be ok
Request : unassert k1interval1,k1interval1(tuple(intinterval1(begin(-44)end(6))))
Reply   : 
Comment : should still be k1interval1(tuple(intinterval1(begin(6)end(18))))
Request : inquire k1interval1
Reply   : RELATION(HEADING(INTINTERVAL1(INTINTERVAL))BODY(TUPLE(INTINTERVAL1(BEGIN(6)END(18)))))
Comment : unassert fully existing tuple, should be ok
Request : unassert k1interval1,k1interval1(tuple(intinterval1(begin(6)end(8))))
Reply   : 
Comment : should be k1interval1(tuple(intinterval1(begin(8)end(18))))
Request : inquire k1interval1
Reply   : RELATION(HEADING(INTINTERVAL1(INTINTERVAL))BODY(TUPLE(INTINTERVAL1(BEGIN(8)END(18)))))
Comment : unassert fully existing tuple, should be ok
Request : unassert k1interval1,k1interval1(tuple(intinterval1(begin(16)end(18))))
Reply   : 
Comment : should be k1interval1(tuple(intinterval1(begin(8)end(16))))
Request : inquire k1interval1
Reply   : RELATION(HEADING(INTINTERVAL1(INTINTERVAL))BODY(TUPLE(INTINTERVAL1(BEGIN(8)END(16)))))
Comment : avoid rollback in next command
Request : commit
Reply   : 
Comment : unassert fully existing tuple, should give key violation
Request : unassert k1interval1,k1interval1(tuple(intinterval1(begin(10)end(11))))
Reply   : 201806116:1234568:Constraint 1234568 violated.  Violating tuple attribute values are : INTINTERVAL1=BEGIN(8)END(10),__INTINTERVAL1=BEGIN(11)END(16).  Meaning : (((singleton BEGIN(8)END(10). AND singleton BEGIN(11)END(16).) OR (singleton BEGIN(11)END(16). AND singleton BEGIN(8)END(10).)) OR ((singleton BEGIN(8)END(10). AND singleton BEGIN(11)END(16).) OR ((singleton BEGIN(8)END(10). AND singleton BEGIN(11)END(16).,and it is not the case that : singleton __INTINTERVAL1.) OR (singleton __INTINTERVAL1. AND singleton intinterval1.,and it is not the case that : singleton intinterval1.))) AND singleton intinterval1. AND singleton __INTINTERVAL1.,and it is not the case that : (singleton intinterval1. AND singleton __INTINTERVAL1.) OR (singleton __INTINTERVAL1. AND singleton intinterval1.)) OR ((singleton intinterval1. AND singleton __INTINTERVAL1.) OR ((singleton intinterval1. AND singleton __INTINTERVAL1.,and it is not the case that : singleton __INTINTERVAL1.) OR (singleton __INTINTERVAL1. AND singleton intinterval1.,and it is not the case that : singleton intinterval1.)))and it holds that 'NOT(EQ(INTINTERVAL1,__INTINTERVAL1))',and it is not the case that : ((singleton intinterval1. AND singleton __INTINTERVAL1.) OR (singleton __INTINTERVAL1. AND singleton intinterval1.)) OR ((singleton intinterval1. AND singleton __INTINTERVAL1.) OR ((singleton intinterval1. AND singleton __INTINTERVAL1.,and it is not the case that : singleton __INTINTERVAL1.) OR (singleton __INTINTERVAL1. AND singleton intinterval1.,and it is not the case that : singleton intinterval1.))) AND singleton intinterval1. AND singleton __INTINTERVAL1.and it holds that 'NOT(EQ(INTINTERVAL1,__INTINTERVAL1))'.
Comment : and finally some exotic updates
Comment : should fail on [6-8[ not existing
Request : update k1interval1,k1interval1(tuple(intinterval1(begin(6)end(10)))),(intinterval1(intinterval(begin(16)end(26))))
Reply   : 1497858657:291:A request to remove tuple TUPLE(INTINTERVAL1(BEGIN(6)END(8))) could not be satisfied because such a tuple does not exist.
Comment : should give contradiction
Request : update k1interval1,k1interval1(tuple(intinterval1(begin(8)end(10)))),(intinterval1(intinterval(begin(9)end(26))))
Reply   : 1497858657:421:A request to add a new tuple TUPLE(INTINTERVAL1(BEGIN(10)END(16))) could not be satisfied because such a tuple already exists.
Comment : should be ok
Request : update k1interval1,k1interval1(tuple(intinterval1(begin(8)end(10)))),(intinterval1(intinterval(begin(16)end(26))))
Reply   : 
Comment : should be k1interval1(tuple(intinterval1(begin(10)end(26))))
Request : inquire k1interval1
Reply   : RELATION(HEADING(INTINTERVAL1(INTINTERVAL))BODY(TUPLE(INTINTERVAL1(BEGIN(10)END(26)))))
Comment : avoid rollback in next command
Request : commit
Reply   : 
Comment : key violation once again
Request : update k1interval1,k1interval1(tuple(intinterval1(begin(11)end(20)))),(intinterval1(intinterval(begin(26)end(30))))
Reply   : 201806116:1234568:Constraint 1234568 violated.  Violating tuple attribute values are : INTINTERVAL1=BEGIN(10)END(11),__INTINTERVAL1=BEGIN(20)END(30).  Meaning : (((singleton BEGIN(10)END(11). AND singleton BEGIN(20)END(30).) OR (singleton BEGIN(20)END(30). AND singleton BEGIN(10)END(11).)) OR ((singleton BEGIN(10)END(11). AND singleton BEGIN(20)END(30).) OR ((singleton BEGIN(10)END(11). AND singleton BEGIN(20)END(30).,and it is not the case that : singleton __INTINTERVAL1.) OR (singleton __INTINTERVAL1. AND singleton intinterval1.,and it is not the case that : singleton intinterval1.))) AND singleton intinterval1. AND singleton __INTINTERVAL1.,and it is not the case that : (singleton intinterval1. AND singleton __INTINTERVAL1.) OR (singleton __INTINTERVAL1. AND singleton intinterval1.)) OR ((singleton intinterval1. AND singleton __INTINTERVAL1.) OR ((singleton intinterval1. AND singleton __INTINTERVAL1.,and it is not the case that : singleton __INTINTERVAL1.) OR (singleton __INTINTERVAL1. AND singleton intinterval1.,and it is not the case that : singleton intinterval1.)))and it holds that 'NOT(EQ(INTINTERVAL1,__INTINTERVAL1))',and it is not the case that : ((singleton intinterval1. AND singleton __INTINTERVAL1.) OR (singleton __INTINTERVAL1. AND singleton intinterval1.)) OR ((singleton intinterval1. AND singleton __INTINTERVAL1.) OR ((singleton intinterval1. AND singleton __INTINTERVAL1.,and it is not the case that : singleton __INTINTERVAL1.) OR (singleton __INTINTERVAL1. AND singleton intinterval1.,and it is not the case that : singleton intinterval1.))) AND singleton intinterval1. AND singleton __INTINTERVAL1.and it holds that 'NOT(EQ(INTINTERVAL1,__INTINTERVAL1))'.
Comment : clear the relation
Request : unassert k1interval1,k1interval1
Reply   : 

Comment : tests with full-key relation holding an interval value
Comment : clear the relation
Request : unassert k1interval2,k1interval2
Reply   : 
Comment : avoid this clearance from being rolled back by any error
Request : commit
Reply   : 
Comment : assert nothing to k1interval2
Request : assert k1interval2,k1interval2()
Reply   : 
Comment : should be k1interval2()
Request : inquire k1interval2
Reply   : RELATION(HEADING(INTINTERVAL1(INTINTERVAL))BODY())
Comment : assert empty interval, should be ok but without a tuple effectively appearing
Request : assert k1interval2,relation(heading(intinterval1(intinterval))body(tuple(intinterval1(begin(5)end(5)))))
Reply   : 
Comment : should be k1interval2()
Request : inquire k1interval2
Reply   : RELATION(HEADING(INTINTERVAL1(INTINTERVAL))BODY())
Comment : assert tuple
Request : assert k1interval2,k1interval2(tuple(intinterval1(begin(5)end(8))))
Reply   : 
Comment : should be k1interval2(tuple(intinterval1(begin(5)end(8))))
Request : inquire k1interval2
Reply   : RELATION(HEADING(INTINTERVAL1(INTINTERVAL))BODY(TUPLE(INTINTERVAL1(BEGIN(5)END(8)))))
Comment : assert tuple again
Request : assert k1interval2,k1interval2
Reply   : 
Comment : should still be k1interval2(tuple(intinterval1(begin(5)end(8))))
Request : inquire k1interval2
Reply   : RELATION(HEADING(INTINTERVAL1(INTINTERVAL))BODY(TUPLE(INTINTERVAL1(BEGIN(5)END(8)))))
Comment : assert overlapping tuple, should be ok, tuples should be merged
Request : assert k1interval2,k1interval2(tuple(intinterval1(begin(7)end(9))))
Reply   : 
Comment : should be k1interval2(tuple(intinterval1(begin(5)end(9))))
Request : inquire k1interval2
Reply   : RELATION(HEADING(INTINTERVAL1(INTINTERVAL))BODY(TUPLE(INTINTERVAL1(BEGIN(5)END(9)))))
Comment : assert meeting tuple, should be ok, tuples should be merged
Request : assert k1interval2,k1interval2(tuple(intinterval1(begin(9)end(19))))
Reply   : 
Comment : should be k1interval2(tuple(intinterval1(begin(5)end(19))))
Request : inquire k1interval2
Reply   : RELATION(HEADING(INTINTERVAL1(INTINTERVAL))BODY(TUPLE(INTINTERVAL1(BEGIN(5)END(19)))))
Comment : assert meeting tuple, should be ok, tuples should be merged
Request : assert k1interval2,k1interval2(tuple(intinterval1(begin(4)end(5))))
Reply   : 
Comment : should be k1interval2(tuple(intinterval1(begin(4)end(19))))
Request : inquire k1interval2
Reply   : RELATION(HEADING(INTINTERVAL1(INTINTERVAL))BODY(TUPLE(INTINTERVAL1(BEGIN(4)END(19)))))
Comment : assert disjoint tuple, should be ok
Request : assert k1interval2,k1interval2(tuple(intinterval1(begin(-6)end(3))))
Reply   : 
Comment : should be k1interval2(tuple(intinterval1(begin(-6)end(3)))tuple(intinterval1(begin(4)end(19))))
Request : inquire k1interval2
Reply   : RELATION(HEADING(INTINTERVAL1(INTINTERVAL))BODY(TUPLE(INTINTERVAL1(BEGIN(-6)END(3)))TUPLE(INTINTERVAL1(BEGIN(4)END(19)))))
Comment : unassert nothing from k1interval2
Request : unassert k1interval2,k1interval2()
Reply   : 
Comment : should still be k1interval2(tuple(intinterval1(begin(-6)end(3)))tuple(intinterval1(begin(4)end(19))))
Request : inquire k1interval2
Reply   : RELATION(HEADING(INTINTERVAL1(INTINTERVAL))BODY(TUPLE(INTINTERVAL1(BEGIN(-6)END(3)))TUPLE(INTINTERVAL1(BEGIN(4)END(19)))))
Comment : unassert nonexisting tuple, should be ok
Request : unassert k1interval2,k1interval2(tuple(intinterval1(begin(44))))
Reply   : 
Comment : should still be k1interval2(tuple(intinterval1(begin(-6)end(3)))tuple(intinterval1(begin(4)end(19))))
Request : inquire k1interval2
Reply   : RELATION(HEADING(INTINTERVAL1(INTINTERVAL))BODY(TUPLE(INTINTERVAL1(BEGIN(-6)END(3)))TUPLE(INTINTERVAL1(BEGIN(4)END(19)))))
Comment : unassert partially existing tuple, should be ok
Request : unassert k1interval2,k1interval2(tuple(intinterval1(begin(18))))
Reply   : 
Comment : should still be k1interval2(tuple(intinterval1(begin(-6)end(3)))tuple(intinterval1(begin(4)end(18))))
Request : inquire k1interval2
Reply   : RELATION(HEADING(INTINTERVAL1(INTINTERVAL))BODY(TUPLE(INTINTERVAL1(BEGIN(-6)END(3)))TUPLE(INTINTERVAL1(BEGIN(4)END(18)))))
Comment : unassert partially existing tuple, should be ok
Request : unassert k1interval2,k1interval2(tuple(intinterval1(begin(-44)end(-4))))
Reply   : 
Comment : should still be k1interval2(tuple(intinterval1(begin(-4)end(3)))tuple(intinterval1(begin(4)end(18))))
Request : inquire k1interval2
Reply   : RELATION(HEADING(INTINTERVAL1(INTINTERVAL))BODY(TUPLE(INTINTERVAL1(BEGIN(-4)END(3)))TUPLE(INTINTERVAL1(BEGIN(4)END(18)))))
Comment : unassert partially existing tuples, should be ok
Request : unassert k1interval2,k1interval2(tuple(intinterval1(begin(2)end(6))))
Reply   : 
Comment : should still be k1interval2(tuple(intinterval1(begin(-4)end(2)))tuple(intinterval1(begin(6)end(18))))
Request : inquire k1interval2
Reply   : RELATION(HEADING(INTINTERVAL1(INTINTERVAL))BODY(TUPLE(INTINTERVAL1(BEGIN(-4)END(2)))TUPLE(INTINTERVAL1(BEGIN(6)END(18)))))
Comment : unassert fully existing tuple, should be ok
Request : unassert k1interval2,k1interval2(tuple(intinterval1(begin(6)end(8))))
Reply   : 
Comment : should be k1interval2(tuple(intinterval1(begin(-4)end(2)))tuple(intinterval1(begin(8)end(18))))
Request : inquire k1interval2
Reply   : RELATION(HEADING(INTINTERVAL1(INTINTERVAL))BODY(TUPLE(INTINTERVAL1(BEGIN(-4)END(2)))TUPLE(INTINTERVAL1(BEGIN(8)END(18)))))
Comment : unassert fully existing tuple, should be ok
Request : unassert k1interval2,k1interval2(tuple(intinterval1(begin(16)end(18))))
Reply   : 
Comment : should be k1interval2(tuple(intinterval1(begin(-4)end(2)))tuple(intinterval1(begin(8)end(16))))
Request : inquire k1interval2
Reply   : RELATION(HEADING(INTINTERVAL1(INTINTERVAL))BODY(TUPLE(INTINTERVAL1(BEGIN(-4)END(2)))TUPLE(INTINTERVAL1(BEGIN(8)END(16)))))
Comment : avoid rollback in next command
Request : commit
Reply   : 
Comment : unassert fully existing tuple, should be ok
Request : unassert k1interval2,k1interval2(tuple(intinterval1(begin(10)end(11))))
Reply   : 
Comment : should be k1interval2(tuple(intinterval1(begin(-4)end(2)))tuple(intinterval1(begin(8)end(10)))tuple(intinterval1(begin(11)end(16))))
Request : inquire k1interval2
Reply   : RELATION(HEADING(INTINTERVAL1(INTINTERVAL))BODY(TUPLE(INTINTERVAL1(BEGIN(-4)END(2)))TUPLE(INTINTERVAL1(BEGIN(11)END(16)))TUPLE(INTINTERVAL1(BEGIN(8)END(10)))))
Comment : clear the relation
Request : unassert k1interval2,k1interval2
Reply   : 
Request : commit
Reply   : 

Request : cmd(unassert recordtype,recordtype(tuple(indexname(loc)filename(dbmkeys.spdb)storagespaceid(1)recordtypename(rec)relvarname(k1))tuple(filename(dbmkeys.spdb)indexname(loc)storagespaceid(1)recordtypename(rec)relvarname(k1interval2))tuple(recordtypename(rec)relvarname(k1interval1)indexname(loc)filename(dbmkeys.spdb)storagespaceid(1))tuple(filename(dbmkeys.spdb)storagespaceid(1)recordtypename(rec)indexname(loc)relvarname(k1scalar2))tuple(recordtypename(rec)relvarname(k1scalar1)filename(dbmkeys.spdb)indexname(loc)storagespaceid(1))))cmd(unassert index,index(tuple(filename(dbmkeys.spdb)storagespaceid(2)recordtypename(rec)relvarname(k1scalar2)indexname(loc))tuple(filename(dbmkeys.spdb)storagespaceid(3)recordtypename(rec)relvarname(k1scalar1)indexname(loc))tuple(filename(dbmkeys.spdb)storagespaceid(4)recordtypename(rec)relvarname(k1interval2)indexname(loc))tuple(filename(dbmkeys.spdb)storagespaceid(5)recordtypename(rec)relvarname(k1interval1)indexname(loc))tuple(filename(dbmkeys.spdb)storagespaceid(6)recordtypename(rec)relvarname(k1)indexname(loc))))cmd(unassert recordattribute,recordattribute(tuple(recordtypename(rec)relvarname(k1scalar2)attributename(scalar1)ordinal(10))tuple(recordtypename(rec)relvarname(k1scalar1)attributename(scalar1)ordinal(20))tuple(recordtypename(rec)relvarname(k1interval2)attributename(intinterval1)ordinal(30))tuple(recordtypename(rec)relvarname(k1interval1)attributename(intinterval1)ordinal(10))))cmd(unassert indexcomponent,indexcomponent(tuple(relvarname(k1scalar2)indexname(loc)ordinal(10)sp_expression(scalar1))tuple(relvarname(k1scalar1)indexname(loc)ordinal(10)sp_expression(scalar1))))
Reply   : 

Request : cmd(unassert dbmsfile,dbmsfile(tuple(filename(dbmkeys.spdb)pagesize(8192))))cmd(unassert storagespace,storagespace(tuple(filename(dbmkeys.spdb)extentscount(2)pagecount(2)storagespaceid(1))tuple(filename(dbmkeys.spdb)extentscount(2)pagecount(2)storagespaceid(2))tuple(filename(dbmkeys.spdb)extentscount(2)pagecount(2)storagespaceid(3))tuple(filename(dbmkeys.spdb)extentscount(2)pagecount(2)storagespaceid(4))tuple(filename(dbmkeys.spdb)extentscount(2)pagecount(2)storagespaceid(5))tuple(filename(dbmkeys.spdb)extentscount(2)pagecount(2)storagespaceid(6))))cmd(unassert dataspace,dataspace(tuple(filename(dbmkeys.spdb)storagespaceid(1)gapcompressionthreshold(5)maximumgaps(9))))cmd(unassert hashingindexspace,hashingindexspace(tuple(filename(dbmkeys.spdb)storagespaceid(2))tuple(filename(dbmkeys.spdb)storagespaceid(3))tuple(filename(dbmkeys.spdb)storagespaceid(4))tuple(filename(dbmkeys.spdb)storagespaceid(5))tuple(filename(dbmkeys.spdb)storagespaceid(6))))
Reply   : 

Request : cmd(unassert relvar,relvar(tuple(relvarname(k1scalar2)relvarpredicate(fullkey scalar1.))tuple(relvarname(k1interval2)relvarpredicate(fullkey intinterval1.))tuple(relvarname(k1scalar1)relvarpredicate(singleton scalar1.))tuple(relvarname(k1)relvarpredicate(the shop is open.))tuple(relvarname(k1interval1)relvarpredicate(singleton intinterval1.))))cmd(unassert key,key(tuple(relvarname(k1scalar1)errorcode(1234567))tuple(relvarname(k1interval1)errorcode(1234568))))cmd(unassert relvarattribute,relvarattribute(tuple(relvarname(k1scalar2)attributename(scalar1))tuple(relvarname(k1interval2)attributename(intinterval1))tuple(relvarname(k1scalar1)attributename(scalar1))tuple(relvarname(k1interval1)attributename(intinterval1))))
Reply   : 

Request : unassert attribute,semiminus(attribute(tuple(attributename(scalar1)typename(long))tuple(attributename(intinterval1)typename(intinterval))tuple(attributename(scalar2)typename(long))),relvarattribute)
Reply   : 

END
