"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/jrd/extds/IscDS.cpp" between
Firebird-3.0.2.32703-0.tar.bz2 and Firebird-3.0.4.33054-0.tar.bz2

About: Firebird is a relational database offering many ANSI SQL standard features.

IscDS.cpp  (Firebird-3.0.2.32703-0.tar.bz2):IscDS.cpp  (Firebird-3.0.4.33054-0.tar.bz2)
skipping to change at line 223 skipping to change at line 223
m_handle = h; m_handle = h;
} }
if ((status->getState() & IStatus::STATE_ERRORS) && if ((status->getState() & IStatus::STATE_ERRORS) &&
!isConnectionBrokenError(&status)) !isConnectionBrokenError(&status))
{ {
raise(&status, tdbb, "detach"); raise(&status, tdbb, "detach");
} }
} }
bool IscConnection::cancelExecution() bool IscConnection::cancelExecution(bool forced)
{ {
FbLocalStatus status; FbLocalStatus status;
if (m_handle) if (m_handle)
{ {
m_iscProvider.fb_cancel_operation(&status, &m_handle, fb_cancel_r m_iscProvider.fb_cancel_operation(&status, &m_handle,
aise); forced ? fb_cancel_abort : fb_cancel_raise);
if (m_handle && (status->getErrors()[1] == isc_wish_list)) if (!forced && m_handle &&
(status->getState() & IStatus::STATE_ERRORS) &&
(status->getErrors()[1] != isc_bad_db_handle))
{ {
status->init(); status->init();
m_iscProvider.fb_cancel_operation(&status, &m_handle, fb_ cancel_abort); m_iscProvider.fb_cancel_operation(&status, &m_handle, fb_ cancel_abort);
} }
} }
return !(status->getState() & IStatus::STATE_ERRORS); return !(status->getState() & IStatus::STATE_ERRORS);
} }
// this ISC connection instance is available for the current execution context i f it // this ISC connection instance is available for the current execution context i f it
// a) has no active statements or supports many active statements // a) has no active statements or supports many active statements
skipping to change at line 1602 skipping to change at line 1605
}; };
void FBProvider::loadAPI() void FBProvider::loadAPI()
{ {
m_api = isc_callbacks; m_api = isc_callbacks;
m_api_loaded = true; m_api_loaded = true;
} }
static bool isConnectionBrokenError(FbStatusVector* status) static bool isConnectionBrokenError(FbStatusVector* status)
{ {
switch (status->getErrors()[1]) ISC_STATUS code = status->getErrors()[1];
{ return (fb_utils::isNetworkError(code) || code == isc_att_shutdown);
case isc_att_shutdown:
case isc_network_error:
case isc_net_read_err:
case isc_net_write_err:
return true;
}
return false;
} }
static void parseSQLDA(XSQLDA* xsqlda, UCharBuffer& buff, Firebird::Array<dsc> & descs) static void parseSQLDA(XSQLDA* xsqlda, UCharBuffer& buff, Firebird::Array<dsc> & descs)
{ {
FB_SIZE_T offset = 0; FB_SIZE_T offset = 0;
XSQLVAR* xVar = xsqlda->sqlvar; XSQLVAR* xVar = xsqlda->sqlvar;
for (int i = 0; i < xsqlda->sqld; xVar++, i++) for (int i = 0; i < xsqlda->sqld; xVar++, i++)
{ {
const UCHAR dtype = sqlTypeToDscType(xVar->sqltype & ~1); const UCHAR dtype = sqlTypeToDscType(xVar->sqltype & ~1);
 End of changes. 4 change blocks. 
13 lines changed or deleted 8 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)