php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #71600 oci_fetch_all results in segfault on apache 2.4
Submitted: 2016-02-15 15:54 UTC Modified: 2016-04-14 04:16 UTC
Votes:6
Avg. Score:4.2 ± 0.9
Reproduced:5 of 5 (100.0%)
Same Version:5 (100.0%)
Same OS:2 (40.0%)
From: nick dot saraniti at gmail dot com Assigned: sixd (profile)
Status: Closed Package: OCI8 related
PHP Version: 7.0.3 OS: CentOS 7.2.1511
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: nick dot saraniti at gmail dot com
New email:
PHP Version: OS:

 

 [2016-02-15 15:54 UTC] nick dot saraniti at gmail dot com
Description:
------------
In some cases oci_fetch_all causes apache 2.4/centos7 to segfault.  Happens consistently on some pages, never on others calling same function.  Possible something related to the SQL queries?

Actual result:
--------------
Program received signal SIGSEGV, Segmentation fault.
0x00007fffea529df5 in _zend_hash_index_update () from /etc/httpd/modules/libphp7.so
(gdb) bt
#0  0x00007fffea529df5 in _zend_hash_index_update () from /etc/httpd/modules/libphp7.so
#1  0x00007fffddd3c785 in zif_oci_fetch_all (execute_data=<optimized out>, return_value=0x7fffe8218500) at /var/tmp/oci8/oci8_interface.c:1495
#2  0x00007fffea50b35b in dtrace_execute_internal () from /etc/httpd/modules/libphp7.so
#3  0x00007fffea596db3 in ?? () from /etc/httpd/modules/libphp7.so
#4  0x00007fffea558fcb in execute_ex () from /etc/httpd/modules/libphp7.so
#5  0x00007fffea50b239 in dtrace_execute_ex () from /etc/httpd/modules/libphp7.so
#6  0x00007fffea596a90 in ?? () from /etc/httpd/modules/libphp7.so
#7  0x00007fffea558fcb in execute_ex () from /etc/httpd/modules/libphp7.so
#8  0x00007fffea50b239 in dtrace_execute_ex () from /etc/httpd/modules/libphp7.so
#9  0x00007fffea5a0378 in ?? () from /etc/httpd/modules/libphp7.so
#10 0x00007fffea558fcb in execute_ex () from /etc/httpd/modules/libphp7.so
#11 0x00007fffea50b239 in dtrace_execute_ex () from /etc/httpd/modules/libphp7.so
#12 0x00007fffea5a0378 in ?? () from /etc/httpd/modules/libphp7.so
#13 0x00007fffea558fcb in execute_ex () from /etc/httpd/modules/libphp7.so
#14 0x00007fffea50b239 in dtrace_execute_ex () from /etc/httpd/modules/libphp7.so
#15 0x00007fffea5a2cef in zend_execute () from /etc/httpd/modules/libphp7.so
#16 0x00007fffea51af63 in zend_execute_scripts () from /etc/httpd/modules/libphp7.so
#17 0x00007fffea4bc3a8 in php_execute_script () from /etc/httpd/modules/libphp7.so
#18 0x00007fffea5a46ad in ?? () from /etc/httpd/modules/libphp7.so
#19 0x0000555555593270 in ap_run_handler ()
#20 0x00005555555937b9 in ap_invoke_handler ()
#21 0x00005555555a7b3a in ap_process_async_request ()
#22 0x00005555555a7e14 in ap_process_request ()
#23 0x00005555555a47a2 in ?? ()
#24 0x000055555559c840 in ap_run_process_connection ()
#25 0x00007fffeda1980f in ?? () from /etc/httpd/modules/mod_mpm_prefork.so
#26 0x00007fffeda19a0c in ?? () from /etc/httpd/modules/mod_mpm_prefork.so
#27 0x00007fffeda1a791 in ?? () from /etc/httpd/modules/mod_mpm_prefork.so
#28 0x00005555555795ae in ap_run_mpm ()
#29 0x0000555555572b36 in main ()

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-02-15 16:07 UTC] nick dot saraniti at gmail dot com
-Summary: oci_fetch_all segfaults apache 2.4 +Summary: calling multiple oci_free_statement results in segfault (11) -Package: OCI8 related +Package: Oracle related -Operating System: CentOS 7.2.1511 +Operating System: Centos 6.7 -PHP Version: 7.0.3 +PHP Version: 7.0.0RC5
 [2016-02-15 16:07 UTC] nick dot saraniti at gmail dot com
Sample Code
$SQL="SELECT a.COST_ID, ".
"TO_CHAR(a.CHANGE_DATE, 'MM/DD/YYYY') AS ENTERED_HUMAN, ".
"b.NAME AS DRUG_NAME, ".
"a.PRICE_WAC, a.PRICE_ACQ, a.OLD_WAC, a.OLD_ACQ, a.PRICE_AWP, a.OLD_AWP, ".
"CASE " . 
"WHEN (b.drugndctype = 48 ) THEN b.DRUGNDCNBR  " . 
"WHEN (b.drugndctype = 57 ) THEN b.DRUGNDCNBR  " . 
"WHEN (b.drugndctype = 53 ) THEN b.DRUGNDCNBR  " . 
"WHEN (b.drugndctype = 51 ) THEN SUBSTR(b.DRUGNDCNBR, 1, 5)||LPAD(SUBSTR(b.DRUGNDCNBR, 6, 3), 4, '0')||SUBSTR(b.DRUGNDCNBR, -2, 2) " . 
"WHEN (b.drugndctype = 52 ) THEN SUBSTR(b.DRUGNDCNBR, 0, 9)||LPAD(SUBSTR(b.DRUGNDCNBR, -1, 1), 2, '0')  " . 
"WHEN (b.drugndctype = 54 ) THEN b.DRUGNDCNBR  " . 
"WHEN (b.drugndctype = 55 ) THEN b.DRUGNDCNBR  " . 
"WHEN (b.drugndctype = 49 ) THEN b.DRUGNDCNBR  " . 
"WHEN (b.drugndctype = 56 ) THEN LPAD(b.DRUGNDCNBR, 11, '0')  " . 
"WHEN (b.drugndctype = 50 ) THEN LPAD(b.DRUGNDCNBR, 11, '0')  " . 
"END AS NDC, " . 
"a.CHANGE_REASON ".
"FROM HDS_STATS_COST a ".
"LEFT OUTER JOIN DRUG b on (a.DRUGSTORE=b.DRUGNBRSTOREID AND a.DRUGKEY = b.DRUGNBRKEY) ".
"WHERE a.REVIEW_DATE is null ".
"ORDER BY a.CHANGE_DATE DESC";
$stmt = oci_parse($GLOBALS['dbConx'], $SQL);
oci_execute($stmt, OCI_DEFAULT);
oci_fetch_all($stmt, $result);
return ($result);
oci_free_statement($stmt);
 [2016-02-15 19:03 UTC] nick dot saraniti at gmail dot com
-Summary: calling multiple oci_free_statement results in segfault (11) +Summary: oci_get_all results in segfault on apache 2.4 -Operating System: Centos 6.7 +Operating System: CentOS 7.2.1511 -PHP Version: 7.0.0RC5 +PHP Version: 7.0.3
 [2016-02-15 19:03 UTC] nick dot saraniti at gmail dot com
Reproduced on Centos 7/ PHP 7 / Apache 2.4
 [2016-02-17 02:03 UTC] nick dot saraniti at gmail dot com
Some more info, 
Oracle Database 11g Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
"CORE	11.2.0.1.0	Production"
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production

Used rpm to install instaclient's, PECL for oci8

[New Thread 0x7ffff7f396c0 (LWP 7676)]

Program received signal SIGSEGV, Segmentation fault.
0x00007fffea529df5 in _zend_hash_index_update ()
   from /etc/httpd/modules/libphp7.so
(gdb)
(gdb) bt
#0  0x00007fffea529df5 in _zend_hash_index_update ()
   from /etc/httpd/modules/libphp7.so
#1  0x00007fffddd3c395 in zif_oci_fetch_all (execute_data=<optimized out>,
    return_value=0x7fffe8217500) at /var/tmp/oci8/oci8_interface.c:1495
#2  0x00007fffea50b35b in dtrace_execute_internal ()
   from /etc/httpd/modules/libphp7.so
