Can you provide more information about your use of BDB ? Including the BDB version and the python's extension version ? Also, we would like to know the OS version.
We are not familiar with the python extension implementation, but if you can provide a test case to reproduce the issue, we can try to debug it to check where the issue happens.
Actualy is was my fault. I hadn't set the bt_compare method when adding the data. I did that and now there's no truncated data. Just in case anyone else having the same problem, I was using Berkeley DB 6.0 with python 2.7 and bsddb3 6.0.
Thank you all,