Such an error usually occurs after trying to upgrade a partially upgraded database. Can you double-check that upgrade is performed on an intact database?
@Vitaliy
You were absolutely right!
The error occurred because the database was corrupted. I used the backup database and the upgrade to 3.3.0-8 was perfect. Thank you very much for your help.