Passing Chinese characters in SQL statement in EDS
Issue
- Is there any additional setup / configuration need to be done in EDS to support chinese characters in the SQL statement ?
We are running below SQL statement in SQuirrel SQL statement
select * from EMS.SPEAKER where name='顾康生';
I noticed that teiid-command.log file shows it as '顾康生' instead of '顾康生' results in retrieving 0 records instead of matching correct records.
2014-10-06 21:23:05,878 DEBUG [org.teiid.COMMAND_LOG] (New I/O server worker #1-1:) START USER COMMAND: startTime=2014-10-06 21:23:05.878 requestID=y7ix1Y/wtESf.6 txID=null sessionID=y7ix1Y/wtESf applicationName=JDBC principal=teiid@teiid-security vdbName=BPMS_PEGA vdbVersion=1 sql=select * from EMS.SPEAKER where name='顾康生'
2014-10-06 21:23:05,883 DEBUG [org.teiid.COMMAND_LOG] (Worker439_QueryProcessorQueue69239:) PLAN USER COMMAND: endTime=2014-10-06 21:23:05.883 requestID=y7ix1Y/wtESf.6 txID=null sessionID=y7ix1Y/wtESf principal=teiid@teiid-security vdbName=BPMS_PEGA vdbVersion=1 finalRowCount=null
2014-10-06 21:23:07,730 DEBUG [org.teiid.COMMAND_LOG] (Worker440_QueryProcessorQueue69240:) START DATA SRC COMMAND: startTime=2014-10-06 21:23:07.73 requestID=y7ix1Y/wtESf.6 sourceCommandID=0 txID=null modelName=K2_SPEAKERPOOL translatorName=sqlserver sessionID=y7ix1Y/wtESf principal=teiid@teiid-security sql=SELECT g_0.SpeakerCategory AS c_0, g_0.SpeakerName AS c_1, g_0.CRMCode AS c_2, g_0.SpeakerIDCard AS c_3, g_0.HospitalName AS c_4, g_0.Level AS c_5, g_0.VendorCode AS c_6, g_0.BankName AS c_7, g_0.BankAccount AS c_8, g_0.City AS c_9 FROM K2_SPEAKERPOOL.V_SF_EMS_SpeakerPool AS g_0 WHERE g_0.SpeakerName = '顾康生' LIMIT 100
2014-10-06 21:23:07,998 DEBUG [org.teiid.COMMAND_LOG] (Worker440_QueryProcessorQueue69242:) END SRC COMMAND: endTime=2014-10-06 21:23:07.998 requestID=y7ix1Y/wtESf.6 sourceCommandID=0 txID=null modelName=K2_SPEAKERPOOL translatorName=sqlserver sessionID=y7ix1Y/wtESf principal=teiid@teiid-security finalRowCount=0
2014-10-06 21:23:08,358 DEBUG [org.teiid.COMMAND_LOG] (Worker440_QueryProcessorQueue69243:) END USER COMMAND: endTime=2014-10-06 21:23:08.358 requestID=y7ix1Y/wtESf.6 txID=null sessionID=y7ix1Y/wtESf principal=teiid@teiid-security vdbName=BPMS_PEGA vdbVersion=1 finalRowCount=0
Actual Issue
The SQuirrel SQL tool is sending the SQL statement with where clause 顾康生 or N'顾康生' to EDS correctly as shown below.
2014-10-09 20:49:53,214 DEBUG [org.teiid.COMMAND_LOG] (New I/O server worker #1-1:) START USER COMMAND: startTime=2014-10-09 20:49:53.214 requestID=NDzYWRzbpTKk.9 txID=null sessionID=NDzYWRzbpTKk applicationName=JDBC principal=teiid@teiid-security vdbName=BPMS_PEGA vdbVersion=1 sql=select * from EMS.SPEAKER where name=N'顾康生'
2014-10-09 20:49:53,225 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue26:) PLAN USER COMMAND: endTime=2014-10-09 20:49:53.225 requestID=NDzYWRzbpTKk.9 txID=null sessionID=NDzYWRzbpTKk principal=teiid@teiid-security vdbName=BPMS_PEGA vdbVersion=1 finalRowCount=null
2014-10-09 20:49:53,226 DEBUG [org.teiid.COMMAND_LOG] (Worker3_QueryProcessorQueue27:) START DATA SRC COMMAND: startTime=2014-10-09 20:49:53.226 requestID=NDzYWRzbpTKk.9 sourceCommandID=0 txID=null modelName=K2_SPEAKERPOOL translatorName=sqlserver sessionID=NDzYWRzbpTKk principal=teiid@teiid-security sql=SELECT g_0.SpeakerCategory AS c_0, g_0.SpeakerName AS c_1, g_0.CRMCode AS c_2, g_0.SpeakerIDCard AS c_3, g_0.HospitalName AS c_4, g_0.Level AS c_5, g_0.VendorCode AS c_6, g_0.BankName AS c_7, g_0.BankAccount AS c_8, g_0.City AS c_9 FROM K2_SPEAKERPOOL.V_SF_EMS_SpeakerPool AS g_0 WHERE g_0.SpeakerName = '顾康生' LIMIT 100
2014-10-09 20:49:53,495 DEBUG [org.teiid.COMMAND_LOG] (Worker3_QueryProcessorQueue29:) END SRC COMMAND: endTime=2014-10-09 20:49:53.494 requestID=NDzYWRzbpTKk.9 sourceCommandID=0 txID=null modelName=K2_SPEAKERPOOL translatorName=sqlserver sessionID=NDzYWRzbpTKk principal=teiid@teiid-security finalRowCount=0
2014-10-09 20:49:53,863 DEBUG [org.teiid.COMMAND_LOG] (Worker3_QueryProcessorQueue30:) END USER COMMAND: endTime=2014-10-09 20:49:53.863 requestID=NDzYWRzbpTKk.9 txID=null sessionID=NDzYWRzbpTKk principal=teiid@teiid-security vdbName=BPMS_PEGA vdbVersion=1 finalRowCount=0
Environment
- Red Hat Enterprise Data Services (EDS) 5.3.1
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.