Surprisingly PHP stack frames are passed as references to the error
handling code, thus changing value there leads to changing value in the
executed code.
With MySQL issuing warning about incompatible version (different runtime
library than compile time), handling this warning rewrites current stack
frame and the mysql_real_connect later sees parameters as processed by
Error class for display.
We now create copy of the stacktrace to avoid this.
Fixes#12279
Signed-off-by: Michal Čihař <michal@cihar.com>