#3  0x00007fffea596db3 in ?? () from /etc/httpd/modules/libphp7.so
#4  0x00007fffea558fcb in execute_ex () from /etc/httpd/modules/libphp7.so
#5  0x00007fffea50b239 in dtrace_execute_ex ()
   from /etc/httpd/modules/libphp7.so
#6  0x00007fffea596a90 in ?? () from /etc/httpd/modules/libphp7.so
#7  0x00007fffea558fcb in execute_ex () from /etc/httpd/modules/libphp7.so
#8  0x00007fffea50b239 in dtrace_execute_ex ()
   from /etc/httpd/modules/libphp7.so
#9  0x00007fffea5a0378 in ?? () from /etc/httpd/modules/libphp7.so
#10 0x00007fffea558fcb in execute_ex () from /etc/httpd/modules/libphp7.so
#11 0x00007fffea50b239 in dtrace_execute_ex ()
   from /etc/httpd/modules/libphp7.so
#12 0x00007fffea5a0378 in ?? () from /etc/httpd/modules/libphp7.so
#13 0x00007fffea558fcb in execute_ex () from /etc/httpd/modules/libphp7.so
#14 0x00007fffea50b239 in dtrace_execute_ex ()
   from /etc/httpd/modules/libphp7.so
#15 0x00007fffea5a2cef in zend_execute () from /etc/httpd/modules/libphp7.so
#16 0x00007fffea51af63 in zend_execute_scripts ()
  from /etc/httpd/modules/libphp7.so
#17 0x00007fffea4bc3a8 in php_execute_script ()
   from /etc/httpd/modules/libphp7.so
#18 0x00007fffea5a46ad in ?? () from /etc/httpd/modules/libphp7.so
#19 0x0000555555593270 in ap_run_handler ()
#20 0x00005555555937b9 in ap_invoke_handler ()
#21 0x00005555555a7b3a in ap_process_async_request ()
#22 0x00005555555a7e14 in ap_process_request ()
#23 0x00005555555a47a2 in ?? ()
#24 0x000055555559c840 in ap_run_process_connection ()
#25 0x00007fffeda1980f in ?? () from /etc/httpd/modules/mod_mpm_prefork.so
#26 0x00007fffeda19a0c in ?? () from /etc/httpd/modules/mod_mpm_prefork.so
#27 0x00007fffeda1a791 in ?? () from /etc/httpd/modules/mod_mpm_prefork.so
#28 0x00005555555795ae in ap_run_mpm ()
#29 0x0000555555572b36 in main ()
 [2016-02-22 07:33 UTC] camporter1 at gmail dot com
The issue seems to be that when more than one row is in the result, the first row writes over outarrs[i]->value when zend_hash_index_update is called. The address of the first bucket's key is the same as outarrs[i]. I haven't figured out why. The key gets set to NULL, which erases the value in outarrs[i], which causes the segfault.
 [2016-02-22 14:58 UTC] nick dot saraniti at gmail dot com
camporter1 thanks for confirming, For me at least this only happens about 40% of the time when returning multi-row sets from oracle.  I'm trying to find some commonality on the queries which fail, possibly with returned NULL values from oracle?
 [2016-03-08 00:21 UTC] bigmage at web dot de
maybe you should change the topic to: oci_fetch_all
 [2016-03-08 00:45 UTC] sixd@php.net
-Summary: oci_get_all results in segfault on apache 2.4 +Summary: oci_fetch_all results in segfault on apache 2.4 -Status: Open +Status: Feedback -Package: Oracle related +Package: OCI8 related
 [2016-03-08 00:45 UTC] sixd@php.net
Please post the DDL to create the table used in your testcase.  Thanks
 [2016-03-08 01:02 UTC] nick dot saraniti at gmail dot com
