Hi Quentin,

Testing against the stable/7 branch release this week as part of the Virtuoso 
7.1 open source release I do not encounter the crash you report:

Driver: 07.10.3207 OpenLink Virtuoso ODBC Driver
OpenLink Interactive SQL (Virtuoso), version 0.9849b.
Type HELP; for help and EXIT; to exit.
SQL> create procedure test.test.inlineSparqlTest (  ) 
test.test.inlineSparqlTest(0) {
test.test.inlineSparqlTest(1) 
test.test.inlineSparqlTest(1) declare graphName, objectText1, objectText2, 
uri1, uri2 VARCHAR;
test.test.inlineSparqlTest(1) graphName := 'testGraph';
test.test.inlineSparqlTest(1) uri1 := 'Subject1';
test.test.inlineSparqlTest(1) uri2 := 'Subject2';
test.test.inlineSparqlTest(1) objectText1  := '111';
test.test.inlineSparqlTest(1) objectText2  := '222';
test.test.inlineSparqlTest(1) 
test.test.inlineSparqlTest(1) sparql
test.test.inlineSparqlTest(1) prefix : <http://MyOntology/>
test.test.inlineSparqlTest(1) insert into graph ?:graphName {
test.test.inlineSparqlTest(2) `iri(?:uri1)` a :MyClass .
test.test.inlineSparqlTest(2) `iri(?:uri1)` :Pred ?:objectText1 .
test.test.inlineSparqlTest(2) };
test.test.inlineSparqlTest(1) 
test.test.inlineSparqlTest(1) 
test.test.inlineSparqlTest(1) declare sparqlstr VARCHAR;
test.test.inlineSparqlTest(1) 
test.test.inlineSparqlTest(1) sparqlstr := concat('sparql
test.test.inlineSparqlTest(1) prefix : <http://MyOntology/>
test.test.inlineSparqlTest(1) insert into graph <',graphName,'> {
test.test.inlineSparqlTest(1) <',uri2,'> a :MyClass .
test.test.inlineSparqlTest(1) <',uri2,'> :Pred <',objectText2,'> .
test.test.inlineSparqlTest(1) }');
test.test.inlineSparqlTest(1) exec(sparqlstr);
test.test.inlineSparqlTest(1) 
test.test.inlineSparqlTest(1) };

Done. -- 23 msec.
SQL> test.test.inlineSparqlTest();

Done. -- 186 msec.
SQL> sparql
Type the rest of statement, end with a semicolon (;)> select *
Type the rest of statement, end with a semicolon (;)> from <testGraph>
Type the rest of statement, end with a semicolon (;)> {
Type the rest of statement, end with a semicolon (;)> ?S a 
<http://MyOntology/MyClass> .
Type the rest of statement, end with a semicolon (;)> };
S
VARCHAR
_______________________________________________________________________________

Subject2

1 Rows. -- 1 msec.
SQL> sparql
Type the rest of statement, end with a semicolon (;)> select *
Type the rest of statement, end with a semicolon (;)> { GRAPH ?G {
Type the rest of statement, end with a semicolon (;)> ?S a 
<http://MyOntology/MyClass> .
Type the rest of statement, end with a semicolon (;)> }};
G                                                                               
  S
VARCHAR                                                                         
  VARCHAR
_______________________________________________________________________________

iri_id_5329486240_with_no_name_entry                                            
  Subject1
testGraph                                                                       
  Subject2

2 Rows. -- 1 msec.
SQL> sparql delete { GRAPH ?G { ?S ?P ?O }} where { GRAPH ?G { ?S a 
<http://MyOntology/MyClass> . ?S ?P ?O . }};

Done. -- 42 msec.
SQL> 
SQL> status('');
REPORT
VARCHAR
_______________________________________________________________________________

OpenLink Virtuoso  Server
Version 07.10.3207-pthreads for Darwin as of Feb 18 2014 
Started on: 2014-02-21 03:17 GMT+0

Which should be pretty much the same as the develop/7 branch you built from. 
Have you tried with the stable/7 branch ?

Best Regards
Hugh Williams
Professional Services
OpenLink Software, Inc.      //              http://www.openlinksw.com/
Weblog   -- http://www.openlinksw.com/blogs/
LinkedIn -- http://www.linkedin.com/company/openlink-software/
Twitter  -- http://twitter.com/OpenLink
Google+  -- http://plus.google.com/100570109519069333827/
Facebook -- http://www.facebook.com/OpenLinkSoftware
Universal Data Access, Integration, and Management Technology Providers

On 20 Feb 2014, at 12:26, Quentin <quent...@clearbluewater.com.au> wrote:

> Hi,
> 
> This is an interesting problem that was confusing me for a while.
> 
> The below function attempts to write four triples to one graph.  Only two of 
> them are written to the target graph, the other two end up in a strange 
> place.  No exception is thrown and the debug log is gives no indication that 
> anything went wrong.
> ============
> create procedure test.test.inlineSparqlTest (  ) 
> {
> 
> declare graphName, objectText1, objectText2, uri1, uri2 VARCHAR;
> graphName := 'testGraph';
> uri1 := 'Subject1';
> uri2 := 'Subject2';
> objectText1  := '111';
> objectText2  := '222';
> 
> sparql
> prefix : <http://MyOntology/>
> insert into graph ?:graphName {
> `iri(?:uri1)` a :MyClass .
> `iri(?:uri1)` :Pred ?:objectText1 .
> };
> 
> 
> declare sparqlstr VARCHAR;
> 
> sparqlstr := concat('sparql
> prefix : <http://MyOntology/>
> insert into graph <',graphName,'> {
> <',uri2,'> a :MyClass .
> <',uri2,'> :Pred <',objectText2,'> .
> }');
> exec(sparqlstr);
> 
> };
> test.test.inlineSparqlTest();
> sparql
> select *
> from <testGraph>
> {
> ?S a <http://MyOntology/MyClass> .
> };
> sparql
> select *
> { GRAPH ?G {
> ?S a <http://MyOntology/MyClass> .
> }};
> 
> ============
> 
> The two queries have different results which I think is wrong but the second 
> one shows that something strange is happening.
> The statement execution did not return a result set.
> The statement execution did not return a result set.
> Query result:
> S
> ANY
>  Subject2
> No. of rows in result: 1
> Query result:
> G
> ANY   S
> ANY
>  iri_id_139838998340000_with_no_name_entry     Subject1
>  testGraph     Subject2
> No. of rows in result: 2
> 
> Virtuoso Open Source Edition (Column Store) (multi threaded)
> Version 7.1.1-dev.3207-pthreads as of Feb 17 2014
> 
> Wrapping the graph name in iri() in the inline sparql seems to make it work 
> properly but I still think the result is strange when you don't.
> 
> When you try and remove those strange graph-less triples though...
> sparql
> delete { GRAPH ?G {
> ?S ?P ?O }}
> where
> { GRAPH ?G {
> ?S a <http://MyOntology/MyClass> .
> ?S ?P ?O .
> }};
> 
> I'll leave out the crash log because it's several pages long but you get the 
> idea.
> 
> The highlights are probably:
> 12:21:51 INFO: ERRS_0 01V01 QW001 Local declaration of o_val shadows a 
> definition of the same name
> 12:21:51 INFO: ERRS_0 01V01 QW001 Local declaration of o_dt_and_lang_twobyte 
> shadows a definition of the same name
> 12:21:51 INFO: ERRS_0 01V01 QW001 Local declaration of r_o shadows a 
> definition of the same name
> ...
> 12:21:52 ERROR: GPF: colsearch.c:2630 for unique ts, getting range with more 
> than 1 rows
> GPF: colsearch.c:2630 for unique ts, getting range with more than 1 rows
> 
> -- 
> Quentin | Clear Blue Water Pty Ltd
> quent...@clearbluewater.com.au
> ------------------------------------------------------------------------------
> Managing the Performance of Cloud-Based Applications
> Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
> Read the Whitepaper.
> http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk_______________________________________________
> Virtuoso-users mailing list
> Virtuoso-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/virtuoso-users

------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users

Reply via email to