[ https://issues.apache.org/jira/browse/TRAFODION-1979?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sandhya Sundaresan reassigned TRAFODION-1979: --------------------------------------------- Assignee: Sandhya Sundaresan > values clause gives incorrect results or crashes mxosrvr when called on the > LOB type > ------------------------------------------------------------------------------------ > > Key: TRAFODION-1979 > URL: https://issues.apache.org/jira/browse/TRAFODION-1979 > Project: Apache Trafodion > Issue Type: Bug > Components: sql-exe > Affects Versions: 2.1-incubating > Reporter: Sandhya Sundaresan > Assignee: Sandhya Sundaresan > Fix For: 2.1-incubating > > > The following issues were seen : > When using values() to display lob columns, it returns illegible output as > shown in the following execution output. Presumably it’s because the > character set returned by values() has deviated from the original character > set. > This was seen on the EntAdv2.0 v1007 build installed on a workstation. > >>control query default TRAF_BLOB_AS_VARCHAR 'OFF'; > --- SQL operation complete. > >>control query default TRAF_CLOB_AS_VARCHAR 'OFF'; > --- SQL operation complete. > >> > >>create schema mytest16; > --- SQL operation complete. > >>set schema mytest16; > --- SQL operation complete. > >> > >>create table t (c1 blob); > --- SQL operation complete. > >>insert into table t values (stringtolob('column 1')); > --- 1 row(s) inserted. > >> > >>values ((select * from t)); > C1 > -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > !U▒`H(U▒▒E▒`H▒SF▒=▒`H▒"TRAFODION"."MYTEST16" > --- 1 row(s) selected. > >> > >>drop table t; > --- SQL operation complete. > >> > >>drop schema mytest16 cascade; > --- SQL operation complete. > >> > >>exit; > End of MXCI Session > with LOB functions, the problems is a little worse and can crash the process: > >>values (stringtolob('column 1')); > # > # A fatal error has been detected by the Java Runtime Environment: > # > # SIGSEGV (0xb) at pc=0x00007fb2833bfe22, pid=20142, tid=140404765395296 > # > # JRE version: Java(TM) SE Runtime Environment (7.0_67-b01) (build > 1.7.0_67-b01) > # Java VM: Java HotSpot(TM) 64-Bit Server VM (24.65-b04 mixed mode > linux-amd64 compressed oops) > # Problematic frame: > # C [libcommon.so+0xeee22] str_len(char const*)+0x2 > # > # Core dump written. Default location: > /home/trafodion/v0502a/sql/scripts/core or core.20142 > # > # An error report file with more information is saved as: > # /home/trafodion/v0502a/sql/scripts/hs_err_pid20142.log > # > # If you would like to submit a bug report, please visit: > # http://bugreport.sun.com/bugreport/crash.jsp [^] > # The crash happened outside the Java Virtual Machine in native code. > # See problematic frame for where to report the bug. > # > Aborted (core dumped) > (gdb) bt > #0 0x00007fb2851a5625 in raise () from /lib64/libc.so.6 > 0000001 0x00007fb2851a6d8d in abort () from /lib64/libc.so.6 > 0000002 0x00007fb2871d2a55 in os::abort(bool) () > from /usr/java/jdk1.7.0_67-cloudera/jre/lib/amd64/server/libjvm.so > 0000003 0x00007fb287352f87 in VMError::report_and_die() () > from /usr/java/jdk1.7.0_67-cloudera/jre/lib/amd64/server/libjvm.so > 0000004 0x00007fb2871d796f in JVM_handle_linux_signal () > from /usr/java/jdk1.7.0_67-cloudera/jre/lib/amd64/server/libjvm.so > 0000005 <signal handler called> > 0000006 0x00007fb2833bfe22 in str_len (s=0x0) at ../common/str.cpp:457 > 0000007 0x00007fb2833c1803 in str_sprintf ( > buffer=0x7fffe8749280 "lobDescChunksName > \300\252t\350\377\177.\"LOBDescHandle__-", '0' <repeats 18 times>, "1_-001\"", > format=0x7fb284f39d26 "lobDescChunksName %s") at ../common/str.cpp:722 > 0000008 0x00007fb284ecd021 in SQLCLI_LOBcliInterface ( > cliGlobals=<value optimized out>, inLobHandle=0x7fffe874d7b0 "\377\377", > inLobHandleLen=72, blackBox=0x0, blackBoxLen=0x7fffe874d5c8, > outLobHandle=0x7fb2735e9380 "", outLobHandleLen=0x7fb2735e9780, > qType=LOB_CLI_INSERT, qPhase=LOB_CLI_ExecImmed, dataOffset=0x7fffe874bea8, > dataLen=0x7fffe874d580, inoutDescPartnKey=0x7fffe874bea0, > inoutDescSyskey=0x7fffe874be98, inCliInterface=0x0, xnId=0, lobTrace=0) > at ../cli/Cli.cpp:9473 > 0000009 0x00007fb284f33448 in SQL_EXEC_LOBcliInterface ( > inLobHandle=0x7fffe874d7b0 "\377\377", inLobHandleLen=72, blackBox=0x0, > blackBoxLen=0x7fffe874d5c8, outLobHandle=0x7fb2735e9380 "", > outLobHandleLen=0x7fb2735e9780, qType=LOB_CLI_INSERT, > qPhase=LOB_CLI_ExecImmed, dataOffset=0x7fffe874bea8, > dataLen=0x7fffe874d580, outDescPartnKey=0x7fffe874bea0, > outDescSyskey=0x7fffe874be98, inCliInterface=0x0, xnId=0, lobTrace=0) > at ../cli/CliExtern.cpp:7364 > 0000010 0x00007fb281e03519 in ExLob::writeDesc (this=0x2ea4b30, > sourceLen=@0x7fffe874d580, source=0x7fffe874bea8 "", > subOper=<value optimized out>, descNumOut=@0x7fffe874d620, > operLen=@0x7fffe874d630, lobMaxSize=1895825408, > lobMaxChunkMemSize=536870912, lobGCLimit=953032704, > handleIn=0x7fffe874d7b0 "\377\377", handleInLen=72, > blackBox=0x7fb2735e9784 "", blackBoxLen=0x7fffe874d5c8, > handleOut=0x7fb2735e9380 "", handleOutLen=@0x7fb2735e9780, > lobGlobals=0x4bca5c0) at ../exp/ExpLOBaccess.cpp:700 > 0000011 0x00007fb281e07f3f in ExLobsOper ( > lobName=0x7fffe874dbb0 "LOBP_-", '0' <repeats 18 times>, "1_-001", > handleIn=0x7fffe874d7b0 "\377\377", handleInLen=72, > hdfsServer=0x7fb2735e9f90 "default", hdfsPort=0, > handleOut=0x7fb2735e9380 "", handleOutLen=@0x7fb2735e9780, descNumIn=0, > descNumOut=@0x7fffe874d620, retOperLen=@0x7fffe874d630, > uncompressedRetOperLen=@0x7fffe874d630, requestTagIn=-1, > requestTagOut=@0x7fb2735e8f78, requestStatus=@0x7fffe874d63c, > cliError=@0x7fffe874d628, dir=0x7fb2735e9b90 "", > storage=Lob_Invalid_Storage, source=0x7fb2735e6c40 "", sourceLen=8, > cursorBytes=0, cursorId=0x0, operation=Lob_InsertDesc, > subOperation=Lob_Memory, waited=1, globPtr=@0x7fffe874d618, transId=0, > blackBox=0x7fb2735e9784, blackBoxLen=0, compressionWA=0x0, > lobMaxSize=1895825408, lobMaxChunkMemSize=536870912, lobGCLimit=953032704, > bufferSize=0, replication=0, blockSize=0, openType=0) > at ../exp/ExpLOBaccess.cpp:2156 > 0000012 0x00007fb281e0a7e2 in ExpLOBInterfaceInsert (lobGlob=0x4bca5c0, > tgtLobName=<value optimized out>, > lobStorageLocation=<value optimized out>, lobType=<value optimized out>, > lobHdfsServer=<value optimized out>, lobHdfsPort=<value optimized out>, > handleLen=72, lobHandle=0x7fffe874d7b0 "\377\377", > outHandleLen=0x7fb2735e9780, outLobHandle=0x7fb2735e9380 "", > blackBoxLen=0, blackBox=0x7fb2735e9784 "", requestTag=@0x7fb2735e8f78, > xnId=-1, descSyskey=@0x7fffe874dc18, lo=Lob_InsertDesc, > cliError=0x7fffe874dc28, so=Lob_Memory, waitedOp=1, > srcLobData=0x7fb2735e6c40 "", srcLobLen=8, lobMaxSize=1895825408, > lobMaxChunkMemSize=536870912, lobGCLimit=953032704, bufferSize=0, > replication=0, blockSize=0) at ../exp/ExpLOBinterface.cpp:455 > 0000013 0x00007fb281dfd554 in ExpLOBiud::insertDesc (this=0x7fb2735e8f10, > op_data=0x7fffe874e920, h=0x7fb2735bbbf0, diagsArea=0x7fffe874ea60) > at ../exp/ExpLOB.cpp:818 > 0000014 0x00007fb281dfe1ad in ExpLOBinsert::eval (this=0x7fb2735e8f10, > op_data=0x7fffe874e920, h=0x7fb2735bbbf0, diagsArea=0x7fffe874ea60) > at ../exp/ExpLOB.cpp:1013 > 0000015 0x00007fb281dc89be in alignAndEval (this=<value optimized out>, > pCode32=<value optimized out>, atp1=0x7fb2735cf5e8, atp2=0x0, rowLen=0x0) > at ../exp/exp_eval.cpp:923 > 0000016 ex_expr::evalPCode (this=<value optimized out>, > pCode32=<value optimized out>, atp1=0x7fb2735cf5e8, atp2=0x0, rowLen=0x0) > at ../exp/exp_eval.cpp:2508 > 0000017 0x00007fb283875351 in eval (this=0x7fb2735cf770, > cliGlobals=<value optimized out>, glob=0x7fb2735e6098, output_desc= > 0x7fb2735ef390, diagsArea=@0x7fffe874ed30, timeLimit=-1, newOperation=1, > closeCursorOnError=@0x7fffe874ed3c) at ../exp/exp_expr.h:373 > 0000018 ex_root_tcb::fetch (this=0x7fb2735cf770, cliGlobals=<value optimized > out>, > glob=0x7fb2735e6098, output_desc=0x7fb2735ef390, > diagsArea=@0x7fffe874ed30, timeLimit=-1, newOperation=1, > closeCursorOnError=@0x7fffe874ed3c) at ../executor/ex_root.cpp:1477 > 0000019 0x00007fb284f2a2b8 in CliStatement::fetch (this=0x7fb2735bbb30, > cliGlobals=0x224eb10, output_desc=0x7fb2735ef390, diagsArea=..., > newOperation=1) at ../cli/Statement.cpp:4740 > 0000020 0x00007fb284ec5c0f in SQLCLI_PerformTasks(CliGlobals *, ULng32, > SQLSTMT_ID *, SQLDESC_ID *, SQLDESC_ID *, Lng32, Lng32, typedef __va_list_tag > __va_list_tag *, SQLCLI_PTR_PAIRS *, SQLCLI_PTR_PAIRS *) > (cliGlobals=0x224eb10, tasks=4900, > statement_id=0x4c76470, input_descriptor=0x0, output_descriptor=0x4bc2d00, > num_input_ptr_pairs=1935602576, num_output_ptr_pairs=0, ap=0x7fffe874eed0, > input_ptr_pairs=0x0, output_ptr_pairs=0x0) at ../cli/Cli.cpp:3398 > 0000021 0x00007fb284ec663d in SQLCLI_Fetch(CliGlobals *, SQLSTMT_ID *, > SQLDESC_ID *, Lng32, typedef __va_list_tag __va_list_tag *, SQLCLI_PTR_PAIRS > *) ( > cliGlobals=<value optimized out>, statement_id=<value optimized out>, > output_descriptor=<value optimized out>, > num_ptr_pairs=<value optimized out>, ap=<value optimized out>, > ptr_pairs=<value optimized out>) at ../cli/Cli.cpp:3836 > 0000022 0x00007fb284f363da in SQL_EXEC_Fetch (statement_id=0x4c76470, > output_descriptor=0x4bc2d00, num_ptr_pairs=0) at ../cli/CliExtern.cpp:2739 > 0000023 0x00007fb287a7b562 in SqlCmd::doFetch (sqlci_env=0x22375f0, > stmt=<value optimized out>, prep_stmt=<value optimized out>, > firstFetch=<value optimized out>, handleError=1, prepcode=0) > at ../sqlci/SqlCmd.cpp:1840 > 0000024 0x00007fb287a7fc02 in SqlCmd::do_execute (sqlci_env=0x22375f0, > prep_stmt=0x2344bf0, numUnnamedParams=0, unnamedParamArray=0x0, > unnamedParamCharSetArray=<value optimized out>, prepcode=0) > at ../sqlci/SqlCmd.cpp:2168 > 0000025 0x00007fb287a80afd in DML::process (this=0x35f9060, > sqlci_env=0x22375f0) > at ../sqlci/SqlCmd.cpp:2930 > 0000026 0x00007fb287a6cec6 in SqlciEnv::executeCommands (this=0x22375f0, > input_stmt=@0x7fffe8750758) at ../sqlci/SqlciEnv.cpp:861 > 0000027 0x00007fb287a6f10b in SqlciEnv::run (this=0x22375f0) > at ../sqlci/SqlciEnv.cpp:670 > 0000028 0x0000000000401ae9 in main (argc=1, argv=0x7fffe8750928) > at ../bin/SqlciMain.cpp:331 -- This message was sent by Atlassian JIRA (v6.3.4#6332)