Opened 10 years ago
Closed 9 years ago
#902 closed defect (fixed)
Traffic light example query for CASE fails
Reported by: | Dimitar Misev | Owned by: | Bidesh Thapaliya |
---|---|---|---|
Priority: | major | Milestone: | 9.1 |
Component: | qlparser | Version: | development |
Keywords: | Cc: | Peter Baumann, Vlad Merticariu | |
Complexity: | Medium |
Description
This query in the QL guide "9.3.4 Case statement" fails for me with a segfault.
rasql -q 'select case when mr > 150 then {255c, 0c, 0c} when mr > 100 then {0c, 255c, 0c} else {0c, 0c, 255c} end from mr' --out file
The error happens in the range constructor
Program received signal SIGSEGV, Segmentation fault. 0x0000000000556eea in QtRangeConstructor::evaluate (this=0x2770fd0, inputList=<optimized out>) at qtrangeconstructor.cc:142 142 QtDataType operandType = operand->getDataType(); (gdb) bt #0 0x0000000000556eea in QtRangeConstructor::evaluate (this=0x2770fd0, inputList=<optimized out>) at qtrangeconstructor.cc:142 #1 0x0000000000551ceb in QtCaseOp::getCaseOperands (this=this@entry=0x27878c0, inputList=inputList@entry=0x2791fb0, cacheList=cacheList@entry=0x27886d0, scalarCache=scalarCache@entry=0x2b06910, conditionList=conditionList@entry=0x2791df0, resultList=resultList@entry=0x27891b0, defaultResult=@0x7fff796658e8: 0x0) at qtcaseop.cc:126 #2 0x0000000000552104 in QtCaseOp::evaluateInducedOp (this=0x27878c0, inputList=0x2791fb0) at qtcaseop.cc:171 #3 0x00000000005104c3 in QtOperationIterator::next (this=0x27886f0) at qtoperationiterator.cc:230 #4 0x00000000005490eb in QueryTree::evaluateRetrieval (this=this@entry=0x27722b0) at querytree.cc:167 #5 0x00000000004d4598 in ServerComm::executeQuery (this=this@entry=0x2759df0, callingClientId=<optimized out>, query=0x277e394 "select case when mr > 150 then {255c, 0c, 0c} when mr > 100 then {0c, 255c, 0c} else {0c, 0c, 255c} end from mr", returnStructure=...) at servercomm2.cc:1595 #6 0x00000000004cbf1b in RasServerEntry::compat_executeQueryRpc (this=this@entry=0x2759df0, query=<optimized out>, queryResult=...) at rasserver_entry.cc:276 #7 0x00000000004e3ff0 in RnpRasDaManComm::executeQueryRpc (this=this@entry=0x88e6c0 <rnpServerComm>) at ../rnprotocol/rnpservercomm.cc:601 #8 0x00000000004e67b0 in RnpRasDaManComm::decodeFragment (this=0x88e6c0 <rnpServerComm>) at ../rnprotocol/rnpservercomm.cc:284
Note:
See TracTickets
for help on using tickets.