Hello community, here is the log from the commit of package soprano for openSUSE:13.1 checked in at 2013-10-24 14:33:10 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:13.1/soprano (Old) and /work/SRC/openSUSE:13.1/.soprano.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "soprano" Changes: -------- --- /work/SRC/openSUSE:13.1/soprano/soprano-backend-sesame.changes 2013-10-06 19:43:04.000000000 +0200 +++ /work/SRC/openSUSE:13.1/.soprano.new/soprano-backend-sesame.changes 2013-10-24 14:33:11.000000000 +0200 @@ -1,0 +2,11 @@ +Wed Oct 9 17:45:31 UTC 2013 - hrvoje.senjan@gmail.com + +- Update to 2.9.4 + * Virtuoso Backend - Automatically delete faulty transaction logs + * Virtuoso Backend supports parameterized queries which consume + less memory when inserting large amounts of plain text +- Dropped 0001-VirtuosoBackend-Automatic-delete-faulty-transaction-log.patch + merged upstream +- Added pkgconfig(libclucene-core) BuildRequires + +------------------------------------------------------------------- soprano-backend-virtuoso.changes: same change soprano.changes: same change Old: ---- 0001-VirtuosoBackend-Automatic-delete-faulty-transaction-log.patch soprano-2.9.3.tar.bz2 New: ---- soprano-2.9.4.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ soprano-backend-sesame.spec ++++++ --- /var/tmp/diff_new_pack.NYTB98/_old 2013-10-24 14:33:11.000000000 +0200 +++ /var/tmp/diff_new_pack.NYTB98/_new 2013-10-24 14:33:11.000000000 +0200 @@ -22,14 +22,11 @@ Group: System/Libraries # COMMON1-BEGIN # COMMON1-BEGIN -Version: 2.9.3 +Version: 2.9.4 Release: 0 Url: http://soprano.sourceforge.net/ Source0: http://downloads.sourceforge.net/soprano/soprano-%{version}.tar.bz2 Source100: baselibs.conf -# PATCH-FIX-UPSTREAM 0001-VirtuosoBackend-Automatic-delete-faulty-transaction-log.patch -- resolves the situation when e.g. -# soprano log got corrupted, and that prevented nepomuk from opening the database -Patch0: 0001-VirtuosoBackend-Automatic-delete-faulty-transaction-log.patch BuildRequires: cmake BuildRequires: doxygen BuildRequires: kde4-filesystem @@ -37,13 +34,14 @@ BuildRequires: libraptor-devel BuildRequires: librasqal-devel BuildRequires: libredland-devel +BuildRequires: pkgconfig(libclucene-core) %if 0%{?suse_version} BuildRequires: update-desktop-files %endif # COMMON1-END # COMMON1-END BuildRequires: java-devel -BuildRequires: libsoprano-devel +BuildRequires: libsoprano-devel = %{version} Requires: java Requires: libsoprano4 = %{version} Provides: backend-sesame2 = %{version} @@ -57,7 +55,6 @@ # COMMON2-BEGIN # COMMON2-BEGIN %setup -q -n soprano-%{version} -%patch0 -p1 # COMMON2-END # COMMON2-END ++++++ soprano-backend-virtuoso.spec ++++++ --- /var/tmp/diff_new_pack.NYTB98/_old 2013-10-24 14:33:11.000000000 +0200 +++ /var/tmp/diff_new_pack.NYTB98/_new 2013-10-24 14:33:11.000000000 +0200 @@ -22,14 +22,11 @@ Group: System/Libraries # COMMON1-BEGIN # COMMON1-BEGIN -Version: 2.9.3 +Version: 2.9.4 Release: 0 Url: http://soprano.sourceforge.net/ Source0: http://downloads.sourceforge.net/soprano/soprano-%{version}.tar.bz2 Source100: baselibs.conf -# PATCH-FIX-UPSTREAM 0001-VirtuosoBackend-Automatic-delete-faulty-transaction-log.patch -- resolves the situation when e.g. -# soprano log got corrupted, and that prevented nepomuk from opening the database -Patch0: 0001-VirtuosoBackend-Automatic-delete-faulty-transaction-log.patch BuildRequires: cmake BuildRequires: doxygen BuildRequires: kde4-filesystem @@ -37,13 +34,14 @@ BuildRequires: libraptor-devel BuildRequires: librasqal-devel BuildRequires: libredland-devel +BuildRequires: pkgconfig(libclucene-core) %if 0%{?suse_version} BuildRequires: update-desktop-files %endif # COMMON1-END # COMMON1-END BuildRequires: libiodbc-devel -BuildRequires: libsoprano-devel +BuildRequires: libsoprano-devel = %{version} Requires: libsoprano4 = %{version} Requires: virtuoso-server Provides: backend-virtuso = %{version} @@ -57,7 +55,6 @@ # COMMON2-BEGIN # COMMON2-BEGIN %setup -q -n soprano-%{version} -%patch0 -p1 # COMMON2-END # COMMON2-END ++++++ soprano.spec ++++++ --- /var/tmp/diff_new_pack.NYTB98/_old 2013-10-24 14:33:11.000000000 +0200 +++ /var/tmp/diff_new_pack.NYTB98/_new 2013-10-24 14:33:11.000000000 +0200 @@ -21,14 +21,11 @@ License: LGPL-2.1+ and GPL-2.0+ Group: System/Libraries # COMMON1-BEGIN -Version: 2.9.3 +Version: 2.9.4 Release: 0 Url: http://soprano.sourceforge.net/ Source0: http://downloads.sourceforge.net/soprano/soprano-%{version}.tar.bz2 Source100: baselibs.conf -# PATCH-FIX-UPSTREAM 0001-VirtuosoBackend-Automatic-delete-faulty-transaction-log.patch -- resolves the situation when e.g. -# soprano log got corrupted, and that prevented nepomuk from opening the database -Patch0: 0001-VirtuosoBackend-Automatic-delete-faulty-transaction-log.patch BuildRequires: cmake BuildRequires: doxygen BuildRequires: kde4-filesystem @@ -36,6 +33,7 @@ BuildRequires: libraptor-devel BuildRequires: librasqal-devel BuildRequires: libredland-devel +BuildRequires: pkgconfig(libclucene-core) %if 0%{?suse_version} BuildRequires: update-desktop-files %endif @@ -56,7 +54,6 @@ %prep # COMMON2-BEGIN %setup -q -n soprano-%{version} -%patch0 -p1 # COMMON2-END %package backend-redland @@ -88,9 +85,11 @@ Group: Development/Libraries/C and C++ Requires: %{name} = %{version} Requires: libraptor-devel +Requires: librasqal-devel Requires: libredland-devel Requires: libsoprano4 = %{version} Requires: soprano-backend-redland +Requires: pkgconfig(libclucene-core) %requires_ge libqt4-devel %description -n libsoprano-devel @@ -149,6 +148,7 @@ %defattr(-,root,root,-) %{_libdir}/libsopranoclient.so.1* %{_libdir}/libsopranoserver.so.1* +%{_libdir}/libsopranoindex.so.* %{_libdir}/libsoprano.so.4* %files -n libsoprano-devel @@ -158,8 +158,10 @@ %{_libdir}/libsoprano.so %{_libdir}/libsopranoclient.so %{_libdir}/libsopranoserver.so +%{_libdir}/libsopranoindex.so %{_libdir}/pkgconfig/soprano.pc %{_libdir}/pkgconfig/sopranoclient.pc +%{_libdir}/pkgconfig/sopranoindex.pc %{_libdir}/pkgconfig/sopranoserver.pc %{_datadir}/soprano/cmake/ ++++++ soprano-2.9.3.tar.bz2 -> soprano-2.9.4.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.9.3/CMakeLists.txt new/soprano-2.9.4/CMakeLists.txt --- old/soprano-2.9.3/CMakeLists.txt 2013-07-10 23:39:15.000000000 +0200 +++ new/soprano-2.9.4/CMakeLists.txt 2013-10-09 19:22:28.000000000 +0200 @@ -14,7 +14,7 @@ ################## Soprano version ################################ set(CMAKE_SOPRANO_VERSION_MAJOR 2) set(CMAKE_SOPRANO_VERSION_MINOR 9) -set(CMAKE_SOPRANO_VERSION_RELEASE 3) +set(CMAKE_SOPRANO_VERSION_RELEASE 4) set(CMAKE_SOPRANO_VERSION_STRING "${CMAKE_SOPRANO_VERSION_MAJOR}.${CMAKE_SOPRANO_VERSION_MINOR}.${CMAKE_SOPRANO_VERSION_RELEASE}") @@ -68,6 +68,8 @@ endif(WIN32) endif(NOT SOPRANO_DISABLE_RAPTOR_PARSER OR NOT SOPRANO_DISABLE_RAPTOR_SERIALIZER OR NOT SOPRANO_DISABLE_REDLAND_BACKEND) +# disable indexer if not explicitly enabled below +set(SOPRANO_BUILD_INDEX_LIB 0 CACHE INTERNAL "Soprano Index is not built" FORCE) if(NOT SOPRANO_DISABLE_CLUCENE_INDEX) find_package(CLucene) if(CLucene_FOUND) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.9.3/ChangeLog new/soprano-2.9.4/ChangeLog --- old/soprano-2.9.3/ChangeLog 2013-07-10 23:39:15.000000000 +0200 +++ new/soprano-2.9.4/ChangeLog 2013-10-09 19:22:28.000000000 +0200 @@ -1,3 +1,7 @@ +2.9.4 + * Automatically delete fault transaction logs + * Virtuoso backend supports parameterized queries which seem to consume + less memory when inserting large amounts of plain text 2.9.3 * Fix bugs in FilterModel * Optimize literal to N3 conversion diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.9.3/backends/redland/redlandworld.cpp new/soprano-2.9.4/backends/redland/redlandworld.cpp --- old/soprano-2.9.3/backends/redland/redlandworld.cpp 2013-07-10 23:39:15.000000000 +0200 +++ new/soprano-2.9.4/backends/redland/redlandworld.cpp 2013-10-09 19:22:28.000000000 +0200 @@ -96,7 +96,7 @@ } -int redlandLogHandler( void* user, librdf_log_message* msg ) +int REDLAND_CALLBACK_STDCALL redlandLogHandler( void* user, librdf_log_message* msg ) { Soprano::Redland::World* w = reinterpret_cast<Soprano::Redland::World*>( user ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.9.3/backends/virtuoso/odbcconnection.cpp new/soprano-2.9.4/backends/virtuoso/odbcconnection.cpp --- old/soprano-2.9.3/backends/virtuoso/odbcconnection.cpp 2013-07-10 23:39:15.000000000 +0200 +++ new/soprano-2.9.4/backends/virtuoso/odbcconnection.cpp 2013-10-09 19:22:28.000000000 +0200 @@ -67,13 +67,13 @@ } -Soprano::Error::ErrorCode Soprano::ODBC::Connection::executeCommand( const QString& command ) +Soprano::Error::ErrorCode Soprano::ODBC::Connection::executeCommand( const QString& command, const QList<Soprano::Node>& params ) { // qDebug() << Q_FUNC_INFO << command; Error::ErrorCode result = Error::ErrorNone; - HSTMT hstmt = execute( command ); + HSTMT hstmt = execute( command, params ); if ( hstmt ) { SQLCloseCursor( hstmt ); SQLFreeHandle( SQL_HANDLE_STMT, hstmt ); @@ -100,7 +100,7 @@ } -HSTMT Soprano::ODBC::Connection::execute( const QString& request ) +HSTMT Soprano::ODBC::Connection::execute( const QString& request, const QList<Soprano::Node>& params ) { HSTMT hstmt; if ( SQLAllocHandle( SQL_HANDLE_STMT, d->m_hdbc, &hstmt ) != SQL_SUCCESS ) { @@ -108,6 +108,52 @@ return 0; } else { + // counter for the parameter index + int i = 1; + // counter for the node index + int ni = 0; + + // each parameter requires its own variable which can be referenced by a pointer + // since we never use more than 4 nodes for now (we only use parameters for adding statements) + // we can stick to a fixed number of variables + SQLSMALLINT mode[4]; + QVector<QByteArray> values(4); + QVector<QByteArray> dtOrLangs(4); + + // the type vars can be shared as they do not change + SQLLEN cbInt = 0; + SQLLEN cbChar = SQL_NTS; + + // run through all nodes and create the parameters + // We do *not* parameterize blank nodes + foreach(const Soprano::Node& node, params) { + if(node.isResource()) { + mode[ni] = 1; + values[ni] = node.uri().toEncoded(); + SQLBindParameter( hstmt, i++, SQL_PARAM_INPUT, SQL_C_SSHORT, SQL_SMALLINT, 0, 0, &(mode[ni]), 0, &cbInt); + SQLBindParameter( hstmt, i++, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, values[ni].length(), 0, values[ni].data(), 0, &cbChar); + SQLBindParameter( hstmt, i++, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, values[ni].length(), 0, values[ni].data(), 0, &cbChar); // ignored + } + else if(node.isLiteral()) { + values[ni] = node.literal().toString().toUtf8(); + if(!node.literal().dataTypeUri().isEmpty()) { + mode[ni] = 4; + dtOrLangs[ni] = node.literal().dataTypeUri().toEncoded(); + } + else if(node.literal().language().isValid()) { + mode[ni] = 5; + dtOrLangs[ni] = node.literal().language().toString().toUtf8(); + } + else { + mode[ni] = 3; + } + SQLBindParameter( hstmt, i++, SQL_PARAM_INPUT, SQL_C_SSHORT, SQL_SMALLINT, 0, 0, &(mode[ni]), 0, &cbInt); + SQLBindParameter( hstmt, i++, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, values[ni].length(), 0, values[ni].data(), 0, &cbChar); + SQLBindParameter( hstmt, i++, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, dtOrLangs[ni].length(), 0, dtOrLangs[ni].data(), 0, &cbChar); + } + + ++ni; + } QByteArray utf8Request = request.toUtf8(); if ( !SQL_SUCCEEDED( SQLExecDirect( hstmt, ( UCHAR* )utf8Request.data(), utf8Request.length() ) ) ) { setError( Virtuoso::convertSqlError( SQL_HANDLE_STMT, hstmt, QLatin1String( "SQLExecDirect failed on query '" ) + request + '\'' ) ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.9.3/backends/virtuoso/odbcconnection.h new/soprano-2.9.4/backends/virtuoso/odbcconnection.h --- old/soprano-2.9.3/backends/virtuoso/odbcconnection.h 2013-07-10 23:39:15.000000000 +0200 +++ new/soprano-2.9.4/backends/virtuoso/odbcconnection.h 2013-10-09 19:22:28.000000000 +0200 @@ -24,6 +24,7 @@ #include <QtCore/qglobal.h> #include <QtCore/QObject> +#include <QtCore/QList> #include "error.h" #ifdef Q_OS_WIN @@ -31,6 +32,8 @@ #endif #include <sql.h> +#include "node.h" + namespace Soprano { namespace ODBC { @@ -45,7 +48,7 @@ public: ~Connection(); - Error::ErrorCode executeCommand( const QString& command ); + Error::ErrorCode executeCommand( const QString& command, const QList<Soprano::Node>& params = QList<Soprano::Node>() ); QueryResult* executeQuery( const QString& request ); public Q_SLOTS: @@ -54,7 +57,7 @@ private: Connection(); - HSTMT execute( const QString& query ); + HSTMT execute( const QString& query, const QList<Soprano::Node>& params = QList<Soprano::Node>() ); ConnectionPrivate* const d; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.9.3/backends/virtuoso/virtuosocontroller.cpp new/soprano-2.9.4/backends/virtuoso/virtuosocontroller.cpp --- old/soprano-2.9.3/backends/virtuoso/virtuosocontroller.cpp 2013-07-10 23:39:15.000000000 +0200 +++ new/soprano-2.9.4/backends/virtuoso/virtuosocontroller.cpp 2013-10-09 19:22:28.000000000 +0200 @@ -166,7 +166,7 @@ m_virtuosoProcess.start( virtuosoExe, args, QIODevice::ReadOnly ); m_virtuosoProcess.setReadChannel( QProcess::StandardError ); m_virtuosoProcess.closeReadChannel( QProcess::StandardOutput ); - if ( waitForVirtuosoToInitialize() ) { + if ( waitForVirtuosoToInitialize(virtuosoExe, args) ) { clearError(); m_status = Running; qDebug() << "Virtuoso started:" << m_virtuosoProcess.pid(); @@ -179,7 +179,7 @@ } -bool Soprano::VirtuosoController::waitForVirtuosoToInitialize() +bool Soprano::VirtuosoController::waitForVirtuosoToInitialize(const QString& exe, const QStringList& args) { // FIXME: timeout if ( m_virtuosoProcess.waitForStarted() ) { @@ -187,7 +187,25 @@ while( m_virtuosoProcess.canReadLine() ) { QString line = QString::fromLatin1( m_virtuosoProcess.readLine() ); qDebug() << line; - if ( line.contains( "Server online at" ) ) { + if ( line.contains( "Delete transaction log" ) ) { + // Close virtuoso and restart - + disconnect( &m_virtuosoProcess, SIGNAL(finished(int,QProcess::ExitStatus)), + this, SLOT(slotProcessFinished(int,QProcess::ExitStatus)) ); + m_virtuosoProcess.close(); + m_virtuosoProcess.waitForFinished(); + QString storagePath = m_virtuosoProcess.workingDirectory(); + QFile::remove( storagePath + "/soprano-virtuoso.trx" ); + + connect( &m_virtuosoProcess, SIGNAL(finished(int,QProcess::ExitStatus)), + this, SLOT(slotProcessFinished(int,QProcess::ExitStatus)) ); + m_virtuosoProcess.setWorkingDirectory(storagePath); + m_virtuosoProcess.start(exe, args, QIODevice::ReadOnly); + m_virtuosoProcess.setReadChannel( QProcess::StandardError ); + m_virtuosoProcess.closeReadChannel( QProcess::StandardOutput ); + m_virtuosoProcess.waitForStarted(); + m_virtuosoProcess.waitForReadyRead(-1); + } + else if ( line.contains( "Server online at" ) ) { m_virtuosoProcess.closeReadChannel( QProcess::StandardError ); m_status = Running; return true; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.9.3/backends/virtuoso/virtuosocontroller.h new/soprano-2.9.4/backends/virtuoso/virtuosocontroller.h --- old/soprano-2.9.3/backends/virtuoso/virtuosocontroller.h 2013-07-10 23:39:15.000000000 +0200 +++ new/soprano-2.9.4/backends/virtuoso/virtuosocontroller.h 2013-10-09 19:22:28.000000000 +0200 @@ -80,7 +80,9 @@ private: void writeConfigFile( const QString& path, const BackendSettings& settings ); - bool waitForVirtuosoToInitialize(); + // The exe and args are passed in the event that virtuoso has a corrupted transaction + // file and needs to be restarted after deleting the transaction file + bool waitForVirtuosoToInitialize(const QString& exe, const QStringList& args); QProcess m_virtuosoProcess; QString m_configFilePath; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.9.3/backends/virtuoso/virtuosomodel.cpp new/soprano-2.9.4/backends/virtuoso/virtuosomodel.cpp --- old/soprano-2.9.3/backends/virtuoso/virtuosomodel.cpp 2013-07-10 23:39:15.000000000 +0200 +++ new/soprano-2.9.4/backends/virtuoso/virtuosomodel.cpp 2013-10-09 19:22:28.000000000 +0200 @@ -56,14 +56,18 @@ } QString Soprano::VirtuosoModelPrivate::statementToConstructGraphPattern( const Soprano::Statement& s, - bool withContext ) const + bool withContext, + bool parameterized) const { QString query; if ( withContext ) { query += QLatin1String( "graph " ); if ( s.context().isValid() ) { - query += nodeToN3( s.context() ); + if (parameterized && !s.context().isBlank()) + query += QLatin1String("bif:__rdf_long_from_batch_params(\?\?,\?\?,\?\?)"); + else + query += nodeToN3( s.context() ); } else { query += QLatin1String( "?g" ); @@ -72,28 +76,39 @@ } if ( s.subject().isValid() ) { - query += nodeToN3( s.subject() ) + ' '; + if (parameterized && !s.subject().isBlank()) + query += QLatin1String("`bif:__rdf_long_from_batch_params(\?\?,\?\?,\?\?)` "); + else + query += nodeToN3( s.subject() ) + ' '; } else { query += QLatin1String( "?s " ); } if ( s.predicate().isValid() ) { - query += nodeToN3( s.predicate() ) + ' '; + if (parameterized) + query += QLatin1String("`bif:__rdf_long_from_batch_params(\?\?,\?\?,\?\?)` "); + else + query += nodeToN3( s.predicate() ) + ' '; } else { query += QLatin1String( "?p " ); } if ( s.object().isValid() ) { - if ( m_fakeBooleans && s.object().literal().isBool() ) - query += Soprano::Node( Soprano::LiteralValue::fromString( s.object().literal().toBool() ? QString( QLatin1String( "true" ) ) : QLatin1String("false"), - Soprano::Virtuoso::fakeBooleanType() ) ).toN3(); - else if ( s.object().literal().isByteArray() ) - query += Soprano::Node( Soprano::LiteralValue::fromString( s.object().literal().toString(), - Soprano::Virtuoso::fakeBase64BinaryType() ) ).toN3(); - else - query += nodeToN3( s.object() ); + if (parameterized && !s.object().isBlank()) { + query += QLatin1String("`bif:__rdf_long_from_batch_params(\?\?,\?\?,\?\?)`"); + } + else { + if ( m_fakeBooleans && s.object().literal().isBool() ) + query += Soprano::Node( Soprano::LiteralValue::fromString( s.object().literal().toBool() ? QString( QLatin1String( "true" ) ) : QLatin1String("false"), + Soprano::Virtuoso::fakeBooleanType() ) ).toN3(); + else if ( s.object().literal().isByteArray() ) + query += Soprano::Node( Soprano::LiteralValue::fromString( s.object().literal().toString(), + Soprano::Virtuoso::fakeBase64BinaryType() ) ).toN3(); + else + query += nodeToN3( s.object() ); + } } else { query += QLatin1String( "?o" ); @@ -165,16 +180,6 @@ } -// -// Patrick van Kleef <pkleef@openlinksw.com> says: -// You may want to concider using the TTLP_MT stored procedure to load -// either large number of triples or large triples, since this is much more -// efficient. You can call this with: -// -// TTLP_MT( ?, 'graphname', 'graphname', 255); -// -// and bind with a blob parameter that holds the triples. -// Soprano::Error::ErrorCode Soprano::VirtuosoModel::addStatement( const Statement& statement ) { // qDebug() << Q_FUNC_INFO << statement; @@ -197,15 +202,26 @@ } } - QString insert = QString::fromLatin1("sparql insert into %1") - .arg( d->statementToConstructGraphPattern( s, true ) ); + // for adding statements we use ODBC parameters which are way more efficient than plain query strings, especially for long values + QString insert = QLatin1String("sparql insert into ") + d->statementToConstructGraphPattern( s, true, true ); + QList<Node> paramNodes; + if(statement.context().isValid() && !statement.context().isBlank()) + paramNodes << statement.context(); + else + paramNodes << Virtuoso::defaultGraph(); + if(statement.subject().isValid() && !statement.subject().isBlank()) + paramNodes << statement.subject(); + if(statement.predicate().isValid()) + paramNodes << statement.predicate(); + if(statement.object().isValid() && !statement.object().isBlank()) + paramNodes << statement.object(); if ( ODBC::Connection* conn = d->connectionPool->connection() ) { - if ( conn->executeCommand( insert ) == Error::ErrorNone ) { + + if ( conn->executeCommand( insert, paramNodes ) == Error::ErrorNone ) { clearError(); if(!d->m_noStatementSignals) { - // FIXME: can this be done with SQL/RDF views? emit statementAdded( statement ); emit statementsAdded(); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.9.3/backends/virtuoso/virtuosomodel_p.h new/soprano-2.9.4/backends/virtuoso/virtuosomodel_p.h --- old/soprano-2.9.3/backends/virtuoso/virtuosomodel_p.h 2013-07-10 23:39:15.000000000 +0200 +++ new/soprano-2.9.4/backends/virtuoso/virtuosomodel_p.h 2013-10-09 19:22:28.000000000 +0200 @@ -66,7 +66,7 @@ m_openIteratorMutex.unlock(); } - QString statementToConstructGraphPattern( const Soprano::Statement& s, bool withContext = false ) const; + QString statementToConstructGraphPattern( const Soprano::Statement& s, bool withContext = false, bool parameterized = false ) const; QueryResultIterator sqlQuery( const QString& query ); QueryResultIterator sparqlQuery( const QString& query ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.9.3/cmake/modules/FindCLucene.cmake new/soprano-2.9.4/cmake/modules/FindCLucene.cmake --- old/soprano-2.9.3/cmake/modules/FindCLucene.cmake 2013-07-10 23:39:15.000000000 +0200 +++ new/soprano-2.9.4/cmake/modules/FindCLucene.cmake 2013-10-09 19:22:28.000000000 +0200 @@ -4,23 +4,24 @@ # # CLUCENE_INCLUDE_DIR = where CLucene/StdHeader.h can be found # CLUCENE_LIBRARY_DIR = where CLucene/clucene-config.h can be found -# CLUCENE_LIBRARY = the library to link against CLucene +# CLUCENE_LIBRARY = the library to link against CLucene - DEPRECATED Use CLUCENE_LIBRARIES +# CLUCENE_LIBRARIES = the libraries to link against CLucene # CLUCENE_VERSION = The CLucene version string # CLucene_FOUND = set to 1 if clucene is found # -INCLUDE(CheckSymbolExists) -INCLUDE(FindLibraryWithDebug) +include(CheckSymbolExists) +include(FindLibraryWithDebug) if(NOT CLUCENE_MIN_VERSION) set(CLUCENE_MIN_VERSION "0.9.16") -endif(NOT CLUCENE_MIN_VERSION) +endif() -IF(EXISTS ${PROJECT_CMAKE}/CLuceneConfig.cmake) - INCLUDE(${PROJECT_CMAKE}/CLuceneConfig.cmake) -ENDIF(EXISTS ${PROJECT_CMAKE}/CLuceneConfig.cmake) +if(EXISTS ${PROJECT_CMAKE}/CLuceneConfig.cmake) + include(${PROJECT_CMAKE}/CLuceneConfig.cmake) +endif() -SET(TRIAL_LIBRARY_PATHS +set(TRIAL_LIBRARY_PATHS $ENV{CLUCENE_HOME}/lib${LIB_SUFFIX} ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX} /usr/local/lib${LIB_SUFFIX} @@ -28,7 +29,8 @@ /sw/lib${LIB_SUFFIX} /usr/pkg/lib${LIB_SUFFIX} ) -SET(TRIAL_INCLUDE_PATHS + +set(TRIAL_INCLUDE_PATHS $ENV{CLUCENE_HOME}/include ${CMAKE_INSTALL_PREFIX}/include /usr/local/include @@ -36,63 +38,81 @@ /sw/include /usr/pkg/include ) -FIND_LIBRARY_WITH_DEBUG(CLUCENE_LIBRARY + +find_library_with_debug(CLUCENE_LIBRARY WIN32_DEBUG_POSTFIX d NAMES clucene clucene-core PATHS ${TRIAL_LIBRARY_PATHS}) -IF (CLUCENE_LIBRARY) - MESSAGE(STATUS "Found CLucene library: ${CLUCENE_LIBRARY}") -ENDIF (CLUCENE_LIBRARY) -FIND_PATH(CLUCENE_INCLUDE_DIR + +# On Linux, Soprano needs both clucene-core and clucene-shared +# CLUCENE_LIBRARIES contains both entries if available +set(CLUCENE_LIBRARIES ${CLUCENE_LIBRARY}) + +find_library(CLUCENE_SHARED_LIBRARY + NAMES clucene-shared + HINTS ${TRIAL_LIBRARY_PATHS} +) + +if(CLUCENE_SHARED_LIBRARY) + set(CLUCENE_LIBRARIES ${CLUCENE_LIBRARIES} ${CLUCENE_SHARED_LIBRARY}) +endif() + +if(CLUCENE_LIBRARIES) + message(STATUS "Found CLucene: ${CLUCENE_LIBRARIES}") +endif() + +find_path(CLUCENE_INCLUDE_DIR NAMES CLucene.h PATHS ${TRIAL_INCLUDE_PATHS}) -IF (CLUCENE_INCLUDE_DIR) - MESSAGE(STATUS "Found CLucene include dir: ${CLUCENE_INCLUDE_DIR}") -ENDIF (CLUCENE_INCLUDE_DIR) - -IF(WIN32) - SET(TRIAL_LIBRARY_PATHS ${CLUCENE_INCLUDE_DIR}) -ENDIF(WIN32) +if(CLUCENE_INCLUDE_DIR) + message(STATUS "Found CLucene include dir: ${CLUCENE_INCLUDE_DIR}") +endif() + +if(WIN32) + set(TRIAL_LIBRARY_PATHS ${CLUCENE_INCLUDE_DIR}) +endif() -SET(CLUCENE_GOOD_VERSION TRUE) +set(CLUCENE_GOOD_VERSION TRUE) -GET_FILENAME_COMPONENT(TRIAL_LIBRARY_DIR ${CLUCENE_LIBRARY} PATH) -FIND_PATH(CLUCENE_LIBRARY_DIR +get_filename_component(TRIAL_LIBRARY_DIR ${CLUCENE_LIBRARY} PATH) +find_path(CLUCENE_LIBRARY_DIR NAMES CLucene/clucene-config.h PATHS ${TRIAL_LIBRARY_DIR} ${TRIAL_LIBRARY_PATHS} ${TRIAL_INCLUDE_PATHS} NO_DEFAULT_PATH) -IF (CLUCENE_LIBRARY_DIR) - MESSAGE(STATUS "Found CLucene library dir: ${CLUCENE_LIBRARY_DIR}") - FILE(READ ${CLUCENE_LIBRARY_DIR}/CLucene/clucene-config.h CLCONTENT) - STRING(REGEX MATCH "_CL_VERSION +\".*\"" CLMATCH ${CLCONTENT}) - IF (CLMATCH) - STRING(REGEX REPLACE "_CL_VERSION +\"(.*)\"" "\\1" CLUCENE_VERSION ${CLMATCH}) - IF (CLUCENE_VERSION VERSION_LESS "${CLUCENE_MIN_VERSION}") - MESSAGE(FATAL_ERROR " CLucene version ${CLUCENE_VERSION} is less than the required minimum ${CLUCENE_MIN_VERSION}") - SET(CLUCENE_GOOD_VERSION FALSE) - ENDIF (CLUCENE_VERSION VERSION_LESS "${CLUCENE_MIN_VERSION}") - IF (CLUCENE_VERSION VERSION_EQUAL "0.9.17") - MESSAGE(FATAL_ERROR "CLucene version 0.9.17 is not supported.") - SET(CLUCENE_GOOD_VERSION FALSE) - ENDIF (CLUCENE_VERSION VERSION_EQUAL "0.9.17") - ENDIF (CLMATCH) -ENDIF (CLUCENE_LIBRARY_DIR) - -IF(CLUCENE_INCLUDE_DIR AND CLUCENE_LIBRARY AND CLUCENE_LIBRARY_DIR AND CLUCENE_GOOD_VERSION) - SET(CLucene_FOUND TRUE) -ENDIF(CLUCENE_INCLUDE_DIR AND CLUCENE_LIBRARY AND CLUCENE_LIBRARY_DIR AND CLUCENE_GOOD_VERSION) - -IF(CLucene_FOUND) - IF(NOT CLucene_FIND_QUIETLY) - MESSAGE(STATUS "Found CLucene: ${CLUCENE_LIBRARY}") - ENDIF(NOT CLucene_FIND_QUIETLY) -ELSE(CLucene_FOUND) - IF(CLucene_FIND_REQUIRED) - MESSAGE(FATAL_ERROR "Could not find CLucene.") - ENDIF(CLucene_FIND_REQUIRED) -ENDIF(CLucene_FOUND) - -MARK_AS_ADVANCED( - CLUCENE_INCLUDE_DIR - CLUCENE_LIBRARY_DIR - CLUCENE_LIBRARY +if(CLUCENE_LIBRARY_DIR) + message(STATUS "Found CLucene library dir: ${CLUCENE_LIBRARY_DIR}") + file(READ ${CLUCENE_LIBRARY_DIR}/CLucene/clucene-config.h CLCONTENT) + string(REGEX MATCH "_CL_VERSION +\".*\"" CLMATCH ${CLCONTENT}) + if(CLMATCH) + string(REGEX REPLACE "_CL_VERSION +\"(.*)\"" "\\1" CLUCENE_VERSION ${CLMATCH}) + if(CLUCENE_VERSION VERSION_LESS "${CLUCENE_MIN_VERSION}") + message(FATAL_ERROR " CLucene version ${CLUCENE_VERSION} is less than the required minimum ${CLUCENE_MIN_VERSION}") + set(CLUCENE_GOOD_VERSION FALSE) + endif() + if(CLUCENE_VERSION VERSION_EQUAL "0.9.17") + message(FATAL_ERROR "CLucene version 0.9.17 is not supported.") + set(CLUCENE_GOOD_VERSION FALSE) + endif() + endif() +endif() + +if(CLUCENE_INCLUDE_DIR AND CLUCENE_LIBRARIES AND CLUCENE_LIBRARY_DIR AND CLUCENE_GOOD_VERSION) + set(CLucene_FOUND TRUE) +endif() + +if(CLucene_FOUND) + if(NOT CLucene_FIND_QUIETLY) + message(STATUS "Found CLucene: ${CLUCENE_LIBRARIES}") + endif() +else() + if(CLucene_FIND_REQUIRED) + message(FATAL_ERROR "Could not find CLucene.") + endif() +endif() + +mark_as_advanced( + CLUCENE_INCLUDE_DIR + CLUCENE_LIBRARY_DIR + CLUCENE_SHARED_LIBRARY + CLUCENE_LIBRARY + CLUCENE_LIBRARIES ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.9.3/cmake/modules/FindRedland.cmake new/soprano-2.9.4/cmake/modules/FindRedland.cmake --- old/soprano-2.9.3/cmake/modules/FindRedland.cmake 2013-07-10 23:39:15.000000000 +0200 +++ new/soprano-2.9.4/cmake/modules/FindRedland.cmake 2013-10-09 19:22:28.000000000 +0200 @@ -108,7 +108,7 @@ try_run(_TEST_EXITCODE _TEST_COMPILED "${CMAKE_CURRENT_BINARY_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/CheckLibraryLoads.c" - CMAKE_FLAGS "-DLINK_LIBRARIES=dl" + CMAKE_FLAGS "-DLINK_LIBRARIES=${CMAKE_DL_LIBS}" RUN_OUTPUT_VARIABLE _OUTPUT ARGS ${_REDLAND_STORAGE_LIBS} ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.9.3/index/CMakeLists.txt new/soprano-2.9.4/index/CMakeLists.txt --- old/soprano-2.9.3/index/CMakeLists.txt 2013-07-10 23:39:15.000000000 +0200 +++ new/soprano-2.9.4/index/CMakeLists.txt 2013-10-09 19:22:28.000000000 +0200 @@ -46,7 +46,7 @@ sopranoindex ${QT_QTCORE_LIBRARY} soprano - ${CLUCENE_LIBRARY} + ${CLUCENE_LIBRARIES} ) set_target_properties( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.9.3/server/CMakeLists.txt new/soprano-2.9.4/server/CMakeLists.txt --- old/soprano-2.9.3/server/CMakeLists.txt 2013-07-10 23:39:15.000000000 +0200 +++ new/soprano-2.9.4/server/CMakeLists.txt 2013-10-09 19:22:28.000000000 +0200 @@ -40,18 +40,10 @@ endif(BUILD_DBUS_SUPPORT) configure_file(soprano-server-config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/soprano-server-config.h) - -#set(soprano_serverbackend_SRC -# serverbackend.h -# serverbackend.cpp -#) qt4_automoc(${soprano_server_SRC}) -#qt4_automoc(${soprano_serverbackend_SRC}) - add_library(sopranoserver ${LIBRARY_TYPE} ${soprano_server_SRC}) -#add_library(soprano_serverclientbackend SHARED ${soprano_serverbackend_SRC}) qt4_automoc(sopranodcore.cpp) @@ -81,15 +73,11 @@ endif(BUILD_DBUS_SUPPORT) -#target_link_libraries( -# soprano_serverclientbackend -# sopranoclient -#) - target_link_libraries( sopranod soprano sopranoserver + ${CLUCENE_LIBRARIES} ) if(SOPRANO_BUILD_INDEX_LIB) @@ -105,12 +93,6 @@ ARCHIVE DESTINATION lib ) -#INSTALL(TARGETS soprano_serverclientbackend -# LIBRARY DESTINATION ${LIB_DESTINATION}/soprano -# RUNTIME DESTINATION bin/soprano -# ARCHIVE DESTINATION lib/soprano -#) - install( FILES servercore.h diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.9.3/soprano/CMakeLists.txt new/soprano-2.9.4/soprano/CMakeLists.txt --- old/soprano-2.9.3/soprano/CMakeLists.txt 2013-07-10 23:39:15.000000000 +0200 +++ new/soprano-2.9.4/soprano/CMakeLists.txt 2013-10-09 19:22:28.000000000 +0200 @@ -166,9 +166,6 @@ inference/statementpattern.h inference/sil.h inference/inferenceruleparser.h -# query/query.h -# query/queryparser.h -# query/queryserializer.h soprano.h vocabulary.h util/dummymodel.h diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.9.3/test/CMakeLists.txt new/soprano-2.9.4/test/CMakeLists.txt --- old/soprano-2.9.3/test/CMakeLists.txt 2013-07-10 23:39:15.000000000 +0200 +++ new/soprano-2.9.4/test/CMakeLists.txt 2013-10-09 19:22:28.000000000 +0200 @@ -110,12 +110,6 @@ target_link_libraries(inferencemodeltest soprano ${QT_QTCORE_LIBRARY} ${QT_QTTEST_LIBRARY}) add_test(inferencemodeltest ${EXECUTABLE_OUTPUT_PATH}/inferencemodeltest) -# QueryAPITest -#qt4_automoc(queryapitest queryapitest.cpp) -#add_executable(queryapitest queryapitest.cpp) -#target_link_libraries(queryapitest soprano ${QT_QTCORE_LIBRARY} ${QT_QTTEST_LIBRARY}) -#add_test(queryapitest ${EXECUTABLE_OUTPUT_PATH}/queryapitest) - if(BUILD_SESAME2_BACKEND) # Sesame2 model tests qt4_automoc(sesame2backendtest sesame2backendtest.cpp) @@ -156,12 +150,12 @@ # TString test qt4_automoc(tstringtest tstringtest.cpp) add_executable(tstringtest tstringtest.cpp stringpool.cpp ../index/tstring.cpp) - target_link_libraries(tstringtest ${QT_QTCORE_LIBRARY} ${QT_QTTEST_LIBRARY} ${CLUCENE_LIBRARY}) + target_link_libraries(tstringtest ${QT_QTCORE_LIBRARY} ${QT_QTTEST_LIBRARY} ${CLUCENE_LIBRARIES}) add_test(tstringtest ${EXECUTABLE_OUTPUT_PATH}/tstringtest) qt4_automoc(cluceneindextest cluceneindextest.cpp) add_executable(cluceneindextest cluceneindextest.cpp stringpool.cpp) - target_link_libraries(cluceneindextest soprano sopranoindex ${QT_QTCORE_LIBRARY} ${QT_QTTEST_LIBRARY} ${CLUCENE_LIBRARY}) + target_link_libraries(cluceneindextest soprano sopranoindex ${QT_QTCORE_LIBRARY} ${QT_QTTEST_LIBRARY} ${CLUCENE_LIBRARIES}) add_test(cluceneindextest ${EXECUTABLE_OUTPUT_PATH}/cluceneindextest) qt4_automoc(indexmodelmultithreadingtest indexmodelmultithreadingtest.cpp) @@ -179,13 +173,13 @@ qt4_automoc(sopranodsocketclienttest sopranodsocketclienttest.cpp) add_executable(sopranodsocketclienttest sopranodsocketclienttest.cpp) target_link_libraries(sopranodsocketclienttest sopranomodeltest sopranoclient ${QT_QTCORE_LIBRARY} ${QT_QTTEST_LIBRARY} ${QT_QTNETWORK_LIBRARY}) -add_test(sopranodsocketclienttest ${EXECUTABLE_OUTPUT_PATH}/sopranodclienttest) +add_test(sopranodsocketclienttest ${EXECUTABLE_OUTPUT_PATH}/sopranodsocketclienttest) if(BUILD_DBUS_SUPPORT) qt4_automoc(sopranodbusclienttest sopranodbusclienttest.cpp) add_executable(sopranodbusclienttest sopranodbusclienttest.cpp) target_link_libraries(sopranodbusclienttest sopranomodeltest sopranoclient ${QT_QTCORE_LIBRARY} ${QT_QTTEST_LIBRARY} ${QT_QTNETWORK_LIBRARY}) -add_test(sopranodbusclienttest ${EXECUTABLE_OUTPUT_PATH}/sopranodclienttest) +add_test(sopranodbusclienttest ${EXECUTABLE_OUTPUT_PATH}/sopranodbusclienttest) qt4_automoc(sopranodbusmultithreadtest sopranodbusmultithreadtest.cpp) add_executable(sopranodbusmultithreadtest sopranodbusmultithreadtest.cpp) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.9.3/tools/CMakeLists.txt new/soprano-2.9.4/tools/CMakeLists.txt --- old/soprano-2.9.3/tools/CMakeLists.txt 2013-07-10 23:39:15.000000000 +0200 +++ new/soprano-2.9.4/tools/CMakeLists.txt 2013-10-09 19:22:28.000000000 +0200 @@ -24,6 +24,7 @@ ${QT_QTCORE_LIBRARY} soprano sopranoclient + ${CLUCENE_LIBRARY} ) if(SOPRANO_BUILD_INDEX_LIB) target_link_libraries( ++++++ soprano-backend-sesame.spec.in ++++++ --- /var/tmp/diff_new_pack.NYTB98/_old 2013-10-24 14:33:12.000000000 +0200 +++ /var/tmp/diff_new_pack.NYTB98/_new 2013-10-24 14:33:12.000000000 +0200 @@ -24,7 +24,7 @@ # COMMON1-BEGIN # COMMON1-END BuildRequires: java-devel -BuildRequires: libsoprano-devel +BuildRequires: libsoprano-devel = %{version} Requires: java Requires: libsoprano4 = %{version} Provides: soprano_backend = %{version} ++++++ soprano-backend-virtuoso.spec.in ++++++ --- /var/tmp/diff_new_pack.NYTB98/_old 2013-10-24 14:33:12.000000000 +0200 +++ /var/tmp/diff_new_pack.NYTB98/_new 2013-10-24 14:33:12.000000000 +0200 @@ -24,7 +24,7 @@ # COMMON1-BEGIN # COMMON1-END BuildRequires: libiodbc-devel -BuildRequires: libsoprano-devel +BuildRequires: libsoprano-devel = %{version} Requires: libsoprano4 = %{version} Requires: virtuoso-server Provides: soprano_backend = %{version} -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org