I get a strange behavior in my CPP application using the mysqlcpp library with sql::SQLString. When I create a ne SQLString, either from const char or std::string, it seems like the constructor malformes the content.
Here my code:
sql::SQLString hostname("jp-sys3");
//sql::SQLString hostname = sql::SQLString(settings->database().hostname());
sql::SQLString username = sql::SQLString(settings->database().username());
sql::SQLString password = sql::SQLString(settings->database().password());
When I initialize a variable of the SQLString with this literal or from my settings class (std::string), I see, when setting a break point (at line sql::SQLString username), that the content of hostname is something completely different
E.g.
realStr="\b=8";

But this differs from run to run.
At first I used pre-build libraries (1.1.3, x32) and later I built it from source (Visual Studio 2012 Update 2). This resulted in the same behavior. Debug build treats the char literal in the right way, the release build not.
Can anyone give a hint what`s going wrong here?
Debug link options:
/OUT:"D:\Projects\STGPanel\Debug\STGPanel.exe" /MANIFEST /NXCOMPAT /PDB:"D:\Projects\STGPanel\Debug\STGPanel.pdb" /DYNAMICBASE "SDL.lib" "SDLmain.lib" "SDL_ttf.lib" "mysqlcppconn.lib" "xerces-c_3.lib" "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "odbc32.lib" "odbccp32.lib" /DEBUG /MACHINE:X86 /INCREMENTAL:NO /PGD:"D:\Projects\STGPanel\Debug\STGPanel.pgd" /SUBSYSTEM:CONSOLE /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /ManifestFile:"Debug\STGPanel.exe.intermediate.manifest" /ERRORREPORT:PROMPT /NOLOGO /TLBID:1
Release link options:
/OUT:"D:\Projects\STGPanel\Release\STGPanel.exe" /MANIFEST /LTCG /NXCOMPAT /PDB:"D:\Projects\STGPanel\Release\STGPanel.pdb" /DYNAMICBASE "SDL.lib" "SDLmain.lib" "SDL_ttf.lib" "mysqlcppconn.lib" "xerces-c_3.lib" "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "odbc32.lib" "odbccp32.lib" /DEBUG /MACHINE:X86 /OPT:REF /SAFESEH /PGD:"D:\Projects\STGPanel\Release\STGPanel.pgd" /SUBSYSTEM:CONSOLE /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /ManifestFile:"Release\STGPanel.exe.intermediate.manifest" /OPT:ICF /ERRORREPORT:PROMPT /NOLOGO /TLBID:1