--------------------------------------------------------
--  File created - Monday-March-07-2016   
--------------------------------------------------------
-- Unable to render TABLE DDL for object CSA.DRUG with DBMS_METADATA attempting internal generator.
CREATE TABLE CSA.DRUG 
(
  DELETEDFLAG NUMBER 
, LASTACCESS NUMBER 
, DRUGNBRSTOREID NUMBER 
, DRUGNBRKEY NUMBER 
, DRUGNDCTYPE NUMBER 
, DRUGNDCNBR VARCHAR2(15 BYTE) 
, ALTTYPE NUMBER 
, ALTNBR VARCHAR2(15 BYTE) 
, NAME VARCHAR2(28 BYTE) 
, GENERICCODE NUMBER 
, THERAPYCODE NUMBER 
, TAXABLE NUMBER 
, FORM VARCHAR2(5 BYTE) 
, STRENGTH VARCHAR2(12 BYTE) 
, COLOR VARCHAR2(16 BYTE) 
, SHAPE VARCHAR2(16 BYTE) 
, PIXLINKSTOREID NUMBER 
, PIXLINKKEY NUMBER 
, DRUGTYPE NUMBER 
, DEACLASS NUMBER 
, CATEGORY NUMBER 
, OBSOLETEFLAG NUMBER 
, AWP NUMBER(14, 6) 
, MAC NUMBER(14, 6) 
, REORDERPOINT NUMBER 
, REORDERQTY NUMBER 
, PACKAGESIZE NUMBER(14, 6) 
, LASTUPDATE NUMBER 
, PACKAGER VARCHAR2(13 BYTE) 
, COUNSEL01 NUMBER 
, COUNSEL02 NUMBER 
, COUNSEL03 NUMBER 
, COUNSEL04 NUMBER 
, COUNSEL05 NUMBER 
, COUNSEL06 NUMBER 
, COUNSEL07 NUMBER 
, COUNSEL08 NUMBER 
, USERCOUNSELLINK NUMBER 
, ZONE NUMBER 
, FACTORTYPE NUMBER 
, FACTOR01 NUMBER 
, FACTOR02 NUMBER 
, FACTOR03 NUMBER 
, FACTOR04 NUMBER 
, MOVEMENTYEAR01 NUMBER 
, MOVEMENTYEAR02 NUMBER 
, MOVEMENTYEAR03 NUMBER 
, MOVEMENTYEAR04 NUMBER 
, MOVEMENTYEAR05 NUMBER 
, MOVEMENTYEAR06 NUMBER 
, MOVEMENTYEAR07 NUMBER 
, MOVEMENTYEAR08 NUMBER 
, MOVEMENTYEAR09 NUMBER 
, MOVEMENTYEAR10 NUMBER 
, MOVEMENTYEAR11 NUMBER 
, MOVEMENTYEAR12 NUMBER 
, MOVEMENTYEAR13 NUMBER 
, MOVEMENTYEAR14 NUMBER 
, MOVEMENTYEAR15 NUMBER 
, MOVEMENTYEAR16 NUMBER 
, MOVEMENTYEAR17 NUMBER 
, MOVEMENTYEAR18 NUMBER 
, MOVEMENTYEAR19 NUMBER 
, MOVEMENTYEAR20 NUMBER 
, MOVEMENTYEAR21 NUMBER 
, MOVEMENTYEAR22 NUMBER 
, MOVEMENTYEAR23 NUMBER 
, MOVEMENTYEAR24 NUMBER 
, MOVEMENT01 NUMBER 
, MOVEMENT02 NUMBER 
, MOVEMENT03 NUMBER 
, MOVEMENT04 NUMBER 
, MOVEMENT05 NUMBER 
, MOVEMENT06 NUMBER 
, MOVEMENT07 NUMBER 
, MOVEMENT08 NUMBER 
, MOVEMENT09 NUMBER 
, MOVEMENT10 NUMBER 
, MOVEMENT11 NUMBER 
, MOVEMENT12 NUMBER 
, MOVEMENT13 NUMBER 
, MOVEMENT14 NUMBER 
, MOVEMENT15 NUMBER 
, MOVEMENT16 NUMBER 
, MOVEMENT17 NUMBER 
, MOVEMENT18 NUMBER 
, MOVEMENT19 NUMBER 
, MOVEMENT20 NUMBER 
, MOVEMENT21 NUMBER 
, MOVEMENT22 NUMBER 
, MOVEMENT23 NUMBER 
, MOVEMENT24 NUMBER 
, INTERACTIONCODE NUMBER 
, UPDTCTL NUMBER 
, PECLINK NUMBER 
, PHARMEX01 NUMBER 
, PHARMEX02 NUMBER 
, PHARMEX03 NUMBER 
, PHARMEX04 NUMBER 
, PHARMEX05 NUMBER 
, PHARMEX06 NUMBER 
, PHARMEX07 NUMBER 
, PHARMEX08 NUMBER 
, PHARMEX09 NUMBER 
, PHARMEX10 NUMBER 
, UNITDOSEAVAIL NUMBER 
, DESI NUMBER 
, RETAILQTY NUMBER 
, RETAILPRICE NUMBER 
, INVDAYSUPPLY NUMBER 
, GENERICDIFF NUMBER 
, CASHSCHSTORE01 NUMBER 
, CASHSCHRECORDTYPE01 NUMBER 
, CASHSCHKEY01 NUMBER 
, CASHSCHSTORE02 NUMBER 
, CASHSCHRECORDTYPE02 NUMBER 
, CASHSCHKEY02 NUMBER 
, CASHSCHSTORE03 NUMBER 
, CASHSCHRECORDTYPE03 NUMBER 
, CASHSCHKEY03 NUMBER 
, DEPT VARCHAR2(5 BYTE) 
, GENERICNAME VARCHAR2(31 BYTE) 
, INGREDDRUGSTOREID01 NUMBER 
, INGREDDRUGKEY01 NUMBER 
, INGREDQTY01 NUMBER(14, 6) 
, INGREDUOM01 NUMBER 
, INGREDPERIOD01 NUMBER 
, INGREDDRUGSTOREID02 NUMBER 
, INGREDDRUGKEY02 NUMBER 
, INGREDQTY02 NUMBER(14, 6) 
, INGREDUOM02 NUMBER 
, INGREDPERIOD02 NUMBER 
, INGREDDRUGSTOREID03 NUMBER 
, INGREDDRUGKEY03 NUMBER 
, INGREDQTY03 NUMBER(14, 6) 
, INGREDUOM03 NUMBER 
, INGREDPERIOD03 NUMBER 
, INGREDDRUGSTOREID04 NUMBER 
, INGREDDRUGKEY04 NUMBER 
, INGREDQTY04 NUMBER(14, 6) 
, INGREDUOM04 NUMBER 
, INGREDPERIOD04 NUMBER 
, INGREDDRUGSTOREID05 NUMBER 
, INGREDDRUGKEY05 NUMBER 
, INGREDQTY05 NUMBER(14, 6) 
, INGREDUOM05 NUMBER 
, INGREDPERIOD05 NUMBER 
, INGREDDRUGSTOREID06 NUMBER 
, INGREDDRUGKEY06 NUMBER 
, INGREDQTY06 NUMBER(14, 6) 
, INGREDUOM06 NUMBER 
, INGREDPERIOD06 NUMBER 
, INGREDDRUGSTOREID07 NUMBER 
, INGREDDRUGKEY07 NUMBER 
, INGREDQTY07 NUMBER(14, 6) 
, INGREDUOM07 NUMBER 
, INGREDPERIOD07 NUMBER 
, INGREDDRUGSTOREID08 NUMBER 
, INGREDDRUGKEY08 NUMBER 
, INGREDQTY08 NUMBER(14, 6) 
, INGREDUOM08 NUMBER 
, INGREDPERIOD08 NUMBER 
, INGREDDRUGSTOREID09 NUMBER 
, INGREDDRUGKEY09 NUMBER 
, INGREDQTY09 NUMBER(14, 6) 
, INGREDUOM09 NUMBER 
, INGREDPERIOD09 NUMBER 
, INGREDDRUGSTOREID10 NUMBER 
, INGREDDRUGKEY10 NUMBER 
, INGREDQTY10 NUMBER(14, 6) 
, INGREDUOM10 NUMBER 
, INGREDPERIOD10 NUMBER 
, INGREDDRUGSTOREID11 NUMBER 
, INGREDDRUGKEY11 NUMBER 
, INGREDQTY11 NUMBER(14, 6) 
, INGREDUOM11 NUMBER 
, INGREDPERIOD11 NUMBER 
, INGREDDRUGSTOREID12 NUMBER 
, INGREDDRUGKEY12 NUMBER 
, INGREDQTY12 NUMBER(14, 6) 
, INGREDUOM12 NUMBER 
, INGREDPERIOD12 NUMBER 
, INGREDDRUGSTOREID13 NUMBER 
, INGREDDRUGKEY13 NUMBER 
, INGREDQTY13 NUMBER(14, 6) 
, INGREDUOM13 NUMBER 
, INGREDPERIOD13 NUMBER 
, INGREDDRUGSTOREID14 NUMBER 
, INGREDDRUGKEY14 NUMBER 
, INGREDQTY14 NUMBER(14, 6) 
, INGREDUOM14 NUMBER 
, INGREDPERIOD14 NUMBER 
, INGREDDRUGSTOREID15 NUMBER 
, INGREDDRUGKEY15 NUMBER 
, INGREDQTY15 NUMBER(14, 6) 
, INGREDUOM15 NUMBER 
, INGREDPERIOD15 NUMBER 
, HICSEQ NUMBER 
, HICCODE01 VARCHAR2(7 BYTE) 
, HICCODE02 VARCHAR2(7 BYTE) 
, HICCODE03 VARCHAR2(7 BYTE) 
, HICCODE04 VARCHAR2(7 BYTE) 
, HICCODE05 VARCHAR2(7 BYTE) 
, HICCODE06 VARCHAR2(7 BYTE) 
, HICCODE07 VARCHAR2(7 BYTE) 
, HICCODE08 VARCHAR2(7 BYTE) 
, HICCODE09 VARCHAR2(7 BYTE) 
, INDICATION01 NUMBER 
, INDICATION02 NUMBER 
, INDICATION03 NUMBER 
, INDICATION04 NUMBER 
, INDICATION05 NUMBER 
, INDICATION06 NUMBER 
, INDICATION07 NUMBER 
, INDICATION08 NUMBER 
, INDICATION09 NUMBER 
, INDICATION10 NUMBER 
, INDICATION11 NUMBER 
, INDICATION12 NUMBER 
, INDICATION13 NUMBER 
, INDICATION14 NUMBER 
, CONTRAIND01 NUMBER 
, CONTRAIND02 NUMBER 
, CONTRAIND03 NUMBER 
, CONTRAIND04 NUMBER 
, CONTRAIND05 NUMBER 
, CONTRAIND06 NUMBER 
, CONTRAIND07 NUMBER 
, CONTRAIND08 NUMBER 
, CONTRAIND09 NUMBER 
, CONTRAIND10 NUMBER 
, CONTRAIND11 NUMBER 
, CONTRAIND12 NUMBER 
, CONTRAIND13 NUMBER 
, CONTRAIND14 NUMBER 
, SIDEEFFECT01 NUMBER 
, SIDEEFFECT02 NUMBER 
, SIDEEFFECT03 NUMBER 
, SIDEEFFECT04 NUMBER 
, SIDEEFFECT05 NUMBER 
, SIDEEFFECT06 NUMBER 
, SIDEEFFECT07 NUMBER 
, SIDEEFFECT08 NUMBER 
, SIDEEFFECT09 NUMBER 
, SIDEEFFECT10 NUMBER 
, SIDEEFFECT11 NUMBER 
, SIDEEFFECT12 NUMBER 
, SIDEEFFECT13 NUMBER 
, SIDEEFFECT14 NUMBER 
, DOSAGELINK NUMBER 
, DRUGFOOD01 NUMBER 
, DRUGFOOD02 NUMBER 
, DRUGFOOD03 NUMBER 
, DRUGFOOD04 NUMBER 
, DRUGFOOD05 NUMBER 
, GERIATRIC01 NUMBER 
, GERIATRIC02 NUMBER 
, GERIATRIC03 NUMBER 
, GERIATRIC04 NUMBER 
, GERIATRIC05 NUMBER 
, GERIATRIC06 NUMBER 
, PEDIATRIC01 NUMBER 
, PEDIATRIC02 NUMBER 
, PEDIATRIC03 NUMBER 
, PEDIATRIC04 NUMBER 
, PEDIATRIC05 NUMBER 
, PEDIATRIC06 NUMBER 
, PREGNANCY01 NUMBER 
, PREGNANCY02 NUMBER 
, PREGNANCY03 NUMBER 
, PREGNANCY04 NUMBER 
, PREGNANCY05 NUMBER 
, PREGNANCY06 NUMBER 
, LACTATION01 NUMBER 
, LACTATION02 NUMBER 
, LACTATION03 NUMBER 
, LACTATION04 NUMBER 
, LACTATION05 NUMBER 
, LACTATION06 NUMBER 
, CASESIZE NUMBER 
, MEMOLINKSTOREID NUMBER 
, MEMOLINKKEY NUMBER 
, NHDRUGCLASS VARCHAR2(4 BYTE) 
, EXPIREDAYS NUMBER 
, REBATE NUMBER 
, UNITOFMEASURE NUMBER 
, VENDORNBRSTOREID NUMBER 
, VENDORNBRKEY NUMBER 
, REORDERCODE VARCHAR2(13 BYTE) 
, ALTVENDORNBRSTOREID NUMBER 
, ALTVENDORNBRKEY NUMBER 
, ALTREORDERCODE VARCHAR2(14 BYTE) 
, SIG01 VARCHAR2(10 BYTE) 
, SIG02 VARCHAR2(10 BYTE) 
, OLDAWP NUMBER(14, 6) 
, OLDMAC NUMBER(14, 6) 
, OLDCOST NUMBER(14, 6) 
, AWPDATE NUMBER 
, MACDATE NUMBER 
, COSTDATE NUMBER 
, TRIPLICATEFLAG NUMBER 
, AWPFACTOR NUMBER 
, NUTRILINK NUMBER 
, ORANGEBOOKCODE VARCHAR2(4 BYTE) 
, IMPRINT01 VARCHAR2(41 BYTE) 
, IMPRINT02 VARCHAR2(41 BYTE) 
, GENBRANDSTOREID NUMBER 
, GENBRANDKEY NUMBER 
, HOTLISTQTY01 NUMBER 
, HOTLISTQTY02 NUMBER 
, HOTLISTQTY03 NUMBER 
, HOTLISTQTY04 NUMBER 
, INACTIVE NUMBER 
, SPARE VARCHAR2(100 BYTE) 
, CREATED NUMBER 
, INSERTEDAT NUMBER 
, UPDATEDAT NUMBER 
, ALIASTYPE NUMBER 
, ALIASNBR VARCHAR2(15 BYTE) 
, FLAGB340 NUMBER 
, BRANDNAME VARCHAR2(28 BYTE) 
, LOADEDAT TIMESTAMP(6) 
, INSERTEDSTOREID NUMBER(6, 0) 
, UPDATEDSTOREID NUMBER(6, 0) 
, FLAG340B NUMBER 
, PKG_DS NUMBER 
, HISTORICAL NUMBER(3, 0) 
, RXNET_SAVE_PSSTORE NUMBER 
, RXNET_SAVE_PSRECORDTYPE NUMBER 
, RXNET_SAVE_PSKEY NUMBER 
, WAC NUMBER(14, 6) 
, OLDWAC NUMBER(14, 6) 
, WACDATE NUMBER 
, PO_GROUP NUMBER 
, FORMULARY NUMBER 
, REFRIGERATE NUMBER 
, DOSAGEFORM VARCHAR2(3 BYTE) 
, ROUTEOFADMIN NUMBER 
, CMPD_TYPE NUMBER 
, LEVEL_OF_EFFORT NUMBER 
, COMPOUND_INSSTOREID NUMBER 
, COMPOUND_INSKEY NUMBER 
, COST_BASIS VARCHAR2(3 BYTE) 
, DRUGPROGS NUMBER 
) 
LOGGING 
TABLESPACE CS 
PCTFREE 10 
INITRANS 1 
STORAGE 
( 
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1 
  MAXEXTENTS UNLIMITED 
  BUFFER_POOL DEFAULT 
) 
NOCOMPRESS 
NOPARALLELCREATE UNIQUE INDEX CSA.DRUG_DRUGNBRSTOREID_DRUGNBRIDX ON CSA.DRUG (DRUGNBRSTOREID ASC, DRUGNBRKEY ASC) 
LOGGING 
TABLESPACE CS 
PCTFREE 10 
INITRANS 2 
STORAGE 
( 
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1 
  MAXEXTENTS UNLIMITED 
  BUFFER_POOL DEFAULT 
) 
NOPARALLEL
CREATE INDEX CSA.DRUG_INGREDDRUG01_IDX ON CSA.DRUG (INGREDDRUGSTOREID01 ASC, INGREDDRUGKEY01 ASC) 
LOGGING 
TABLESPACE CS 
PCTFREE 10 
INITRANS 2 
STORAGE 
( 
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1 
  MAXEXTENTS UNLIMITED 
  BUFFER_POOL DEFAULT 
) 
NOPARALLEL
CREATE INDEX CSA.DRUG_INGREDDRUG02_IDX ON CSA.DRUG (INGREDDRUGSTOREID02 ASC, INGREDDRUGKEY02 ASC) 
LOGGING 
TABLESPACE CS 
PCTFREE 10 
INITRANS 2 
STORAGE 
( 
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1 
  MAXEXTENTS UNLIMITED 
  BUFFER_POOL DEFAULT 
) 
NOPARALLEL
CREATE INDEX CSA.DRUG_INGREDDRUG03_IDX ON CSA.DRUG (INGREDDRUGSTOREID03 ASC, INGREDDRUGKEY03 ASC) 
LOGGING 
TABLESPACE CS 
PCTFREE 10 
INITRANS 2 
STORAGE 
( 
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1 
  MAXEXTENTS UNLIMITED 
  BUFFER_POOL DEFAULT 
) 
NOPARALLEL
CREATE INDEX CSA.DRUG_INGREDDRUG04_IDX ON CSA.DRUG (INGREDDRUGSTOREID04 ASC, INGREDDRUGKEY04 ASC) 
LOGGING 
TABLESPACE CS 
PCTFREE 10 
INITRANS 2 
STORAGE 
( 
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1 
  MAXEXTENTS UNLIMITED 
  BUFFER_POOL DEFAULT 
) 
NOPARALLEL
CREATE INDEX CSA.DRUG_INGREDDRUG05_IDX ON CSA.DRUG (INGREDDRUGSTOREID05 ASC, INGREDDRUGKEY05 ASC) 
LOGGING 
TABLESPACE CS 
PCTFREE 10 
INITRANS 2 
STORAGE 
( 
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1 
  MAXEXTENTS UNLIMITED 
  BUFFER_POOL DEFAULT 
) 
NOPARALLEL
CREATE INDEX CSA.DRUG_INGREDDRUG06_IDX ON CSA.DRUG (INGREDDRUGSTOREID06 ASC, INGREDDRUGKEY06 ASC) 
LOGGING 
TABLESPACE CS 
PCTFREE 10 
INITRANS 2 
STORAGE 
( 
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1 
  MAXEXTENTS UNLIMITED 
  BUFFER_POOL DEFAULT 
) 
NOPARALLEL
CREATE INDEX CSA.DRUG_INGREDDRUG07_IDX ON CSA.DRUG (INGREDDRUGSTOREID07 ASC, INGREDDRUGKEY07 ASC) 
LOGGING 
TABLESPACE CS 
PCTFREE 10 
INITRANS 2 
STORAGE 
( 
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1 
  MAXEXTENTS UNLIMITED 
  BUFFER_POOL DEFAULT 
) 
NOPARALLEL
CREATE INDEX CSA.DRUG_INGREDDRUG08_IDX ON CSA.DRUG (INGREDDRUGSTOREID08 ASC, INGREDDRUGKEY08 ASC) 
LOGGING 
TABLESPACE CS 
PCTFREE 10 
INITRANS 2 
STORAGE 
( 
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1 
  MAXEXTENTS UNLIMITED 
  BUFFER_POOL DEFAULT 
) 
NOPARALLEL
CREATE INDEX CSA.DRUG_INGREDDRUG09_IDX ON CSA.DRUG (INGREDDRUGSTOREID09 ASC, INGREDDRUGKEY09 ASC) 
LOGGING 
TABLESPACE CS 
PCTFREE 10 
INITRANS 2 
STORAGE 
( 
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1 
  MAXEXTENTS UNLIMITED 
  BUFFER_POOL DEFAULT 
) 
NOPARALLEL
CREATE INDEX CSA.DRUG_INGREDDRUG10_IDX ON CSA.DRUG (INGREDDRUGSTOREID10 ASC, INGREDDRUGKEY10 ASC) 
LOGGING 
TABLESPACE CS 
PCTFREE 10 
INITRANS 2 
STORAGE 
( 
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1 
  MAXEXTENTS UNLIMITED 
  BUFFER_POOL DEFAULT 
) 
NOPARALLEL
CREATE INDEX CSA.DRUG_INGREDDRUG11_IDX ON CSA.DRUG (INGREDDRUGSTOREID11 ASC, INGREDDRUGKEY11 ASC) 
LOGGING 
TABLESPACE CS 
PCTFREE 10 
INITRANS 2 
STORAGE 
( 
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1 
  MAXEXTENTS UNLIMITED 
  BUFFER_POOL DEFAULT 
) 
NOPARALLEL
CREATE INDEX CSA.DRUG_INGREDDRUG12_IDX ON CSA.DRUG (INGREDDRUGSTOREID12 ASC, INGREDDRUGKEY12 ASC) 
LOGGING 
TABLESPACE CS 
PCTFREE 10 
INITRANS 2 
STORAGE 
( 
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1 
  MAXEXTENTS UNLIMITED 
  BUFFER_POOL DEFAULT 
) 
NOPARALLEL
CREATE INDEX CSA.DRUG_INGREDDRUG13_IDX ON CSA.DRUG (INGREDDRUGSTOREID13 ASC, INGREDDRUGKEY13 ASC) 
LOGGING 
TABLESPACE CS 
PCTFREE 10 
INITRANS 2 
STORAGE 
( 
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1 
  MAXEXTENTS UNLIMITED 
  BUFFER_POOL DEFAULT 
) 
NOPARALLEL
CREATE INDEX CSA.DRUG_INGREDDRUG14_IDX ON CSA.DRUG (INGREDDRUGSTOREID14 ASC, INGREDDRUGKEY14 ASC) 
LOGGING 
TABLESPACE CS 
PCTFREE 10 
INITRANS 2 
STORAGE 
( 
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1 
  MAXEXTENTS UNLIMITED 
  BUFFER_POOL DEFAULT 
) 
NOPARALLEL
CREATE INDEX CSA.DRUG_INGREDDRUG15_IDX ON CSA.DRUG (INGREDDRUGSTOREID15 ASC, INGREDDRUGKEY15 ASC) 
LOGGING 
TABLESPACE CS 
PCTFREE 10 
INITRANS 2 
STORAGE 
( 
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1 
  MAXEXTENTS UNLIMITED 
  BUFFER_POOL DEFAULT 
) 
NOPARALLEL
CREATE INDEX CSA.DRUG_NAME_IDX ON CSA.DRUG (NAME ASC) 
NOLOGGING 
TABLESPACE CS 
PCTFREE 10 
INITRANS 2 
STORAGE 
( 
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1 
  MAXEXTENTS UNLIMITED 
  BUFFER_POOL DEFAULT 
) 
NOPARALLEL
CREATE INDEX CSA.DRUG_NDC_IDX ON CSA.DRUG (DRUGNDCNBR ASC) 
NOLOGGING 
TABLESPACE CS 
PCTFREE 10 
INITRANS 2 
STORAGE 
( 
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1 
  MAXEXTENTS UNLIMITED 
  BUFFER_POOL DEFAULT 
) 
NOPARALLEL
CREATE INDEX CSA.DRUG_UPDATEDAT_IDX ON CSA.DRUG (UPDATEDAT ASC) 
LOGGING 
TABLESPACE CS 
PCTFREE 10 
INITRANS 2 
STORAGE 
( 
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1 
  MAXEXTENTS UNLIMITED 
  BUFFER_POOL DEFAULT 
) 
NOPARALLEL
-- Unable to render INDEX DDL for object CSA.DRUG_DRUGNBRSTOREID_DRUGNBRIDX with DBMS_METADATA attempting internal generator.
CREATE UNIQUE INDEX CSA.DRUG_DRUGNBRSTOREID_DRUGNBRIDX ON CSA.DRUG (DRUGNBRSTOREID ASC, DRUGNBRKEY ASC) 
LOGGING 
TABLESPACE CS 
PCTFREE 10 
INITRANS 2 
STORAGE 
( 
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1 
  MAXEXTENTS UNLIMITED 
  BUFFER_POOL DEFAULT 
) 
NOPARALLEL
-- Unable to render INDEX DDL for object CSA.DRUG_NDC_IDX with DBMS_METADATA attempting internal generator.
CREATE INDEX CSA.DRUG_NDC_IDX ON CSA.DRUG (DRUGNDCNBR ASC) 
NOLOGGING 
TABLESPACE CS 
PCTFREE 10 
INITRANS 2 
STORAGE 
( 
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1 
  MAXEXTENTS UNLIMITED 
  BUFFER_POOL DEFAULT 
) 
NOPARALLEL
-- Unable to render INDEX DDL for object CSA.DRUG_NAME_IDX with DBMS_METADATA attempting internal generator.
CREATE INDEX CSA.DRUG_NAME_IDX ON CSA.DRUG (NAME ASC) 
NOLOGGING 
TABLESPACE CS 
PCTFREE 10 
INITRANS 2 
STORAGE 
( 
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1 
  MAXEXTENTS UNLIMITED 
  BUFFER_POOL DEFAULT 
) 
NOPARALLEL
-- Unable to render INDEX DDL for object CSA.DRUG_INGREDDRUG01_IDX with DBMS_METADATA attempting internal generator.
CREATE INDEX CSA.DRUG_INGREDDRUG01_IDX ON CSA.DRUG (INGREDDRUGSTOREID01 ASC, INGREDDRUGKEY01 ASC) 
LOGGING 
TABLESPACE CS 
PCTFREE 10 
INITRANS 2 
STORAGE 
( 
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1 
  MAXEXTENTS UNLIMITED 
  BUFFER_POOL DEFAULT 
) 
NOPARALLEL
-- Unable to render INDEX DDL for object CSA.DRUG_INGREDDRUG02_IDX with DBMS_METADATA attempting internal generator.
CREATE INDEX CSA.DRUG_INGREDDRUG02_IDX ON CSA.DRUG (INGREDDRUGSTOREID02 ASC, INGREDDRUGKEY02 ASC) 
LOGGING 
TABLESPACE CS 
PCTFREE 10 
INITRANS 2 
STORAGE 
( 
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1 
  MAXEXTENTS UNLIMITED 
  BUFFER_POOL DEFAULT 
) 
NOPARALLEL
-- Unable to render INDEX DDL for object CSA.DRUG_INGREDDRUG03_IDX with DBMS_METADATA attempting internal generator.
CREATE INDEX CSA.DRUG_INGREDDRUG03_IDX ON CSA.DRUG (INGREDDRUGSTOREID03 ASC, INGREDDRUGKEY03 ASC) 
LOGGING 
TABLESPACE CS 
PCTFREE 10 
INITRANS 2 
STORAGE 
( 
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1 
  MAXEXTENTS UNLIMITED 
  BUFFER_POOL DEFAULT 
) 
NOPARALLEL
-- Unable to render INDEX DDL for object CSA.DRUG_INGREDDRUG04_IDX with DBMS_METADATA attempting internal generator.
CREATE INDEX CSA.DRUG_INGREDDRUG04_IDX ON CSA.DRUG (INGREDDRUGSTOREID04 ASC, INGREDDRUGKEY04 ASC) 
LOGGING 
TABLESPACE CS 
PCTFREE 10 
INITRANS 2 
STORAGE 
( 
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1 
  MAXEXTENTS UNLIMITED 
  BUFFER_POOL DEFAULT 
) 
NOPARALLEL
-- Unable to render INDEX DDL for object CSA.DRUG_INGREDDRUG05_IDX with DBMS_METADATA attempting internal generator.
CREATE INDEX CSA.DRUG_INGREDDRUG05_IDX ON CSA.DRUG (INGREDDRUGSTOREID05 ASC, INGREDDRUGKEY05 ASC) 
LOGGING 
TABLESPACE CS 
PCTFREE 10 
INITRANS 2 
STORAGE 
( 
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1 
  MAXEXTENTS UNLIMITED 
  BUFFER_POOL DEFAULT 
) 
NOPARALLEL
-- Unable to render INDEX DDL for object CSA.DRUG_INGREDDRUG06_IDX with DBMS_METADATA attempting internal generator.
CREATE INDEX CSA.DRUG_INGREDDRUG06_IDX ON CSA.DRUG (INGREDDRUGSTOREID06 ASC, INGREDDRUGKEY06 ASC) 
LOGGING 
TABLESPACE CS 
PCTFREE 10 
INITRANS 2 
STORAGE 
( 
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1 
  MAXEXTENTS UNLIMITED 
  BUFFER_POOL DEFAULT 
) 
NOPARALLEL
-- Unable to render INDEX DDL for object CSA.DRUG_INGREDDRUG07_IDX with DBMS_METADATA attempting internal generator.
CREATE INDEX CSA.DRUG_INGREDDRUG07_IDX ON CSA.DRUG (INGREDDRUGSTOREID07 ASC, INGREDDRUGKEY07 ASC) 
LOGGING 
TABLESPACE CS 
PCTFREE 10 
INITRANS 2 
STORAGE 
( 
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1 
  MAXEXTENTS UNLIMITED 
  BUFFER_POOL DEFAULT 
) 
NOPARALLEL
-- Unable to render INDEX DDL for object CSA.DRUG_INGREDDRUG08_IDX with DBMS_METADATA attempting internal generator.
CREATE INDEX CSA.DRUG_INGREDDRUG08_IDX ON CSA.DRUG (INGREDDRUGSTOREID08 ASC, INGREDDRUGKEY08 ASC) 
LOGGING 
TABLESPACE CS 
PCTFREE 10 
INITRANS 2 
STORAGE 
( 
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1 
  MAXEXTENTS UNLIMITED 
  BUFFER_POOL DEFAULT 
) 
NOPARALLEL
-- Unable to render INDEX DDL for object CSA.DRUG_INGREDDRUG09_IDX with DBMS_METADATA attempting internal generator.
CREATE INDEX CSA.DRUG_INGREDDRUG09_IDX ON CSA.DRUG (INGREDDRUGSTOREID09 ASC, INGREDDRUGKEY09 ASC) 
LOGGING 
TABLESPACE CS 
PCTFREE 10 
INITRANS 2 
STORAGE 
( 
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1 
  MAXEXTENTS UNLIMITED 
  BUFFER_POOL DEFAULT 
) 
NOPARALLEL
-- Unable to render INDEX DDL for object CSA.DRUG_INGREDDRUG10_IDX with DBMS_METADATA attempting internal generator.
CREATE INDEX CSA.DRUG_INGREDDRUG10_IDX ON CSA.DRUG (INGREDDRUGSTOREID10 ASC, INGREDDRUGKEY10 ASC) 
LOGGING 
TABLESPACE CS 
PCTFREE 10 
INITRANS 2 
STORAGE 
( 
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1 
  MAXEXTENTS UNLIMITED 
  BUFFER_POOL DEFAULT 
) 
NOPARALLEL
-- Unable to render INDEX DDL for object CSA.DRUG_INGREDDRUG11_IDX with DBMS_METADATA attempting internal generator.
CREATE INDEX CSA.DRUG_INGREDDRUG11_IDX ON CSA.DRUG (INGREDDRUGSTOREID11 ASC, INGREDDRUGKEY11 ASC) 
LOGGING 
TABLESPACE CS 
PCTFREE 10 
INITRANS 2 
STORAGE 
( 
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1 
  MAXEXTENTS UNLIMITED 
  BUFFER_POOL DEFAULT 
) 
NOPARALLEL
-- Unable to render INDEX DDL for object CSA.DRUG_INGREDDRUG12_IDX with DBMS_METADATA attempting internal generator.
CREATE INDEX CSA.DRUG_INGREDDRUG12_IDX ON CSA.DRUG (INGREDDRUGSTOREID12 ASC, INGREDDRUGKEY12 ASC) 
LOGGING 
TABLESPACE CS 
PCTFREE 10 
INITRANS 2 
STORAGE 
( 
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1 
  MAXEXTENTS UNLIMITED 
  BUFFER_POOL DEFAULT 
) 
NOPARALLEL
-- Unable to render INDEX DDL for object CSA.DRUG_INGREDDRUG13_IDX with DBMS_METADATA attempting internal generator.
CREATE INDEX CSA.DRUG_INGREDDRUG13_IDX ON CSA.DRUG (INGREDDRUGSTOREID13 ASC, INGREDDRUGKEY13 ASC) 
LOGGING 
TABLESPACE CS 
PCTFREE 10 
INITRANS 2 
STORAGE 
( 
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1 
  MAXEXTENTS UNLIMITED 
  BUFFER_POOL DEFAULT 
) 
NOPARALLEL
-- Unable to render INDEX DDL for object CSA.DRUG_INGREDDRUG14_IDX with DBMS_METADATA attempting internal generator.
CREATE INDEX CSA.DRUG_INGREDDRUG14_IDX ON CSA.DRUG (INGREDDRUGSTOREID14 ASC, INGREDDRUGKEY14 ASC) 
LOGGING 
TABLESPACE CS 
PCTFREE 10 
INITRANS 2 
STORAGE 
( 
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1 
  MAXEXTENTS UNLIMITED 
  BUFFER_POOL DEFAULT 
) 
NOPARALLEL
-- Unable to render INDEX DDL for object CSA.DRUG_INGREDDRUG15_IDX with DBMS_METADATA attempting internal generator.
CREATE INDEX CSA.DRUG_INGREDDRUG15_IDX ON CSA.DRUG (INGREDDRUGSTOREID15 ASC, INGREDDRUGKEY15 ASC) 
LOGGING 
TABLESPACE CS 
PCTFREE 10 
INITRANS 2 
STORAGE 
( 
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1 
  MAXEXTENTS UNLIMITED 
  BUFFER_POOL DEFAULT 
) 
NOPARALLEL
-- Unable to render INDEX DDL for object CSA.DRUG_UPDATEDAT_IDX with DBMS_METADATA attempting internal generator.
CREATE INDEX CSA.DRUG_UPDATEDAT_IDX ON CSA.DRUG (UPDATEDAT ASC) 
LOGGING 
TABLESPACE CS 
PCTFREE 10 
INITRANS 2 
STORAGE 
( 
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1 
  MAXEXTENTS UNLIMITED 
  BUFFER_POOL DEFAULT 
) 
NOPARALLEL
 [2016-03-08 01:03 UTC] nick dot saraniti at gmail dot com
