From: Aki Tuomi Date: Tue, 24 Nov 2015 13:49:45 +0000 (+0200) Subject: Use 128k fetch buffer X-Git-Tag: dnsdist-1.0.0-alpha1~203^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cbb77857b8588b29a3d91e206e4d5d187282d932;p=thirdparty%2Fpdns.git Use 128k fetch buffer --- diff --git a/modules/godbcbackend/sodbc.cc b/modules/godbcbackend/sodbc.cc index 562d4dda33..10c1b274d0 100644 --- a/modules/godbcbackend/sodbc.cc +++ b/modules/godbcbackend/sodbc.cc @@ -275,12 +275,12 @@ SSqlStatement* SODBCStatement::nextRow(row_t& row) // Column is NULL, so we can skip the converting part. row.push_back( "" ); } else { - SQLCHAR coldata[4096]; - result = SQLGetData( d_statement, i + 1, SQL_C_CHAR, (SQLPOINTER) coldata, 4096, &len ); - std::string strres = std::string(reinterpret_cast(coldata), std::min(4095,len)); + SQLCHAR coldata[128*1024]; + result = SQLGetData( d_statement, i + 1, SQL_C_CHAR, (SQLPOINTER) coldata, 131702, &len ); + std::string strres = std::string(reinterpret_cast(coldata), std::min(131701,len)); // do not use nil byte while(result == SQL_SUCCESS_WITH_INFO && len > 0) { // all data is consumed if len < 1 - result = SQLGetData( d_statement, i + 1, SQL_C_CHAR, (SQLPOINTER) coldata, 4096, &len ); - strres = strres + std::string(reinterpret_cast(coldata), std::min(4095,len)); + result = SQLGetData( d_statement, i + 1, SQL_C_CHAR, (SQLPOINTER) coldata, 131702, &len ); + strres = strres + std::string(reinterpret_cast(coldata), std::min(131701,len)); cerr<<"len="<