VARCHAR_NO_TRAILING_BLANKS 'Y' in server definition is ignored
REATE SERVER webhttpdr01
TYPE JDBC
VERSION '1.0'
WRAPPER "JDBC"
OPTIONS
(
,DB2_MAXIMAL_PUSHDOWN 'Y'
,DRIVER_CLASS 'org.mariadb.jdbc.Driver'
,DRIVER_PACKAGE '/home/db2inst2/config/jdbc/mariadb-java-client-2.6.1.jar'
,JDBC_LOG 'Y'
,PUSHDOWN 'Y'
,URL 'jdbc:mariadb://XXXXXXXX:3306/r_espaceclient01'
,VARCHAR_NO_TRAILING_BLANKS 'Y'
);
CREATE USER MAPPING FOR db2inst2 SERVER webhttpdr01 OPTIONS (REMOTE_AUTHID 'XXXXX' ,REMOTE_PASSWORD 'XXXX');
create nickname webhttpdr01_r_espaceclient01.tb_demande for webhttpdr01."tb_demande";
select count(*) from webhttpdr01_r_espaceclient01.tb_demande where col1='testval1'
DB2 push to mariadb select ..... where trim (col1) = 'testval'
to work we need to add VARCHAR_NO_TRAILING_BLANKS on eatch column of the nickname
alter nickname WEBHTTPDR01_R_ESPACECLIENT01.TB_DEMANDE alter column "col1" OPTIONS (ADD VARCHAR_NO_TRAILING_BLANKS 'Y');
------------------------------
malek shabou
------------------------------
#Db2#Db2EarlyAccessProgram(EAP)Forum