mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 21:23:03 +01:00
Fix the problem reported by Dmitry Kovalenko.
This commit is contained in:
parent
c6945aeaf0
commit
9119a7bc27
@ -2647,8 +2647,11 @@ ISC_STATUS API_ROUTINE isc_dsql_prepare_m(ISC_STATUS* userStatus, FB_API_HANDLE*
|
||||
|
||||
try
|
||||
{
|
||||
RefPtr<YTransaction> transaction(translateHandle(transactions, traHandle));
|
||||
RefPtr<YStatement> statement(translateHandle(statements, stmtHandle));
|
||||
RefPtr<YTransaction> transaction;
|
||||
|
||||
if (traHandle && *traHandle)
|
||||
transaction = translateHandle(transactions, traHandle);
|
||||
|
||||
statement->prepare(&status, transaction, stmtLength, sqlStmt, dialect,
|
||||
itemLength, reinterpret_cast<const UCHAR*>(items),
|
||||
@ -3911,7 +3914,7 @@ YStatement* YStatement::prepare(Status* status, ITransaction* transaction,
|
||||
if (!sqlStmt)
|
||||
Arg::Gds(isc_command_end_err).raise();
|
||||
|
||||
ITransaction* trans = YTransaction::getNext(transaction, attachment);
|
||||
ITransaction* trans = transaction ? YTransaction::getNext(transaction, attachment) : NULL;
|
||||
|
||||
IStatement* newStmt = next->prepare(status, trans, stmtLength, sqlStmt, dialect,
|
||||
itemLength, items, bufferLength, buffer);
|
||||
|
Loading…
Reference in New Issue
Block a user