Fix logic of fb_shutdown check
From https://www.firebirdsql.org/file/documentation/release_notes/html/en/2_5/rnfb25-apiods-api.html " Return Values A return value of zero means shutdown was successful A non-zero value means some errors occurred during the shutdown. Details will be written to firebird.log. " Change-Id: I1139e1abdd1f07f0fad23f24a177aa5439546b19 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184939 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
This commit is contained in:
@@ -115,7 +115,7 @@ void FirebirdDriver::disposing()
|
||||
#endif /*MACOSX*/
|
||||
#endif /*!SYSTEM_FIREBIRD*/
|
||||
|
||||
OSL_VERIFY(fb_shutdown(0, 1));
|
||||
OSL_VERIFY(fb_shutdown(0, 1) == 0);
|
||||
|
||||
ODriver_BASE::disposing();
|
||||
}
|
||||
|
@@ -138,6 +138,16 @@ OUString SAL_CALL OResultSetMetaData::getColumnName(sal_Int32 column)
|
||||
return sRet;
|
||||
}
|
||||
|
||||
OUString OResultSetMetaData::getColumnNameWithoutAlias(sal_Int32 column)
|
||||
{
|
||||
verifyValidColumn(column);
|
||||
char* pColumnName = m_pSqlda->sqlvar[column - 1].sqlname;
|
||||
sal_Int32 nColumnNameLength = m_pSqlda->sqlvar[column - 1].sqlname_length;
|
||||
OUString sRet(pColumnName, nColumnNameLength, RTL_TEXTENCODING_UTF8);
|
||||
sanitizeIdentifier(sRet);
|
||||
return sRet;
|
||||
}
|
||||
|
||||
OUString SAL_CALL OResultSetMetaData::getTableName(sal_Int32 column)
|
||||
{
|
||||
verifyValidColumn(column);
|
||||
@@ -188,7 +198,7 @@ sal_Bool SAL_CALL OResultSetMetaData::isAutoIncrement(sal_Int32 column)
|
||||
if( sTable.isEmpty() )
|
||||
return false;
|
||||
|
||||
OUString sColumnName = getColumnName( column );
|
||||
OUString sColumnName = getColumnNameWithoutAlias( column );
|
||||
|
||||
OUString sSql = "SELECT RDB$IDENTITY_TYPE FROM RDB$RELATION_FIELDS "
|
||||
"WHERE RDB$RELATION_NAME = '"
|
||||
|
@@ -62,6 +62,7 @@ namespace connectivity::firebird
|
||||
virtual sal_Int32 SAL_CALL getColumnDisplaySize(sal_Int32 column) override;
|
||||
virtual OUString SAL_CALL getColumnLabel(sal_Int32 column) override;
|
||||
virtual OUString SAL_CALL getColumnName(sal_Int32 column) override;
|
||||
OUString getColumnNameWithoutAlias(sal_Int32 column);
|
||||
virtual OUString SAL_CALL getSchemaName(sal_Int32 column) override;
|
||||
virtual sal_Int32 SAL_CALL getPrecision(sal_Int32 column) override;
|
||||
virtual sal_Int32 SAL_CALL getScale(sal_Int32 column) override;
|
||||
|
Reference in New Issue
Block a user