This is a low level error that tells us that your database is corrupted. If it only happens when you add the logs filter, it would appear that the logs table is corrupted. My advice would be to restore your database from a recent backup.
As an aside, this type of corruption can occur if you are storing your GSAK databases directly in a cloud sync folder (e.g. DropBox, SugarSync). If you are, you should move your databases out of that folder and use a backup program to copy the files to the cloud sync folder to avoid future corruption.