[ 
https://issues.apache.org/jira/browse/TRAFODION-305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14708677#comment-14708677
 ] 

Atanu Mishra commented on TRAFODION-305:
----------------------------------------

James Capps (james-capps) wrote on 2015-02-10:  #3
During PCODE generation, we were attempting to generate a PCODE instruction to 
compare two operands for equality. The two operands had a data type of 
REC_BYTE_V_ASCII_LONG which is used only by ODBC. 
PCIT::getMemoryAddressingMode() does not currently know how to handle that 
datatype so it returned AM_NONE for the operand type. That resulted in a 
failure later.

Fix was to detect the operand(s) of that datatype and call
ex_clause::pCodeGenerate(...) rather than doing PCODE generation of the current 
expression.

Note: Also found a line saying
      return ex_clause::pCodeGenerate(space, f);
      which has been missing for a long time. We got away with it
      because the preceding 'if' was always false for Trafodion.

Files changed:
.../exp/ExpPCodeClauseGen.cpp

Changed in trafodion:
status: In Progress → Fix Committed
Aruna Sadashiva (aruna-sadashiva) wrote on 2015-02-23:  #4
Jieping tseted this and it works ok now.

Changed in trafodion:
status: Fix Committed → Fix Released


> LP Bug: 1323865 - Some ODBC api tests fail with sql error Unknown PCode 
> instruction
> -----------------------------------------------------------------------------------
>
>                 Key: TRAFODION-305
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-305
>             Project: Apache Trafodion
>          Issue Type: Bug
>          Components: sql-exe
>            Reporter: Aruna Sadashiva
>            Assignee: Apache Trafodion
>            Priority: Critical
>             Fix For: 1.1 (pre-incubation)
>
>
> Some ODBC API tests fail with this error:
> [Trafodion ODBC Driver][Trafodion Database] SQL ERROR:*** ERROR[2006] 
> Internal error: assertion failure (Unknown PCode Instruction) in file 
> ../exp/ExpPCode.cpp at line 1199.
> It worked when pcode was turned off with "cqd pcode_opt_level 'OFF'".
> Relevant SQL stmts used by this test are below, it fails during prepare of 
> insert stmt. 
> drop table UJZ6R0EHYY;
> create table UJZ6R0EHYY(RLUJZ6R0EH CHAR(10) CHARACTER SET ISO88591,WP4VDZAWNV 
> VARCHAR(10) CHARACTER SET ISO88591,VT2DEURLUJ DECIMAL(10,5),Z6R0EHYYFC 
> NUMERIC(10,5),TCBMMOHJ7F SMALLINT,LPIOBAI9_S INTEGER,NQ3KXGK5QS 
> REAL,X1GWP4VDZA FLOAT,WNVT2DEURL DOUBLE PRECISION,YYFCTCBMMO DATE,HJ7FLPIOBA 
> TIME,I9_S8NQ3KX TIMESTAMP,GK5QSX1GWP bigint,VDZAWNVT2D LONG VARCHAR CHARACTER 
> SET ISO88591,EURLUJZ6R0 CHAR(10) CHARACTER SET UCS2,EHYYFCTCBM VARCHAR(10) 
> CHARACTER SET UCS2,MOHJ7FLPIO LONG VARCHAR CHARACTER SET UCS2,BAI9_S8NQ3 
> NUMERIC(19,0),KXGK5QSX1G NUMERIC(19,6),T2DEURLUJZ NUMERIC(128,0),R0EHYYFCTC 
> NUMERIC(128,128),BMMOHJ7FLP NUMERIC(128,64),IOBAI9_S8N NUMERIC(10,5) 
> UNSIGNED,Q3KXGK5QSX NUMERIC(18,5) UNSIGNED,GWP4VDZAWN NUMERIC(30,10) 
> UNSIGNED) NO PARTITION;
> insert into UJZ6R0EHYY 
> (RLUJZ6R0EH,WP4VDZAWNV,VT2DEURLUJ,Z6R0EHYYFC,TCBMMOHJ7F,LPIOBAI9_S,NQ3KXGK5QS,X1GWP4VDZA,WNVT2DEURL,YYFCTCBMMO,HJ7FLPIOBA,I9_S8NQ3KX,GK5QSX1GWP,VDZAWNVT2D,EURLUJZ6R0,EHYYFCTCBM,MOHJ7FLPIO,BAI9_S8NQ3,KXGK5QSX1G,T2DEURLUJZ,R0EHYYFCTC,BMMOHJ7FLP,IOBAI9_S8N,Q3KXGK5QSX,GWP4VDZAWN)
>  values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?);
> Assigned to LaunchPad User James Capps



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to