--------------------------------------------------------
--  File created - Monday-March-07-2016   
--------------------------------------------------------
--------------------------------------------------------
--  DDL for Table HDS_STATS_COST
--------------------------------------------------------

  CREATE TABLE "SOLERA"."HDS_STATS_COST" 
   (	"COST_ID" NUMBER, 
	"DRUGSTORE" NUMBER, 
	"DRUGKEY" NUMBER, 
	"CHANGE_DATE" DATE, 
	"CHANGE_REASON" VARCHAR2(50 BYTE), 
	"PRICE_WAC" NUMBER(12,6) DEFAULT 0, 
	"PRICE_MAC" NUMBER(12,6) DEFAULT 0, 
	"PRICE_ACQ" NUMBER(12,6) DEFAULT 0, 
	"PRICE_AWP" NUMBER(12,6) DEFAULT 0, 
	"REVIEW_DATE" DATE, 
	"REVIEW_BY" NUMBER, 
	"OLD_WAC" NUMBER(12,6), 
	"OLD_AWP" NUMBER(12,6), 
	"OLD_ACQ" NUMBER(12,6)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "CS" ;
 [2016-03-08 01:53 UTC] sixd@php.net
-Assigned To: +Assigned To: sixd
 [2016-03-20 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 [2016-03-21 01:32 UTC] sixd@php.net
-Status: No Feedback +Status: Open
 [2016-04-11 13:38 UTC] clfenton at northeaststate dot edu
Server: Ubuntu 14.04.4 LTS
PHP:PHP 7.0.3-5+deb.sury.org~trusty+1 (cli) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
Oracle instant client 12.1 
Oci8: 2.1.0 
Apache 2.4.7

When executing a query that returns more than 8 fields and multiple rows, we get a segfault.An SQL query that returns only 1 row and more than 8 fields does not cause the segfault.

[Mon Apr 11 09:40:56.180968 2016] [core:notice] [pid 2079] AH00051: child pid 18607 exit signal Segmentation fault (11), possible coredump in /tmp/dump
 [2016-04-11 14:01 UTC] clfenton at northeaststate dot edu
TRACE START [2016-04-11 13:40:52]
    0.0002     360112  +360112   -> {main}() /home/robowman/public_html/view.debug.query.php:0
    0.0003     360112       +0     -> session_start() /home/robowman/public_html/view.debug.query.php:20
    0.0004     360752              >=> TRUE
    0.0005     361040     +928     -> require_once(/home/robowman/public_html/inc/config.php) /home/robowman/public_html/view.debug.query.php:21
    0.0005     361040       +0       -> define('SESSION_TIMEOUT', 30) /home/robowman/public_html/inc/config.php:20
    0.0006     361072                >=> TRUE
    0.0006     361072      +32       -> define('CHECK_BROWSER', TRUE) /home/robowman/public_html/inc/config.php:23
    0.0006     361104                >=> TRUE
    0.0007     361104      +32       -> define('IP_OCTETS', 2) /home/robowman/public_html/inc/config.php:24
    0.0007     361136                >=> TRUE
    0.0007     361136      +32       -> define('SALT', 'NeSCC!(*') /home/robowman/public_html/inc/config.php:25
    0.0007     361168                >=> TRUE
    0.0007     361168      +32       -> define('REGENERATE_ID', TRUE) /home/robowman/public_html/inc/config.php:26
    0.0007     361200                >=> TRUE
    0.0008     361200      +32       -> define('ROOT_URL', 'https://172.22.1.89/robowman/') /home/robowman/public_html/inc/config.php:28
    0.0008     361232                >=> TRUE
    0.0008     361320     +120     -> require_once(/home/robowman/public_html/query/debug.query.php) /home/robowman/public_html/view.debug.query.php:23
    0.0009     363248    +1928       -> require_once(/home/robowman/public_html/class/ROBDB_Oracle_Connect.php) /home/robowman/public_html/query/debug.query.php:29
    0.0010     364552    +1304       -> ROBDB_Query::getInstance() /home/robowman/public_html/query/debug.query.php:99
    0.0010     364664     +112         -> ROBDB_Query->__construct() /home/robowman/public_html/class/ROBDB_Oracle_Connect.php:96
    0.0010     364664       +0           -> ROBDB_Oracle->__construct() /home/robowman/public_html/class/ROBDB_Oracle_Connect.php:84
    0.0010     364664       +0             -> oci_connect('baninst1', 'u_pick_it', 'OIR_BAN8') /home/robowman/public_html/class/ROBDB_Oracle_Connect.php:26
    1.5335     365264                      >=> resource(2) of type (oci8 connection)
    1.5338     365264                >=> class ROBDB_Query { private $statement = NULL; private $error_message = NULL; private $results = NULL; protected $db_connection = resource(2) of type (oci8 connection) }
    1.5338     365640     +976       -> ROBDB_Query->set_query('SELECT distinct\r\n\r\n\t\t\tSPRIDEN_ID ID,\r\n\t\t\tSPRIDEN_LAST_NAME || \', \'|| SPRIDEN_FIRST_NAME || \' \' || SPRIDEN_MI AS EMPLOYEE,\r\n\t\t\t\r\n\t\t\tPOSITION_TITLE AS WORKING_TITLE,\r\n\t\t\tpevempl_birth_date as Birthdate,\r\n\t\t\tpevempl_sex as Gender,\r\n\t\t\tpevempl_ethn_code as Ethnicity,\r\n\t\t\tEMPLOYEE_CLASS as e_class,\r\n\t\t\tCURRENT_HIRE_DATE AS HIRE_DT,\r\n\t\t\tseniority_date as seniority,\r\n\t\t\ta.effective_date as effective_date,\r\n\t\t\tposition_begin_date as position_begin_date,\r\n\t\t\ta.assignment_grade as salary_grade,\r\n\t\t\tto_char(ANNUAL_SALARY,\'$999,999.99\') as Salary\r\n\t\t\t\r\n\t\t\tFROM AN_EMPLOYEE_POSITION A,\r\n\t\t\t  (SELECT PERSON_UID,\r\n\t\t\t  POSITION,\r\n\t\t\t  JOB_SUFFIX,\r\n\t\t\t  MAX(EFFECTIVE_DATE) AS MAX_DATE\r\n\t\t\t  FROM AN_EMPLOYEE_POSITION\r\n\t\t\t  GROUP BY PERSON_UID, POSITION, JOB_SUFFIX) E,\r\n\t\t\t\r\n\t\t\tSPRIDEN, AP_EMPLOYEE,--nbrjlbd\r\n\t\t\tpevempl\r\n\t\t\tWHERE A.PERSON_UID = E.PERSON_UID\r\n\t\t\tand pevempl_pidm = A.Person_uid\r\n\t\t\tAND A.EFFECTIVE_DATE = E.MAX_DATE\r\n\t\t\tAND A.POSITION = E.POSITION\r\n\t\t\tAND A.JOB_SUFFIX = E.JOB_SUFFIX\r\n\t\t\tAND A.PERSON_UID = SPRIDEN_PIDM\t\r\n\t\t\tAND POSITION_CONTRACT_TYPE = \'P\' /*P - primary, S- seconday, O - override*/\r\n\t\t\tAND SPRIDEN_CHANGE_IND IS NULL \r\n\t\t\tAND A.PERSON_UID = AP_EMPLOYEE.PERSON_UID\r\n\t\t\tAND EMPLOYEE_STATUS <> \'T\'\r\n\t\t\tAND POSITION_STATUS <> \'T\'\r\n\t\t\tand pevempl_ethn_code = \'60\'\r\n\t\t\tand pevempl_ecls_code = \'AE\'\r\n\t\t\tand ( pevempl_sex = \'M\' or pevempl_sex = \'F\' )\r\n') /home/robowman/public_html/query/debug.query.php:100
    1.5339     365640       +0         -> ROBDB_Query->prepareStatement('SELECT distinct\r\n\r\n\t\t\tSPRIDEN_ID ID,\r\n\t\t\tSPRIDEN_LAST_NAME || \', \'|| SPRIDEN_FIRST_NAME || \' \' || SPRIDEN_MI AS EMPLOYEE,\r\n\t\t\t\r\n\t\t\tPOSITION_TITLE AS WORKING_TITLE,\r\n\t\t\tpevempl_birth_date as Birthdate,\r\n\t\t\tpevempl_sex as Gender,\r\n\t\t\tpevempl_ethn_code as Ethnicity,\r\n\t\t\tEMPLOYEE_CLASS as e_class,\r\n\t\t\tCURRENT_HIRE_DATE AS HIRE_DT,\r\n\t\t\tseniority_date as seniority,\r\n\t\t\ta.effective_date as effective_date,\r\n\t\t\tposition_begin_date as position_begin_date,\r\n\t\t\ta.assignment_grade as salary_grade,\r\n\t\t\tto_char(ANNUAL_SALARY,\'$999,999.99\') as Salary\r\n\t\t\t\r\n\t\t\tFROM AN_EMPLOYEE_POSITION A,\r\n\t\t\t  (SELECT PERSON_UID,\r\n\t\t\t  POSITION,\r\n\t\t\t  JOB_SUFFIX,\r\n\t\t\t  MAX(EFFECTIVE_DATE) AS MAX_DATE\r\n\t\t\t  FROM AN_EMPLOYEE_POSITION\r\n\t\t\t  GROUP BY PERSON_UID, POSITION, JOB_SUFFIX) E,\r\n\t\t\t\r\n\t\t\tSPRIDEN, AP_EMPLOYEE,--nbrjlbd\r\n\t\t\tpevempl\r\n\t\t\tWHERE A.PERSON_UID = E.PERSON_UID\r\n\t\t\tand pevempl_pidm = A.Person_uid\r\n\t\t\tAND A.EFFECTIVE_DATE = E.MAX_DATE\r\n\t\t\tAND A.POSITION = E.POSITION\r\n\t\t\tAND A.JOB_SUFFIX = E.JOB_SUFFIX\r\n\t\t\tAND A.PERSON_UID = SPRIDEN_PIDM\t\r\n\t\t\tAND POSITION_CONTRACT_TYPE = \'P\' /*P - primary, S- seconday, O - override*/\r\n\t\t\tAND SPRIDEN_CHANGE_IND IS NULL \r\n\t\t\tAND A.PERSON_UID = AP_EMPLOYEE.PERSON_UID\r\n\t\t\tAND EMPLOYEE_STATUS <> \'T\'\r\n\t\t\tAND POSITION_STATUS <> \'T\'\r\n\t\t\tand pevempl_ethn_code = \'60\'\r\n\t\t\tand pevempl_ecls_code = \'AE\'\r\n\t\t\tand ( pevempl_sex = \'M\' or pevempl_sex = \'F\' )\r\n') /home/robowman/public_html/class/ROBDB_Oracle_Connect.php:110
    1.5339     365640       +0           -> oci_parse(resource(2) of type (oci8 connection), 'SELECT distinct\r\n\r\n\t\t\tSPRIDEN_ID ID,\r\n\t\t\tSPRIDEN_LAST_NAME || \', \'|| SPRIDEN_FIRST_NAME || \' \' || SPRIDEN_MI AS EMPLOYEE,\r\n\t\t\t\r\n\t\t\tPOSITION_TITLE AS WORKING_TITLE,\r\n\t\t\tpevempl_birth_date as Birthdate,\r\n\t\t\tpevempl_sex as Gender,\r\n\t\t\tpevempl_ethn_code as Ethnicity,\r\n\t\t\tEMPLOYEE_CLASS as e_class,\r\n\t\t\tCURRENT_HIRE_DATE AS HIRE_DT,\r\n\t\t\tseniority_date as seniority,\r\n\t\t\ta.effective_date as effective_date,\r\n\t\t\tposition_begin_date as position_begin_date,\r\n\t\t\ta.assignment_grade as salary_grade,\r\n\t\t\tto_char(ANNUAL_SALARY,\'$999,999.99\') as Salary\r\n\t\t\t\r\n\t\t\tFROM AN_EMPLOYEE_POSITION A,\r\n\t\t\t  (SELECT PERSON_UID,\r\n\t\t\t  POSITION,\r\n\t\t\t  JOB_SUFFIX,\r\n\t\t\t  MAX(EFFECTIVE_DATE) AS MAX_DATE\r\n\t\t\t  FROM AN_EMPLOYEE_POSITION\r\n\t\t\t  GROUP BY PERSON_UID, POSITION, JOB_SUFFIX) E,\r\n\t\t\t\r\n\t\t\tSPRIDEN, AP_EMPLOYEE,--nbrjlbd\r\n\t\t\tpevempl\r\n\t\t\tWHERE A.PERSON_UID = E.PERSON_UID\r\n\t\t\tand pevempl_pidm = A.Person_uid\r\n\t\t\tAND A.EFFECTIVE_DATE = E.MAX_DATE\r\n\t\t\tAND A.POSITION = E.POSITION\r\n\t\t\tAND A.JOB_SUFFIX = E.JOB_SUFFIX\r\n\t\t\tAND A.PERSON_UID = SPRIDEN_PIDM\t\r\n\t\t\tAND POSITION_CONTRACT_TYPE = \'P\' /*P - primary, S- seconday, O - override*/\r\n\t\t\tAND SPRIDEN_CHANGE_IND IS NULL \r\n\t\t\tAND A.PERSON_UID = AP_EMPLOYEE.PERSON_UID\r\n\t\t\tAND EMPLOYEE_STATUS <> \'T\'\r\n\t\t\tAND POSITION_STATUS <> \'T\'\r\n\t\t\tand pevempl_ethn_code = \'60\'\r\n\t\t\tand pevempl_ecls_code = \'AE\'\r\n\t\t\tand ( pevempl_sex = \'M\' or pevempl_sex = \'F\' )\r\n') /home/robowman/public_html/class/ROBDB_Oracle_Connect.php:133
    1.5342     367328                    >=> resource(3) of type (oci8 statement)
    1.5343     367328    +1688       -> ROBDB_Query->execute_statement() /home/robowman/public_html/query/debug.query.php:106
    1.5343     367328       +0         -> oci_execute(resource(3) of type (oci8 statement)) /home/robowman/public_html/class/ROBDB_Oracle_Connect.php:144
    1.5526     380784                  >=> TRUE
    1.5526     380784   +13456       -> ROBDB_Query->fetch_all() /home/robowman/public_html/query/debug.query.php:108
    1.5526     380808      +24         -> oci_fetch_all(resource(3) of type (oci8 statement), '') /home/robowman/public_html/class/ROBDB_Oracle_Connect.php:184



The file just ends here with a core dump. 


version: 1
creator: xdebug 2.4.0 (PHP 7.0.3-5+deb.sury.org~trusty+1)
cmd: /home/robowman/public_html/view.debug.query.php
part: 1
positions: line

events: Time

fl=(1) php:internal
fn=(1) php::session_start
20 77

fl=(1)
fn=(2) php::define
20 10

fl=(1)
fn=(2)
23 2

fl=(1)
fn=(2)
24 2

fl=(1)
fn=(2)
25 1

fl=(1)
fn=(2)
26 0

fl=(1)
fn=(2)
28 0

fl=(2) /home/robowman/public_html/inc/config.php
fn=(3) require_once::/home/robowman/public_html/inc/config.php
1 237
cfl=(1)
cfn=(2)
calls=1 0 0
20 10
cfl=(1)
cfn=(2)
calls=1 0 0
23 2
cfl=(1)
cfn=(2)
calls=1 0 0
24 2
cfl=(1)
cfn=(2)
calls=1 0 0
25 1
cfl=(1)
cfn=(2)
calls=1 0 0
26 0
cfl=(1)
cfn=(2)
calls=1 0 0
28 0

fl=(3) /home/robowman/public_html/class/ROBDB_Oracle_Connect.php
fn=(4) require_once::/home/robowman/public_html/class/ROBDB_Oracle_Connect.php
1 1

fl=(1)
fn=(5) php::oci_connect
26 1532376

fl=(3)
fn=(6) ROBDB_Oracle->__construct
23 128
cfl=(1)
cfn=(5)
calls=1 0 0
26 1532376

fl=(3)
fn=(7) ROBDB_Query->__construct
82 41
cfl=(3)
cfn=(6)
calls=1 0 0
84 1532504

fl=(3)
fn=(8) ROBDB_Query::getInstance
93 207
cfl=(3)
cfn=(7)
calls=1 0 0
96 1532545

fl=(1)
fn=(9) php::oci_parse
133 109

fl=(3)
fn=(10) ROBDB_Query->prepareStatement
131 195
cfl=(1)
cfn=(9)
calls=1 0 0
133 109

fl=(3)
fn=(11) ROBDB_Query->set_query
108 58
cfl=(3)
cfn=(10)
calls=1 0 0
110 305

fl=(1)
fn=(12) php::oci_execute
144 18215

fl=(3)
fn=(13) ROBDB_Query->execute_statement
142 77
cfl=(1)
cfn=(12)
calls=1 0 0
144 18215
 [2016-04-12 00:48 UTC] sixd@php.net
Issue seems to be when a sym table is reallocated after its initial 8 slots are full.
A fix is being reviewed & tested.
 [2016-04-14 04:12 UTC] sixd@php.net
Automatic comment on behalf of christopher.jones@oracle.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=12cd25bb1a589f8a49a0cca9290e589f1dc01875
Log: Fixed bug #71600 (oci_fetch_all segfaults when selecting more than 8 columns) (Tian Yang)
 [2016-04-14 04:12 UTC] sixd@php.net
-Status: Assigned +Status: Closed
 [2016-04-14 04:13 UTC] sixd@php.net
Automatic comment on behalf of christopher.jones@oracle.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=12cd25bb1a589f8a49a0cca9290e589f1dc01875
Log: Fixed bug #71600 (oci_fetch_all segfaults when selecting more than 8 columns) (Tian Yang)
 [2016-04-14 04:16 UTC] sixd@php.net
Try the latest in PHP 7.0 or master branches.  If all is OK, I'll create a new PECL package.
 [2016-04-14 18:07 UTC] clfenton at northeaststate dot edu
This update fixed the problem in our environment. Thank you for the quick response to this issue!
 [2016-04-14 20:26 UTC] nick dot saraniti at gmail dot com
Works for me as well - Thanks!
 [2016-07-20 11:32 UTC] davey@php.net
Automatic comment on behalf of christopher.jones@oracle.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=12cd25bb1a589f8a49a0cca9290e589f1dc01875
Log: Fixed bug #71600 (oci_fetch_all segfaults when selecting more than 8 columns) (Tian Yang)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 13 17:01:29 2024 UTC