2015-02-25 22:06 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbodbc/odbc.c
* contrib/hbodbc/sql.ch
* minor formatting to sync with Viktor's branch
+ added missing defines from Viktor's branch
* contrib/rddads/ads.ch
* contrib/rddads/adsfunc.c
+ added AdsStmtSetTableReadOnly( <nMode> ) -> <lSuccess>
(From Viktor's branch: 2015-01-21 18:43 UTC+0100 Viktor Szakats)
+ added ADS_REFRESHCOUNT constant and
AdsGetRecordCount( [<nHandleType:ADS_TABLE>], ;
[<nFilterOption:ADS_RESPECTFILTERS>], @nCount ) -> <nErrorCode>
(From Viktor's branch: 2014-01-19 13:42 UTC+0100 Viktor Szakats)
! fixed connection handle parameter position in AdsDDRemoveTable()
It was 4-th:
AdsDDRemoveTable( <cTableName>, <deleteFile>, , [ <nConnection> ] )
-> <lResult>
Now is 3-rd:
AdsDDRemoveTable( <cTableName>, <deleteFile>, [ <nConnection> ] )
-> <lResult>
(From Viktor's branch: 2014-01-14 23:53 UTC+0100 Viktor Szakats)
* contrib/rddads/rddads.h
+ autodetection support for 11.10
(From Viktor's branch: 2013-12-26 01:22 UTC+0100 Viktor Szakáts)
* contrib/rddads/adsx.c
* use hb_xgrabz()
* formatting
* contrib/rddsql/hbrddsql.h
* contrib/rddsql/sqlbase.c
* added const qualifier to SDD method pointer in SQLBASEAREA
* declare default SDD method table with const qualifier
* added s_ prefix to the name of static variable with SDD methods
% optimized GOHOT() method
* use hb_xgrab() instead of hb_xalloc() to force error when out of memory
* use hb_xgrabz()
* contrib/rddsql/sqlmix.c
* use hb_xgrabz()
* contrib/sddfb/core.c
* added s_ prefix to the name of static variable with SDD methods
% removed unnecessary memset()
% optimized GOTO() method
! fixed very bad typo in record set resizing - for each record 64 dummy
items were added to array with records so finally this array was 64
times longer then necessary.
* contrib/sddmy/core.c
* added s_ prefix to the name of static variable with SDD methods
+ added new field types from from Viktor's branch
* use hb_xgrabz()
% removed redundant comparison to NULL
* contrib/sddoci/core.c
* added s_ prefix to the name of static variable with SDD methods
* check OCI_Initialize() result and generate error if fails
(synced with Viktor's branch)
* minor formatting to sync with Viktor's branch
% removed unnecessary memset()
% optimized GOTO() method
! fixed very bad typo in record set resizing - for each record 64 dummy
items were added to array with records so finally this array was 64
times longer then necessary.
* contrib/sddodbc/core.c
* replaced unnecessary hb_xgrabz() with hb_xgrab()
! fixed very bad typo in record set resizing - for each record 64 dummy
items were added to array with records so finally this array was 64
times longer then necessary.
* contrib/sddpg/core.c
* added s_ prefix to the name of static variable with SDD methods
* use hb_xgrabz()
* contrib/sddsqlt3/core.c
* added s_ prefix to the name of static variable with SDD methods
* minor formatting to sync with Viktor's branch
! fixed memory leak when RTE ESQLDD_STMTALLOC is generated
(fix from Viktor's branch)
% removed unnecessary memset()
! fixed very bad typo in record set resizing - for each record 64 dummy
items were added to array with records so finally this array was 64
times longer then necessary.
This commit is contained in:
@@ -130,7 +130,7 @@ static HB_ERRCODE sddGetValue( SQLBASEAREAP pArea, HB_USHORT uiIndex, PHB_ITEM p
|
||||
static HB_ERRCODE sddGetVarLen( SQLBASEAREAP pArea, HB_USHORT uiIndex, HB_ULONG * pLength );
|
||||
|
||||
|
||||
static SDDNODE sddNull = {
|
||||
static const SDDNODE s_sddNull = {
|
||||
NULL,
|
||||
"NULL",
|
||||
( SDDFUNC_CONNECT ) sddConnect,
|
||||
@@ -236,21 +236,21 @@ int hb_sddRegister( PSDDNODE pSdd )
|
||||
|
||||
/* "Inheritance" from NULL SDD */
|
||||
if( pSdd->Connect == NULL )
|
||||
pSdd->Connect = sddNull.Connect;
|
||||
pSdd->Connect = s_sddNull.Connect;
|
||||
if( pSdd->Disconnect == NULL )
|
||||
pSdd->Disconnect = sddNull.Disconnect;
|
||||
pSdd->Disconnect = s_sddNull.Disconnect;
|
||||
if( pSdd->Execute == NULL )
|
||||
pSdd->Execute = sddNull.Execute;
|
||||
pSdd->Execute = s_sddNull.Execute;
|
||||
if( pSdd->Open == NULL )
|
||||
pSdd->Open = sddNull.Open;
|
||||
pSdd->Open = s_sddNull.Open;
|
||||
if( pSdd->Close == NULL )
|
||||
pSdd->Close = sddNull.Close;
|
||||
pSdd->Close = s_sddNull.Close;
|
||||
if( pSdd->GoTo == NULL )
|
||||
pSdd->GoTo = sddNull.GoTo;
|
||||
pSdd->GoTo = s_sddNull.GoTo;
|
||||
if( pSdd->GetValue == NULL )
|
||||
pSdd->GetValue = sddNull.GetValue;
|
||||
pSdd->GetValue = s_sddNull.GetValue;
|
||||
if( pSdd->GetVarLen == NULL )
|
||||
pSdd->GetVarLen = sddNull.GetVarLen;
|
||||
pSdd->GetVarLen = s_sddNull.GetVarLen;
|
||||
|
||||
while( pNode )
|
||||
{
|
||||
@@ -505,13 +505,13 @@ static HB_ERRCODE sqlbaseGoHot( SQLBASEAREAP pArea )
|
||||
HB_USHORT us;
|
||||
|
||||
pArray = hb_itemArrayNew( pArea->area.uiFieldCount );
|
||||
pItem = hb_itemNew( NULL );
|
||||
for( us = 1; us <= pArea->area.uiFieldCount; us++ )
|
||||
{
|
||||
pItem = hb_itemNew( NULL );
|
||||
if( SELF_GETVALUE( &pArea->area, us, pItem ) == HB_SUCCESS )
|
||||
hb_arraySetForward( pArray, us, pItem );
|
||||
hb_itemRelease( pItem );
|
||||
}
|
||||
hb_itemRelease( pItem );
|
||||
pArea->pRecord = pArray;
|
||||
pArea->bRecordFlags |= SQLDD_FLAG_CACHED;
|
||||
pArea->fRecordChanged = HB_TRUE;
|
||||
@@ -665,7 +665,7 @@ static HB_ERRCODE sqlbaseCreate( SQLBASEAREAP pArea, LPDBOPENINFO pOpenInfo )
|
||||
pArea->pSDD = pArea->pConnection->pSDD;
|
||||
}
|
||||
else
|
||||
pArea->pSDD = &sddNull;
|
||||
pArea->pSDD = &s_sddNull;
|
||||
|
||||
pItemEof = hb_itemArrayNew( pArea->area.uiFieldCount );
|
||||
|
||||
@@ -747,11 +747,11 @@ static HB_ERRCODE sqlbaseCreate( SQLBASEAREAP pArea, LPDBOPENINFO pOpenInfo )
|
||||
|
||||
pArea->ulRecCount = 0;
|
||||
|
||||
pArea->pRow = ( void ** ) hb_xalloc( SQLDD_ROWSET_RESIZE * sizeof( void * ) );
|
||||
pArea->pRowFlags = ( HB_BYTE * ) hb_xalloc( SQLDD_ROWSET_RESIZE * sizeof( HB_BYTE ) );
|
||||
pArea->pRow = ( void ** ) hb_xgrab( SQLDD_ROWSET_RESIZE * sizeof( void * ) );
|
||||
pArea->pRowFlags = ( HB_BYTE * ) hb_xgrab( SQLDD_ROWSET_RESIZE * sizeof( HB_BYTE ) );
|
||||
pArea->ulRecMax = SQLDD_ROWSET_RESIZE;
|
||||
|
||||
*( pArea->pRow ) = pItemEof;
|
||||
pArea->pRow[ 0 ] = pItemEof;
|
||||
pArea->pRowFlags[ 0 ] = SQLDD_FLAG_CACHED;
|
||||
pArea->fFetched = HB_TRUE;
|
||||
|
||||
@@ -998,8 +998,7 @@ static HB_ERRCODE sqlbaseRddInfo( LPRDDNODE pRDD, HB_USHORT uiIndex, HB_ULONG ul
|
||||
}
|
||||
|
||||
hb_rddsqlSetError( 0, NULL, NULL, NULL, 0 );
|
||||
pConn = ( SQLDDCONNECTION * ) hb_xgrab( sizeof( SQLDDCONNECTION ) );
|
||||
memset( pConn, 0, sizeof( SQLDDCONNECTION ) );
|
||||
pConn = ( SQLDDCONNECTION * ) hb_xgrabz( sizeof( SQLDDCONNECTION ) );
|
||||
if( pNode && pNode->Connect( pConn, pItem ) == HB_SUCCESS )
|
||||
{
|
||||
pConn->pSDD = pNode;
|
||||
|
||||
Reference in New Issue
Block a user