0

Using SOCI Firebird v4.0 trunk to Read/Write data from/to a Firebird database.

The problem is, when I select all the rows from a table that are over 2 million rows via a select statement, SOCI throws an std::bad_alloc exception and I get only exactly the value of 1024 * 1024 rows that is: 1048576

I don't know if SOCI has a limit or there is something else I am missing here!

BTW I am storing the rows in a std::vector.

  • Firebird itself as no such limit. I don't know SOCI, but maybe you need to look for a way to stream results instead of attempting to retrieve all rows at once. In any case, you need to post the necessary code to reproduce this and the full error information (a [mcve]). – Mark Rotteveel Apr 08 '19 at 11:27

1 Answers1

0

Neither SOCI nor Firebird was responsible for this. The only cause was the system itself that ran out of memory and can't handle over 2^32 on 32-bit version. I had to recompile the code in 64-bit and test it in a 64-bit system.