mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 22:03:03 +01:00
Do not allow to create BLOBs or set generators from read-only transactions.
This should finally close SF#750664
This commit is contained in:
parent
9e503fb2fd
commit
c59ba8cfe5
@ -33,7 +33,7 @@
|
||||
*
|
||||
*/
|
||||
/*
|
||||
$Id: blb.cpp,v 1.46 2004-01-03 10:59:40 robocop Exp $
|
||||
$Id: blb.cpp,v 1.47 2004-01-09 01:51:27 skidder Exp $
|
||||
*/
|
||||
|
||||
#include "firebird.h"
|
||||
@ -198,6 +198,8 @@ BLB BLB_create2(TDBB tdbb,
|
||||
|
||||
if (dbb->dbb_flags & DBB_read_only)
|
||||
ERR_post(isc_read_only_database, 0);
|
||||
if (transaction->tra_flags & TRA_readonly)
|
||||
ERR_post(isc_read_only_trans, 0);
|
||||
|
||||
/* Create a blob large enough to hold a single data page */
|
||||
SSHORT from, to;
|
||||
|
@ -1122,6 +1122,10 @@ SINT64 DPM_gen_id(TDBB tdbb, SLONG generator, USHORT initialize, SINT64 val)
|
||||
CCH_RELEASE(tdbb, &window);
|
||||
ERR_post(isc_read_only_database, 0);
|
||||
}
|
||||
if (tdbb->tdbb_transaction && (tdbb->tdbb_transaction->tra_flags & TRA_readonly)) {
|
||||
CCH_RELEASE(tdbb, &window);
|
||||
ERR_post(isc_read_only_trans, 0);
|
||||
}
|
||||
CCH_MARK(tdbb, &window);
|
||||
|
||||
/* Initialize or increment the quad value in an ODS 10 or later
|
||||
|
Loading…
Reference in New Issue
Block a user