I think we found the cause, while the LANG=zh-CN.GBK, this issue will happen. It seems the GBK and UTF-8 have different scope. So while convert GBK into UTF-8, some of them are out of range. Then utf-8 into UCS2 will have problem. We will create a Jira to track this.
Thanks and regards Alex From: Dave Birdsall<mailto:[email protected]> Sent: 2018年1月30日 2:05 To: [email protected]<mailto:[email protected]> Subject: RE: Info session Hi, I'd look at buffer[379] and see what's there. That seems to be a UTF-8 character that can't be mapped to UCS2. Dave From: ?? ? [mailto:[email protected]] Sent: Sunday, January 28, 2018 9:18 PM To: [email protected] Subject: Info session did anyone ever encountered the error as followings: *** ERROR[2109] Invalid Character error converting SQL statement from character set UTF8 to character set UCS2 (character position 379, byte offset 379). [2018-01-26 10:11:47] as we checked, LANG=zh_CN.UTF-8 and authentication details as below: [cid:ac95b784-e819-4839-8315-b1e78ce4c109] i found the source code for the query in the mxosrvr SrvrConnect::isInfoSession() SELECT [first 1]" "'%s' as \"SESSION_ID\"," "'%s' as \"SERVER_PROCESS_NAME\"," "'%s' as \"SERVER_PROCESS_ID\"," "'%s' as \"SERVER_HOST\"," "'%s' as \"SERVER_PORT\"," "'%s' as \"MAPPED_SLA\"," "'%s' as \"MAPPED_CONNECT_PROFILE\"," "'%s' as \"MAPPED_DISCONNECT_PROFILE\"," "'%d' as \"CONNECTED_INTERVAL_SEC\"," "'%s' as \"CONNECT_TIME\"," "'%s' as \"DATABASE_USER_NAME\"," "'%s' as \"USER_NAME\"," "'%s' as \"ROLE_NAME\"," "'%s' as \"APP_NAME\"," "'%s' as \"TENANT_NAME\"" "FROM (values(1)) X(A); then used the sprintf to fill the parameters: sprintf (buffer, pattern, srvrGlobal->sessionId, serverProcessName.c_str(), serverProcessId.c_str(), serverHost.c_str(), serverPort.c_str(), sla.c_str(), connectProfile.c_str(), disconnectProfile.c_str(), (int)(time(NULL) - connectedTimestamp), connecttime, srvrGlobal->QSDBUserName, srvrGlobal->QSUserName, srvrGlobal->QSRoleName, appName.c_str(), srvrGlobal->tenantName); i guess maybe some value encode not properly parsed caused the error. since could not reproduce yet locally, still checking. any clue will be appreciated. Nice Day Alex
