Actually I found the problem and the solution to this upgrade issue.
When upgrading the files for the alfrescoNtlm1 (in shared/classes/alfresco/extension/subsystems/Authentication/alfrescoNtlm) files cannot be copied from the previous version. The new xml files in particular have to be copied from the WEB-INF directory structure. Doing so solved the problem with a MySQL upgrade from 4.0.c => 4.0.d => 4.2.b.
I hope this can help other users with their upgrade.