Create table like view cores sqlci at hbaseCreateOptions()
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Trafodion |
Fix Released
|
High
|
Hans Zeller |
Bug Description
A create table … like view … statement currently crashes sqlci and generates a core at hbaseCreateOpti
-------
Here is the entire script to reproduce this problem:
create schema mytest;
set schema mytest;
create table mytab1 (a int);
create view myview1 as select a from mytab1;
create table mytab2 like myview1;
drop schema mytest cascade;
-------
Here is the execution output:
>>create schema mytest;
--- SQL operation complete.
>>set schema mytest;
--- SQL operation complete.
>>
>>create table mytab1 (a int);
--- SQL operation complete.
>>create view myview1 as select a from mytab1;
--- SQL operation complete.
>>create table mytab2 like myview1;
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007fffef
#
# 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 [libsqlcomp.
#
# Core dump written. Default location: /opt/home/
#
# An error report file with more information is saved as:
# /opt/home/
#
# If you would like to submit a bug report, please visit:
# http://
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Aborted (core dumped)
-------
Here is the stack trace of the core
(gdb) bt
#0 0x00007ffff57108a5 in raise () from /lib64/libc.so.6
#1 0x00007ffff571200d in abort () from /lib64/libc.so.6
#2 0x00007ffff6f04a55 in os::abort(bool) ()
from /usr/java/
#3 0x00007ffff7084f87 in VMError:
from /usr/java/
#4 0x00007ffff6f0996f in JVM_handle_
from /usr/java/
#5 <signal handler called>
#6 0x00007fffeff24d85 in hbaseCreateOptions (dtName=..., type=3,
outbuf=
pkeyStr=0x0, withPartns=0, withoutSalt=0, withoutDivision
noTrailingS
#7 hbaseCreateOptions (dtName=..., type=3, outbuf=
outbuflen=
withoutSalt=0, withoutDivision
at ../optimizer/
#8 CmpDescribeSeab
outbuflen=
withoutSalt=0, withoutDivision
at ../sqlcomp/
#9 0x00007fffeffcf5f6 in CmpSeabaseDDL:
this=<value optimized out>, createTableNode
currCatName
at ../sqlcomp/
#10 0x00007fffeffd14e2 in CmpSeabaseDDL:
this=
currSchName
#11 0x00007fffeff7776b in CmpSeabaseDDL:
this=
currCatName
at ../sqlcomp/
#12 0x00007ffff4abc85c in CmpStatement:
statement=
#13 0x00007ffff4ab0546 in CmpContext:
data=
charset=15, op=CmpMessageOb
gen_
at ../arkcmp/
#14 0x00007ffff3e2f056 in ExDDLTcb::work (this=0x7fffe6a
at ../executor/
#15 0x00007ffff3f5d553 in ExScheduler::work (this=0x7fffe6a
prevWaitTim
#16 0x00007ffff3e8b462 in ex_root_
cliGlobals=
diagsArea=
#17 0x00007ffff549c554 in CliStatement:
cliGlobals=
diagsArea=
fixupOnly=0, cliflags=0) at ../cli/
#18 0x00007ffff5444d0a in SQLCLI_
statement_
num_
input_
#19 0x00007ffff5445a32 in SQLCLI_
cliGlobals=
input_
num_
ptr_
#20 0x00007ffff54ab10a in SQL_EXEC_Exec (statement_
input_
#21 0x00007ffff77ae39b in SqlCmd::doExec (sqlci_
prep_
unnamedPara
unnamedPara
at ../sqlci/
#22 0x00007ffff77aed92 in SqlCmd::do_execute (sqlci_
prep_
unnamedPara
#23 0x00007ffff77af4bd in DML::process (this=0x1e2ba30, sqlci_env=0xb7cc30)
at ../sqlci/
#24 0x00007ffff7795ad4 in Obey::process (this=0x1ffb900,
sqlci_
#25 0x00007ffff779bff6 in SqlciEnv:
input_
#26 0x00007ffff779e09b in SqlciEnv::run (this=0xb7cc30)
at ../sqlci/
#27 0x0000000000401ad9 in main (argc=1, argv=0x7fffffff
at ../bin/
The problem is that a view doesn't have a clustering index, and the HBase create options hang off the clustering index. Need to skip the HBase table options case when we are describing a view (describe is internally used by create table like).