# # # patch "database.cc" # from [ca8dca6588274c6f6b60f304de7d138eb0ab0472] # to [689ac268b23d8b758f0f815ed54c56434e1b8df7] # ============================================================ --- database.cc ca8dca6588274c6f6b60f304de7d138eb0ab0472 +++ database.cc 689ac268b23d8b758f0f815ed54c56434e1b8df7 @@ -636,9 +636,11 @@ vector row; for (int col = 0; col < ncol; col++) { - const char * value = sqlite3_column_text_s(i->second.stmt(), col); + const char * value = (const char*)sqlite3_column_blob(i->second.stmt(), col); + int bytes = sqlite3_column_bytes(i->second.stmt(), col); E(value, F("null result in query: %s\n") % query); - row.push_back(value); + // TOO MUCH COPYING, we should use resize and [] + row.push_back(std::string(value,value+bytes)); //L(F("row %d col %d value='%s'\n") % nrow % col % value); } res.push_back(row);