To complement previous information : i have the chance to have a complete backup of my installation, before upgrading.
If i do copy the SQL query from the backup platform (3.3.7), and paste it to the new one (3.5.1), the SQL query is Ok and shows results. It's a pain to have to do it manually for several queries, but it allows to have something functionnal in the end.
I don't know/understand (for the moment) what was the cause of this problem (a change in Moodle ?).