[ https://issues.apache.org/jira/browse/TRAFODION-152?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Atanu Mishra closed TRAFODION-152. ---------------------------------- Resolution: Fixed Assignee: (was: Anoop Sharma) Fix Version/s: 1.0 (pre-incubation) > LP Bug: 1251079 - SELECT ... UPDATE crashes sqlci with a core file > ------------------------------------------------------------------ > > Key: TRAFODION-152 > URL: https://issues.apache.org/jira/browse/TRAFODION-152 > Project: Apache Trafodion > Issue Type: Bug > Components: sql-general > Reporter: Weishiun Tsai > Priority: Critical > Fix For: 1.0 (pre-incubation) > > > The following sequence of statements crashes sqlci. The last SELECT … UPDATE > statement returns a bunch of warnings before the executor asserts with a core > file, as shown in the following example: > >>set schema seabase.mytest; > --- SQL operation complete. > >>create table t (a int, b char(9), c int); > --- SQL operation complete. > >>create index t_idx on t(a, b); > --- SQL operation complete. > >>insert into t values (3, 'a', 2), (1, 'b', 3), (4, 'c', 1), (2, 'd', 4), > >>(2, ' > b', 5), (2, 'c', 3), (1, 'c', 2), (1, 'a', 4); > --- 8 row(s) inserted. > >>select * from (update t set c = 100 where a < 3) as x order by x.a; > *** WARNING[8402] A string overflow occurred during the evaluation of a > characte > r expression. > A B C > ----------- --------- ----------- > 1 a 100 > *** WARNING[8402] A string overflow occurred during the evaluation of a > characte > r expression. > 1 b 100 > *** WARNING[8402] A string overflow occurred during the evaluation of a > characte > r expression. > 1 c 100 > *** EXECUTOR ASSERTION FAILURE > *** Time: Thu Nov 14 00:17:56 2013 > *** Process: 10091 > *** File: ../executor/ex_queue.h > *** Line: 940 > *** Message: ex_queue::getHeadEntry() get head on an empty queue > Aborted (core dumped) > The sqlci core file has a stack like this: > (gdb) bt > #0 0x00007ffff51778a5 in raise () from /lib64/libc.so.6 > #1 0x00007ffff5179085 in abort () from /lib64/libc.so.6 > #2 0x00007ffff47e9be6 in assert_botch_abend ( > f=0x7ffff3c0c474 "../executor/ex_queue.h", l=940, > m=0x7ffff3c0c440 "ex_queue::getHeadEntry() get head on an empty queue", > c=0x0) at ../export/NAAbort.cpp:243 > #3 0x00007ffff3a07897 in ex_queue::getHeadEntry (this=0x7fffe4d78af8) > at ../executor/ex_queue.h:939 > #4 0x00007ffff3a53c5f in ExOnljTcb::work_phase1 (this=0x7fffe4d799e0) > at ../executor/ex_onlj.cpp:431 > #5 0x00007ffff3a57bfe in ExOnljTcb::sWorkPhase1 (tcb=0x7fffe4d799e0) > at ../executor/ex_onlj.h:174 > #6 0x00007ffff3b7dc1f in ExSubtask::work (this=0x7fffe4d7a028) > at ../executor/ExScheduler.cpp:771 > #7 0x00007ffff3b7cfa0 in ExScheduler::work (this=0x7fffe4d78228, > prevWaitTime=0) at ../executor/ExScheduler.cpp:336 > #8 0x00007ffff3a5e427 in ex_root_tcb::fetch (this=0x7fffe4d7a148, > cliGlobals=0xbf5100, glob=0x7fffe4d9bcb8, output_desc=0x7fffe4d83430, > diagsArea=@0x7fffffff53e8, timeLimit=-1, newOperation=1, > closeCursorOnError=@0x7fffffff53e4) at ../executor/ex_root.cpp:1848 > #9 0x00007ffff4eeca29 in CliStatement::fetch (this=0x7fffe4d85100, > cliGlobals=0xbf5100, output_desc=0x7fffe4d83430, diagsArea=..., > newOperation=1) at ../cli/Statement.cpp:5275 > #10 0x00007ffff4e94b63 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=0xbf5100, > tasks=4900, statement_id=0x1329fa0, input_descriptor=0x0, > output_descriptor=0x1561bf0, num_input_ptr_pairs=0, > num_output_ptr_pairs=0, ap=0x7fffffff56a0, input_ptr_pairs=0x0, > output_ptr_pairs=0x0) at ../cli/Cli.cpp:3518 > #11 0x00007ffff4e95b2f in SQLCLI_Fetch(CliGlobals *, SQLSTMT_ID *, SQLDESC_ID > *, > Lng32, typedef __va_list_tag __va_list_tag *, SQLCLI_PTR_PAIRS *) ( > cliGlobals=0xbf5100, statement_id=0x1329fa0, output_descriptor=0x1561bf0, > num_ptr_pairs=0, ap=0x7fffffff56a0, ptr_pairs=0x0) at ../cli/Cli.cpp:3956 > #12 0x00007ffff4f005f6 in SQL_EXEC_Fetch (statement_id=0x1329fa0, > output_descriptor=0x1561bf0, num_ptr_pairs=0) at ../cli/CliExtern.cpp:2714 > #13 0x00007ffff799e6d7 in SqlCmd::doFetch (sqlci_env=0xbf3910, > stmt=0x1329fa0, prep_stmt=0x1a064e0, firstFetch=0, handleError=1, > prepcode=0) at ../sqlci/SqlCmd.cpp:1713 > #14 0x00007ffff799f90d in SqlCmd::do_execute (sqlci_env=0xbf3910, > prep_stmt=0x1a064e0, numUnnamedParams=0, unnamedParamArray=0x0, > unnamedParamCharSetArray=0x0, prepcode=0) at ../sqlci/SqlCmd.cpp:2177 > #15 0x00007ffff79a159f in DML::process (this=0x14df1b0, sqlci_env=0xbf3910) > at ../sqlci/SqlCmd.cpp:2794 > #16 0x00007ffff798dcf0 in SqlciEnv::executeCommands (this=0xbf3910, > input_stmt=@0x7fffffff6f68) at ../sqlci/SqlciEnv.cpp:887 > #17 0x00007ffff798d431 in SqlciEnv::run (this=0xbf3910) > at ../sqlci/SqlciEnv.cpp:682 > #18 0x0000000000401ed3 in main (argc=1, argv=0x7fffffff7118) > at ../bin/SqlciMain.cpp:355 > (gdb) -- This message was sent by Atlassian JIRA (v6.3.4#6332)