Skip to content

Executing a syntactically incorrect statement within a transaction causes hang on the server side #118

@srinathgit

Description

@srinathgit

There is an existing bug (Issue # 106) with hasStatement() implementation where it generates syntactically incorrect ASK statement. When such a statement is run with in a transaction, the server hangs indefinitely. If I remove the transaction, the test completes with a failure (which is expected as the hasStatement should fail). The test succeeds after removing hasStatement() .

@test
public void testAddDeleteInsertWhere()
throws OpenRDFException
{
testAdminCon.add(fei,lname,feilname);
testAdminCon.add(fei, email, feiemail);
testAdminCon.begin();
testAdminCon.prepareUpdate(
" DELETE { <" + fei.stringValue() + "> <#email> "" + feiemail.stringValue() + ""} "+
" INSERT { <" + fei.stringValue() + "> <#email> "[email protected]"} where{ ?s <#email> ?o}" ,"http://marklogicsparql.com/addressbook").execute();
Assert.assertTrue(testAdminCon.hasStatement(vf.createStatement(fei, email, vf.createLiteral("[email protected]")), false));
testAdminCon.commit();
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions