Hi Quentin,

The query optimizer does not optimize  remote client queries ie PHP via ODBC in 
this case, I imagine it will be some ODBC option being set by the PHP interface 
that is changing the query execution for such connections.

When you ask about ODBC Driver building, I assume you mean the Virtuoso ODBC 
Driver which is built from a default open source compilation and located at:

$ pwd
/2d2/git/virt-develop7
$ find . -name virtodbc*.so -print
./binsrc/driver/.libs/virtodbcu.so
./binsrc/driver/.libs/virtodbc_r.so
./binsrc/driver/.libs/virtodbcu_r.so
./binsrc/driver/.libs/virtodbc.so
$ 

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 8 Dec 2015, at 14:51, Quentin <quentin@guidinghand.solutions> wrote:
> 
> Hi Hugh,
> 
> Thanks, please let me know what you find.
> 
> Separately from the error (does the query optimiser do something different 
> for remote queries?), can you give me any information about building odbc 
> drivers from v7stable?  Particularly to be installed on a separate server 
> talking to the DB box.
> 
> Quentin.
> 
> On 2015-12-02 00:18, Hugh Williams wrote:
>> Hi Quentin,
>> We are looking into this issue ...
>> Best Regards
>> Hugh Williams
>> Professional Services
>> OpenLink Software, Inc. // http://www.openlinksw.com/ [2]
>> Weblog -- http://www.openlinksw.com/blogs/ [3]
>> LinkedIn -- http://www.linkedin.com/company/openlink-software/ [4]
>> Twitter -- http://twitter.com/OpenLink [5]
>> Google+ -- http://plus.google.com/100570109519069333827/ [6]
>> Facebook -- http://www.facebook.com/OpenLinkSoftware [7]
>> Universal Data Access, Integration, and Management Technology
>> Providers
>>> On 1 Dec 2015, at 09:04, Quentin <quentin@guidinghand.solutions>
>>> wrote:
>>> Hi,
>>> I'm encountering some errors accessing Virtuoso7 via odbc. The
>>> actual
>>> error varies depending on the release but the below error occurs
>>> with
>>> the latest stable7.
>>> $ virtuoso-t -?
>>> Virtuoso Open Source Edition (Column Store) (multi threaded)
>>> Version 7.2.1.3214-pthreads as of Dec 1 2015
>>> Compiled for Linux (x86_64-unknown-linux-gnu)
>>> Copyright (C) 1998-2015 OpenLink Software
>>> The same error occurs under develop7 as well as the next older
>>> release
>>> of stable7. An older v6 driver against a v7 DB worked for the below
>>> query but had an unrelated buffer-underrun issue with blobs
>>> (exposing
>>> Apache's heap concatenated after the blob truncated to 4072
>>> characters).
>>> The actual error given is: "VD032: remote prepare: SQ200: No column
>>> t2.P.Complete."
>>> Running the DB in foreground/debug mode doesn't give any more
>>> information. The query and its result are shown here:
>>> *********************
>>> 05:15:04 INFO: COMP_2 dba XX.XX.XX.XX 1111:1 Compile text: SPARQL
>>> SELECT ?Object ?PredLabel
>>> FROM <Test/>
>>> WHERE {
>>> ?S ?P ?Object
>>> FILTER (?S = <Subject1>)
>>> { SELECT ?P ?PredLabel
>>> FROM <Test/Ontologies/>
>>> WHERE {
>>> ?P rdfs:label ?PredLabel .
>>> } }
>>> } ORDER BY ?ObjectLabel LIMIT 100
>>> 05:15:04 INFO: ERRS_0 S0022 SQ200 No column t2.P.
>>> 05:15:04 INFO: ERRS_0 S0022 VD032 remote prepare: SQ200: No column
>>> t2.P.
>>> *********************
>>> The presence or absence of triples in query results is irrelevant to
>>> the
>>> error. The query executes normally via isql and conductor.
>>> Assuming that PHP is configured for odbc, the script at the bottom
>>> of
>>> the post is sufficient to cause the error:
>>> Aside from assistance with the error in question, could I get some
>>> guidance on the 'correct' way to build or extract odbc drivers from
>>> a
>>> Virtuoso release? Or, given Ubuntu 14.04LTS, should I be using
>>> drivers
>>> from the iodbc package? It's possible that the error is due to an
>>> incorrect odbc configuration or driver and I'd like to check what
>>> I'm
>>> supposed to be doing there.
>>> Quentin.
>>> *********************
>>> <?php
>>> // Main
>>> function main() {
>>> $db_user = 'dba';
>>> $db_pass = 'dba';
>>> $dsn = 'testv7Stable';
>>> $cursor = SQL_CUR_USE_DRIVER;
>>> echo "Opening DB.n";
>>> $dbCon = odbc_connect($dsn, $db_user, $db_pass, $cursor);
>>> echo "DB open.n";
>>> $insertQuery1 = "SPARQL
>>> WITH <Test/Ontologies/>
>>> INSERT {
>>> <Pred1> rdfs:label "Test Predicate" .
>>> }";
>>> $insertQuery2 = "SPARQL
>>> WITH <Test/>
>>> INSERT {
>>> <Subject1> <Pred1> "Test Object" .
>>> }";
>>> $testQuery = "SPARQL
>>> SELECT ?Object ?PredLabel
>>> FROM <Test/>
>>> WHERE {
>>> ?S ?P ?Object
>>> FILTER (?S = <Subject1>)
>>> { SELECT ?P ?PredLabel
>>> FROM <Test/Ontologies/>
>>> WHERE {
>>> ?P rdfs:label ?PredLabel .
>>> } }
>>> } ORDER BY ?ObjectLabel LIMIT 100";
>>> $delete1 = "SPARQL DROP SILENT GRAPH <Test/>";
>>> $delete2 = "SPARQL DROP SILENT GRAPH <Test/Ontologies/>";
>>> $cur = (odbc_exec($dbCon, $insertQuery1));
>>> $cur = (odbc_exec($dbCon, $insertQuery2));
>>> $cur = (odbc_exec($dbCon, $testQuery));
>>> if (!odbc_error($dbCon)) {
>>> echo "Test passed.n";
>>> } else {
>>> echo "Test failed.n";
>>> echo odbc_errormsg($dbCon);
>>> }
>>> $cur = (odbc_exec($dbCon, $delete1));
>>> $cur = (odbc_exec($dbCon, $delete2));
>>> @odbc_close($dbCon);
>>> }
>>> echo "Starting.n";
>>> main();
>>> echo "Complete.n";
>>> ?>
>> ------------------------------------------------------------------------------
>>> Go from Idea to Many App Stores Faster with Intel(R) XDK
>>> Give your users amazing mobile app experiences with Intel(R) XDK.
>>> Use one codebase in this all-in-one HTML5 development environment.
>>> Design, debug & build mobile apps & 2D/3D high-impact games for
>>> multiple OSs.
>>> http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140 [1]
>>> _______________________________________________
>>> Virtuoso-users mailing list
>>> Virtuoso-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/virtuoso-users
>> Links:
>> ------
>> [1] http://pubads.g.doubleclick.net/gampad/clk?id=254741911&amp;iu=/4140
>> [2] http://www.openlinksw.com/
>> [3] http://www.openlinksw.com/blogs/
>> [4] http://www.linkedin.com/company/openlink-software/
>> [5] http://twitter.com/OpenLink
>> [6] http://plus.google.com/100570109519069333827/
>> [7] http://www.facebook.com/OpenLinkSoftware

Attachment: smime.p7s
Description: S/MIME cryptographic signature

------------------------------------------------------------------------------
_______________________________________________
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users

Reply via email to