mysql: replace all "cast(foo as integer)" to "cast(foo as signed integer)" and not just the first one

Same as #4331.