This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/106467/

backends/virtuoso/odbcqueryresult.cpp (Diff revision 1)
bool Soprano::ODBC::QueryResult::isBlob( int colNum )
307
    int r = SQLGetData( d->m_hstmt, colNum, SQL_C_CHAR, dummyBuffer, 0, length );
311
    int r = SQLGetData( d->m_hstmt, colNum, SQL_C_CHAR, *buffer, bufSize, length );
Reading the code seems like you need a -4.

int r = SQLGetData( d->m_hstmt, colNum, SQL_C_CHAR, *buffer, bufSize-4, length );

backends/virtuoso/odbcqueryresult.cpp (Diff revision 1)
bool Soprano::ODBC::QueryResult::isBlob( int colNum )
320
        //
325
        if( *length > bufSize ) {
And here the same:

if( *length > bufSize-4) {

- Ignacio


On September 17th, 2012, 11:37 a.m. CEST, Vishesh Handa wrote:

Review request for Nepomuk, Soprano and Sebastian Trueg.
By Vishesh Handa.

Updated Sept. 17, 2012, 11:37 a.m.

Description

    Only use 1 SQLFetchData command in most of the cases.
    
    Callgrind stats show that 67.5% of the time in this function is spent in
    the first SQLFetchData, and an additional 27% in the second SQLGetData.
    We can avoid some of this extra cost, by only calling the function
    once.

I can change the size of the default buffer if required.

Diffs

  • backends/virtuoso/odbcqueryresult.cpp (a4f2387)

View Diff