Skip to content

Commit 04b143a

Browse files
Ev3ntbogdan.khavronin
andauthored
Postfix for #8430 (#8752)
* Fixed crash after calling incorrectly parametrized request * Patch: Fixed crash after calling incorrectly parametrized request * ALICE_print fix, isError flag added * Revert "ALICE_print fix, isError flag added" This reverts commit 24c74e1. * Fix incorrect order of procedure calls * `ALICE_print` was returned to previous state. Changed `EXE_two_phase` and `EXE_action` so that `tdgbl->uSvc->started()` works correctly. --------- Co-authored-by: bogdan.khavronin <[email protected]>
1 parent e8535b5 commit 04b143a

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/alice/exe.cpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ static const TEXT val_errors[] =
7171
int EXE_action(const TEXT* database, const SINT64 switches)
7272
{
7373
bool error = false;
74-
Firebird::AutoMemoryPool newPool(MemoryPool::createPool());
74+
AliceGlobals* tdgbl = AliceGlobals::getSpecific();
7575
{
76-
AliceGlobals* tdgbl = AliceGlobals::getSpecific();
76+
Firebird::AutoMemoryPool newPool(MemoryPool::createPool());
7777
AliceContextPoolHolder context(tdgbl, newPool);
7878

7979
for (USHORT i = 0; i < MAX_VAL_ERRORS; i++)
@@ -130,6 +130,8 @@ int EXE_action(const TEXT* database, const SINT64 switches)
130130
}
131131
}
132132

133+
tdgbl->uSvc->started();
134+
133135
return error ? FINI_ERROR : FINI_OK;
134136
}
135137

@@ -141,9 +143,9 @@ int EXE_action(const TEXT* database, const SINT64 switches)
141143
int EXE_two_phase(const TEXT* database, const SINT64 switches)
142144
{
143145
bool error = false;
144-
Firebird::AutoMemoryPool newPool(MemoryPool::createPool());
146+
AliceGlobals* tdgbl = AliceGlobals::getSpecific();
145147
{
146-
AliceGlobals* tdgbl = AliceGlobals::getSpecific();
148+
Firebird::AutoMemoryPool newPool(MemoryPool::createPool());
147149
AliceContextPoolHolder context(tdgbl, newPool);
148150

149151
for (USHORT i = 0; i < MAX_VAL_ERRORS; i++)
@@ -160,8 +162,6 @@ int EXE_two_phase(const TEXT* database, const SINT64 switches)
160162
isc_attach_database(tdgbl->status, 0, database, &handle,
161163
dpb.getBufferLength(), reinterpret_cast<const SCHAR*>(dpb.getBuffer()));
162164

163-
tdgbl->uSvc->started();
164-
165165
if (tdgbl->status[1])
166166
{
167167
error = true;
@@ -186,6 +186,8 @@ int EXE_two_phase(const TEXT* database, const SINT64 switches)
186186
}
187187
}
188188

189+
tdgbl->uSvc->started();
190+
189191
return (error ? FINI_ERROR : FINI_OK);
190192
}
191193

0 commit comments

Comments
 (0)