Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
b0591b38
Kaydet (Commit)
b0591b38
authored
May 27, 2013
tarafından
Javier Fernandez
Kaydeden (comit)
Andrzej J.R. Hunt
Tem 16, 2013
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Adding debug info for tracking disposes and fixed a memory allocation bug.
Change-Id: Iae8a6dac26fd7d074ece6421ae61ecf7ce047b8f
üst
54060540
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
18 deletions
+30
-18
FConnection.cxx
connectivity/source/drivers/firebird/FConnection.cxx
+8
-2
FPreparedStatement.cxx
connectivity/source/drivers/firebird/FPreparedStatement.cxx
+15
-15
FResultSet.cxx
connectivity/source/drivers/firebird/FResultSet.cxx
+4
-0
FStatement.cxx
connectivity/source/drivers/firebird/FStatement.cxx
+3
-1
No files found.
connectivity/source/drivers/firebird/FConnection.cxx
Dosyayı görüntüle @
b0591b38
...
...
@@ -76,6 +76,8 @@ OConnection::~OConnection()
//-----------------------------------------------------------------------------
void
SAL_CALL
OConnection
::
release
()
throw
()
{
printf
(
"DEBUG !!! connectivity.firebird => OConnection::release()
\n
"
);
relase_ChildImpl
();
}
// -----------------------------------------------------------------------------
...
...
@@ -100,7 +102,7 @@ static int pr_error (long* status, char* operation)
void
OConnection
::
construct
(
const
::
rtl
::
OUString
&
url
,
const
Sequence
<
PropertyValue
>&
info
)
throw
(
SQLException
)
{
printf
(
"DEBUG !!! connectivity.firebird
"
,
"=> OConnection::construct()
"
);
printf
(
"DEBUG !!! connectivity.firebird
=> OConnection::construct()
\n
"
);
osl_atomic_increment
(
&
m_refCount
);
...
...
@@ -218,7 +220,7 @@ sal_Bool SAL_CALL OConnection::isClosed( ) throw(SQLException, RuntimeException
// --------------------------------------------------------------------------------
Reference
<
XDatabaseMetaData
>
SAL_CALL
OConnection
::
getMetaData
(
)
throw
(
SQLException
,
RuntimeException
)
{
printf
(
"DEBUG !!!
__ OConnection::getMetaData() __
\n
"
);
printf
(
"DEBUG !!!
connectivity.firebird => OConnection::getMetaData()
\n
"
);
::
osl
::
MutexGuard
aGuard
(
m_aMutex
);
checkDisposed
(
OConnection_BASE
::
rBHelper
.
bDisposed
);
...
...
@@ -307,6 +309,8 @@ void SAL_CALL OConnection::setTypeMap( const Reference< ::com::sun::star::contai
// XCloseable
void
SAL_CALL
OConnection
::
close
(
)
throw
(
SQLException
,
RuntimeException
)
{
printf
(
"DEBUG !!! connectivity.firebird => OConnection::close()
\n
"
);
// we just dispose us
{
::
osl
::
MutexGuard
aGuard
(
m_aMutex
);
...
...
@@ -381,6 +385,8 @@ void OConnection::buildTypeInfo() throw( SQLException)
//------------------------------------------------------------------------------
void
OConnection
::
disposing
()
{
printf
(
"DEBUG !!! connectivity.firebird => OConnection::disposing().
\n
"
);
// we noticed that we should be destroied in near future so we have to dispose our statements
::
osl
::
MutexGuard
aGuard
(
m_aMutex
);
...
...
connectivity/source/drivers/firebird/FPreparedStatement.cxx
Dosyayı görüntüle @
b0591b38
...
...
@@ -89,9 +89,9 @@ OPreparedStatement::OPreparedStatement( OConnection* _pConnection,const TTypeInf
isc_db_handle
db
=
_pConnection
->
getDBHandler
();
// database handle
// enabling the XSQLDA to accommodate up to 10 select-list items (DEFAULT)
XSQLDA
*
out_
sqlda
=
(
XSQLDA
*
)
malloc
(
XSQLDA_LENGTH
(
10
));
out_
sqlda
->
version
=
SQLDA_VERSION1
;
out_
sqlda
->
sqln
=
10
;
m_OUT
sqlda
=
(
XSQLDA
*
)
malloc
(
XSQLDA_LENGTH
(
10
));
m_OUT
sqlda
->
version
=
SQLDA_VERSION1
;
m_OUT
sqlda
->
sqln
=
10
;
m_STMTHandler
=
NULL
;
// Set handle to NULL before allocation.
if
(
isc_dsql_allocate_statement
(
status
,
&
db
,
&
m_STMTHandler
))
...
...
@@ -111,27 +111,27 @@ OPreparedStatement::OPreparedStatement( OConnection* _pConnection,const TTypeInf
free
(
sqlStr
);
// fill the output XSQLDA with information about the select-list items.
if
(
isc_dsql_describe
(
status
,
&
m_STMTHandler
,
1
,
out_
sqlda
))
if
(
isc_dsql_describe
(
status
,
&
m_STMTHandler
,
1
,
m_OUT
sqlda
))
if
(
pr_error
(
status
,
"describe statement"
))
return
;
// determine if the output descriptor can accommodate the number of select-list
// items specified in the statement.
if
(
out_sqlda
->
sqld
>
out_
sqlda
->
sqln
)
if
(
m_OUTsqlda
->
sqld
>
m_OUT
sqlda
->
sqln
)
{
int
n
=
out_
sqlda
->
sqld
;
free
(
out_
sqlda
);
out_
sqlda
=
(
XSQLDA
*
)
malloc
(
XSQLDA_LENGTH
(
n
));
out_
sqlda
->
sqln
=
n
;
out_
sqlda
->
version
=
SQLDA_VERSION1
;
if
(
isc_dsql_describe
(
status
,
&
m_STMTHandler
,
1
,
out_
sqlda
))
int
n
=
m_OUT
sqlda
->
sqld
;
free
(
m_OUT
sqlda
);
m_OUT
sqlda
=
(
XSQLDA
*
)
malloc
(
XSQLDA_LENGTH
(
n
));
m_OUT
sqlda
->
sqln
=
n
;
m_OUT
sqlda
->
version
=
SQLDA_VERSION1
;
if
(
isc_dsql_describe
(
status
,
&
m_STMTHandler
,
1
,
m_OUT
sqlda
))
if
(
pr_error
(
status
,
"describe statement 2"
))
return
;
}
XSQLVAR
*
var
=
NULL
;
int
i
,
dtype
;
for
(
i
=
0
,
var
=
out_sqlda
->
sqlvar
;
i
<
out_
sqlda
->
sqld
;
i
++
,
var
++
)
for
(
i
=
0
,
var
=
m_OUTsqlda
->
sqlvar
;
i
<
m_OUT
sqlda
->
sqld
;
i
++
,
var
++
)
{
dtype
=
(
var
->
sqltype
&
~
1
);
/* drop flag bit for now */
switch
(
dtype
)
{
...
...
@@ -146,7 +146,7 @@ OPreparedStatement::OPreparedStatement( OConnection* _pConnection,const TTypeInf
var
->
sqldata
=
(
char
*
)
malloc
(
sizeof
(
long
));
break
;
case
SQL_SHORT
:
var
->
sqldata
=
(
char
*
)
malloc
(
sizeof
(
char
));
var
->
sqldata
=
(
char
*
)
malloc
(
sizeof
(
char
)
*
var
->
sqllen
);
break
;
case
SQL_FLOAT
:
var
->
sqldata
=
(
char
*
)
malloc
(
sizeof
(
double
));
...
...
@@ -174,8 +174,6 @@ OPreparedStatement::OPreparedStatement( OConnection* _pConnection,const TTypeInf
var
->
sqlind
=
(
short
*
)
malloc
(
sizeof
(
short
));
}
}
m_OUTsqlda
=
out_sqlda
;
}
// -----------------------------------------------------------------------------
...
...
@@ -220,6 +218,8 @@ Reference< XResultSetMetaData > SAL_CALL OPreparedStatement::getMetaData( ) thr
void
SAL_CALL
OPreparedStatement
::
close
(
)
throw
(
SQLException
,
RuntimeException
)
{
printf
(
"DEBUG !!! connectivity.firebird => OPreparedStatement::close()
\n
"
);
::
osl
::
MutexGuard
aGuard
(
m_aMutex
);
checkDisposed
(
OStatement_BASE
::
rBHelper
.
bDisposed
);
...
...
connectivity/source/drivers/firebird/FResultSet.cxx
Dosyayı görüntüle @
b0591b38
...
...
@@ -152,6 +152,8 @@ OResultSet::~OResultSet()
// -------------------------------------------------------------------------
void
OResultSet
::
disposing
(
void
)
{
printf
(
"DEBUG !!! connectivity.firebird => OResultSet::disposing()
\n
"
);
OPropertySetHelper
::
disposing
();
::
osl
::
MutexGuard
aGuard
(
m_aMutex
);
...
...
@@ -462,6 +464,8 @@ void SAL_CALL OResultSet::afterLast( ) throw(SQLException, RuntimeException)
void
SAL_CALL
OResultSet
::
close
(
)
throw
(
SQLException
,
RuntimeException
)
{
printf
(
"DEBUG !!! connectivity.firebird => OResultSet::close()
\n
"
);
{
::
osl
::
MutexGuard
aGuard
(
m_aMutex
);
checkDisposed
(
OResultSet_BASE
::
rBHelper
.
bDisposed
);
...
...
connectivity/source/drivers/firebird/FStatement.cxx
Dosyayı görüntüle @
b0591b38
...
...
@@ -85,7 +85,7 @@ void OStatement_Base::disposeResultSet()
//------------------------------------------------------------------------------
void
OStatement_BASE2
::
disposing
()
{
printf
(
"DEBUG !!! connectivity.firebird => OStatement_BASE2::disposing
:
\n
"
);
printf
(
"DEBUG !!! connectivity.firebird => OStatement_BASE2::disposing
()
\n
"
);
::
osl
::
MutexGuard
aGuard
(
m_aMutex
);
...
...
@@ -146,6 +146,8 @@ void SAL_CALL OStatement_Base::cancel( ) throw(RuntimeException)
void
SAL_CALL
OStatement_Base
::
close
(
)
throw
(
SQLException
,
RuntimeException
)
{
printf
(
"DEBUG !!! connectivity.firebird => OStatement_Base::close()
\n
"
);
{
::
osl
::
MutexGuard
aGuard
(
m_aMutex
);
checkDisposed
(
OStatement_BASE
::
rBHelper
.
bDisposed
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment