Update statistics log on cores tdm_arkcmp with a non DB__ROOT user
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Trafodion |
Fix Released
|
High
|
Roberta Marton |
Bug Description
“Update statistics log on” currently cores tdm_arkcmp if it is run by a non DB__ROOT user. This is probably not allowed to begin with, but it shouldn’t core tdm_arkcmp. A proper error message should be returned instead.
This is seen on the v1.1.0rc1 (v0417) build.
-------
Here are the steps to reproduce it:
(1) cd $MY_SQROOT/
(2) trafci.sh -h <machine>:<port> -u <user> -p <password>
(3) execute ‘update statistics log on;’
-------
Here is the execution output:
[trafodion@n001 bin]$ trafci.sh -h localhost:37800 -u <user> -p <password>
Welcome to Trafodion Command Interface
Copyright(C) 2013-2014 Hewlett-Packard Development Company, L.P.
Host Name/IP Address: localhost:37800
User Name: <user>
Connected to Trafodion
SQL>update statistics log on;
*** ERROR[8838] Unable to receive reply from Compiler, possibly caused by internal errors when compiling SQL statements, processing DDL statements, or executing the builtin stored procedures. [2015-04-20 21:19:44]
-------
Here is the stack trace of the core file:
(gdb) bt
#0 0x00007fffee542625 in raise () from /lib64/libc.so.6
#1 0x00007fffee543e05 in abort () from /lib64/libc.so.6
#2 0x00007ffff1252c55 in os::abort(bool) ()
from /usr/java/
#3 0x00007ffff13d4cd7 in VMError:
from /usr/java/
#4 0x00007ffff1257b6f in JVM_handle_
from /usr/java/
#5 <signal handler called>
#6 HSGlobalsClass:
at ../ustat/
#7 0x00007ffff5d12d11 in UpdateStats (input=<optimized out>,
requestedBy
#8 0x00007ffff3eb6804 in CmpStatement:
statement=...) at ../arkcmp/
#9 0x00007ffff3ea002b in ExCmpMessage:
at ../arkcmp/
#10 0x00007ffff6e7b7a6 in IpcMessageStrea
this=
at ../common/
#11 0x00007ffff6e9627b in GuaConnectionTo
buffer=
at ../common/
#12 0x00007ffff6e96f8f in GuaReceiveContr
timeout=-1, eventConsumed=
at ../common/
#13 0x00007ffff6e98332 in GuaConnectionTo
timeout=
at ../common/
#14 0x00007ffff6e8c21a in IpcSetOfConnect
timeout=-1, calledByESP=0, timedout=0x0) at ../common/
#15 0x00007ffff6e8d0ad in IpcMessageStrea
this=
#16 0x00007ffff6e8d402 in IpcMessageStrea
waited=1) at ../common/
#17 0x00000000004064ae in main (argc=2, argv=0x7fffffff
at ../bin/
The code was calling the isAuthorized method expecting a valid table descriptor. There is no need to perform an authorization check for this command so code was changed to not check privileges.