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
03528afc
Kaydet (Commit)
03528afc
authored
Agu 02, 2013
tarafından
Andrzej J.R. Hunt
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Clear Statements as appropriate. (firebird-sdbc)
Change-Id: Ied90fe623dff284179c88ae77392d641ba0b004b
üst
935eab83
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
10 deletions
+16
-10
Connection.cxx
connectivity/source/drivers/firebird/Connection.cxx
+15
-10
Connection.hxx
connectivity/source/drivers/firebird/Connection.hxx
+1
-0
No files found.
connectivity/source/drivers/firebird/Connection.cxx
Dosyayı görüntüle @
03528afc
...
@@ -421,6 +421,7 @@ void OConnection::setupTransaction()
...
@@ -421,6 +421,7 @@ void OConnection::setupTransaction()
// is lost...
// is lost...
if
(
m_transactionHandle
)
if
(
m_transactionHandle
)
{
{
clearStatements
();
isc_rollback_transaction
(
status_vector
,
&
m_transactionHandle
);
isc_rollback_transaction
(
status_vector
,
&
m_transactionHandle
);
}
}
...
@@ -454,9 +455,6 @@ void OConnection::setupTransaction()
...
@@ -454,9 +455,6 @@ void OConnection::setupTransaction()
isc_start_transaction
(
status_vector
,
&
m_transactionHandle
,
1
,
&
m_DBHandler
,
isc_start_transaction
(
status_vector
,
&
m_transactionHandle
,
1
,
&
m_DBHandler
,
(
unsigned
short
)
sizeof
(
isc_tpb
),
isc_tpb
);
(
unsigned
short
)
sizeof
(
isc_tpb
),
isc_tpb
);
//TODO: transmit to open statements?
}
}
isc_tr_handle
&
OConnection
::
getTransaction
()
isc_tr_handle
&
OConnection
::
getTransaction
()
...
@@ -478,6 +476,7 @@ void SAL_CALL OConnection::commit() throw(SQLException, RuntimeException)
...
@@ -478,6 +476,7 @@ void SAL_CALL OConnection::commit() throw(SQLException, RuntimeException)
if
(
!
m_bAutoCommit
&&
m_transactionHandle
)
if
(
!
m_bAutoCommit
&&
m_transactionHandle
)
{
{
clearStatements
();
isc_commit_transaction
(
status_vector
,
&
m_transactionHandle
);
isc_commit_transaction
(
status_vector
,
&
m_transactionHandle
);
}
}
}
}
...
@@ -613,6 +612,7 @@ void SAL_CALL OConnection::documentEventOccured( const DocumentEvent& _Event )
...
@@ -613,6 +612,7 @@ void SAL_CALL OConnection::documentEventOccured( const DocumentEvent& _Event )
{
{
if
(
_Event
.
EventName
==
"OnSave"
||
_Event
.
EventName
==
"OnSaveAs"
)
if
(
_Event
.
EventName
==
"OnSave"
||
_Event
.
EventName
==
"OnSaveAs"
)
{
{
commit
();
// Commit and close transaction
if
(
m_bIsEmbedded
&&
m_xEmbeddedStorage
.
is
()
)
if
(
m_bIsEmbedded
&&
m_xEmbeddedStorage
.
is
()
)
{
{
SAL_INFO
(
"connectivity.firebird"
,
"Writing .fdb into .odb"
);
SAL_INFO
(
"connectivity.firebird"
,
"Writing .fdb into .odb"
);
...
@@ -698,13 +698,7 @@ void OConnection::disposing()
...
@@ -698,13 +698,7 @@ void OConnection::disposing()
MutexGuard
aGuard
(
m_aMutex
);
MutexGuard
aGuard
(
m_aMutex
);
for
(
OWeakRefArray
::
iterator
i
=
m_aStatements
.
begin
();
m_aStatements
.
end
()
!=
i
;
++
i
)
clearStatements
();
{
Reference
<
XComponent
>
xComp
(
i
->
get
(),
UNO_QUERY
);
if
(
xComp
.
is
())
xComp
->
dispose
();
}
m_aStatements
.
clear
();
m_bClosed
=
sal_True
;
m_bClosed
=
sal_True
;
m_xMetaData
=
::
com
::
sun
::
star
::
uno
::
WeakReference
<
::
com
::
sun
::
star
::
sdbc
::
XDatabaseMetaData
>
();
m_xMetaData
=
::
com
::
sun
::
star
::
uno
::
WeakReference
<
::
com
::
sun
::
star
::
sdbc
::
XDatabaseMetaData
>
();
...
@@ -734,4 +728,15 @@ void OConnection::disposing()
...
@@ -734,4 +728,15 @@ void OConnection::disposing()
cppu
::
WeakComponentImplHelperBase
::
disposing
();
cppu
::
WeakComponentImplHelperBase
::
disposing
();
}
}
void
OConnection
::
clearStatements
()
{
MutexGuard
aGuard
(
m_aMutex
);
for
(
OWeakRefArray
::
iterator
i
=
m_aStatements
.
begin
();
m_aStatements
.
end
()
!=
i
;
++
i
)
{
Reference
<
XComponent
>
xComp
(
i
->
get
(),
UNO_QUERY
);
if
(
xComp
.
is
())
xComp
->
dispose
();
}
m_aStatements
.
clear
();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
connectivity/source/drivers/firebird/Connection.hxx
Dosyayı görüntüle @
03528afc
...
@@ -112,6 +112,7 @@ namespace connectivity
...
@@ -112,6 +112,7 @@ namespace connectivity
void
buildTypeInfo
()
throw
(
::
com
::
sun
::
star
::
sdbc
::
SQLException
);
void
buildTypeInfo
()
throw
(
::
com
::
sun
::
star
::
sdbc
::
SQLException
);
void
setupTransaction
();
void
setupTransaction
();
void
clearStatements
();
public
:
public
:
virtual
void
construct
(
const
::
rtl
::
OUString
&
url
,
virtual
void
construct
(
const
::
rtl
::
OUString
&
url
,
const
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
com
::
sun
::
star
::
beans
::
PropertyValue
>&
info
)
const
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
com
::
sun
::
star
::
beans
::
PropertyValue
>&
info
)
...
...
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