Well I find that quite strange. I had tested a bit and really thought comments were harmless in sql queries.
My tests: remove the call to remove_remarks in db_readdump.php3 then try to upload and execute a dump file containing:
Indeed, you're right. I'm terribly sorry not to have seen this when I tested after removing remove_remarks()...
Anyway, if you try to remove comments again, you have to ignore '#' that are in SQL strings if you don't want to bring back the # bug (#444279).
That's the annoying point...
Yep, I can see it's back... But it still can be properly solved. I'll try to do something for it.
Benjamin