|
From: <asf...@us...> - 2014-08-01 16:22:42
|
Revision: 59948
http://sourceforge.net/p/firebird/code/59948
Author: asfernandes
Date: 2014-08-01 16:22:37 +0000 (Fri, 01 Aug 2014)
Log Message:
-----------
Fixed the restore of packaged routines.
Modified Paths:
--------------
firebird/trunk/src/jrd/vio.cpp
Modified: firebird/trunk/src/jrd/vio.cpp
===================================================================
--- firebird/trunk/src/jrd/vio.cpp 2014-08-01 00:34:51 UTC (rev 59947)
+++ firebird/trunk/src/jrd/vio.cpp 2014-08-01 16:22:37 UTC (rev 59948)
@@ -3132,9 +3132,10 @@
} // scope
set_system_flag(tdbb, rpb->rpb_record, f_prc_sys_flag);
+ set_owner_name(tdbb, rpb->rpb_record, f_prc_owner);
+
if (package_name.isEmpty())
{
- set_owner_name(tdbb, rpb->rpb_record, f_prc_owner);
if (set_security_class(tdbb, rpb->rpb_record, f_prc_class))
DFW_post_work(transaction, dfw_grant, &desc, obj_procedure);
}
@@ -3160,9 +3161,10 @@
} // scope
set_system_flag(tdbb, rpb->rpb_record, f_fun_sys_flag);
+ set_owner_name(tdbb, rpb->rpb_record, f_fun_owner);
+
if (package_name.isEmpty())
{
- set_owner_name(tdbb, rpb->rpb_record, f_fun_owner);
if (set_security_class(tdbb, rpb->rpb_record, f_fun_class))
DFW_post_work(transaction, dfw_grant, &desc, obj_udf);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <hv...@us...> - 2014-08-06 08:55:51
|
Revision: 59958
http://sourceforge.net/p/firebird/code/59958
Author: hvlad
Date: 2014-08-06 08:55:47 +0000 (Wed, 06 Aug 2014)
Log Message:
-----------
Missing notification of gc thread.
Modified Paths:
--------------
firebird/trunk/src/jrd/vio.cpp
Modified: firebird/trunk/src/jrd/vio.cpp
===================================================================
--- firebird/trunk/src/jrd/vio.cpp 2014-08-06 02:12:01 UTC (rev 59957)
+++ firebird/trunk/src/jrd/vio.cpp 2014-08-06 08:55:47 UTC (rev 59958)
@@ -3892,6 +3892,14 @@
transaction->tra_flags |= TRA_perform_autocommit;
tdbb->bumpRelStats(RuntimeStatistics::RECORD_LOCKS, relation->rel_id);
+
+ // VIO_writelock
+ if ((tdbb->getDatabase()->dbb_flags & DBB_gc_background) &&
+ !org_rpb->rpb_relation->isTemporary())
+ {
+ notify_garbage_collector(tdbb, org_rpb, transaction->tra_number);
+ }
+
return true;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <di...@us...> - 2014-08-08 15:28:07
|
Revision: 59961
http://sourceforge.net/p/firebird/code/59961
Author: dimitr
Date: 2014-08-08 15:27:59 +0000 (Fri, 08 Aug 2014)
Log Message:
-----------
Fixed possible deadlocks between a worker thread and an attachment-level AST.
Modified Paths:
--------------
firebird/trunk/src/jrd/vio.cpp
Modified: firebird/trunk/src/jrd/vio.cpp
===================================================================
--- firebird/trunk/src/jrd/vio.cpp 2014-08-08 01:24:47 UTC (rev 59960)
+++ firebird/trunk/src/jrd/vio.cpp 2014-08-08 15:27:59 UTC (rev 59961)
@@ -2069,6 +2069,8 @@
**************************************/
SET_TDBB(tdbb);
+ Attachment* const attachment = tdbb->getAttachment();
+
#ifdef VIO_DEBUG
VIO_trace(DEBUG_TRACE,
"VIO_get_current (record_param %"QUADFORMAT"d, transaction %"ULONGFORMAT", pool %p)\n",
@@ -2145,6 +2147,7 @@
VIO_backout(tdbb, rpb, transaction);
continue;
case tra_precommitted:
+ Attachment::Checkout cout(attachment, FB_FUNCTION);
THREAD_SLEEP(100); // milliseconds
continue;
}
@@ -2170,6 +2173,7 @@
if (state == tra_active)
{
+ Attachment::Checkout cout(attachment, FB_FUNCTION);
THREAD_SLEEP(100); // milliseconds
continue;
}
@@ -5090,6 +5094,8 @@
**************************************/
SET_TDBB(tdbb);
+ Attachment* const attachment = tdbb->getAttachment();
+
#ifdef VIO_DEBUG
VIO_trace(DEBUG_TRACE_ALL,
"prepare_update (transaction %"ULONGFORMAT
@@ -5369,6 +5375,7 @@
if (state == tra_active)
{
+ Attachment::Checkout cout(attachment, FB_FUNCTION);
THREAD_SLEEP(100); // milliseconds
continue;
}
@@ -5431,9 +5438,13 @@
}
if (state == tra_precommitted)
+ {
+ Attachment::Checkout cout(attachment, FB_FUNCTION);
THREAD_SLEEP(100); // milliseconds
- else
- VIO_backout(tdbb, rpb, transaction);
+ continue;
+ }
+
+ VIO_backout(tdbb, rpb, transaction);
}
return PREPARE_OK;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <di...@us...> - 2014-09-01 08:29:08
|
Revision: 60019
http://sourceforge.net/p/firebird/code/60019
Author: dimitr
Date: 2014-09-01 08:29:04 +0000 (Mon, 01 Sep 2014)
Log Message:
-----------
Count record reads performed by the IDX code.
Modified Paths:
--------------
firebird/trunk/src/jrd/vio.cpp
Modified: firebird/trunk/src/jrd/vio.cpp
===================================================================
--- firebird/trunk/src/jrd/vio.cpp 2014-08-30 01:29:50 UTC (rev 60018)
+++ firebird/trunk/src/jrd/vio.cpp 2014-09-01 08:29:04 UTC (rev 60019)
@@ -2090,6 +2090,8 @@
rec_tx_active = false;
+ bool counted = false;
+
while (true)
{
// If the record doesn't exist, no problem.
@@ -2113,6 +2115,12 @@
else
VIO_data(tdbb, rpb, pool);
+ if (!counted)
+ {
+ tdbb->bumpRelStats(RuntimeStatistics::RECORD_IDX_READS, rpb->rpb_relation->rel_id);
+ counted = true;
+ }
+
// If we deleted the record, everything's fine, otherwise
// the record must be considered real.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <di...@us...> - 2014-11-09 16:41:00
|
Revision: 60183
http://sourceforge.net/p/firebird/code/60183
Author: dimitr
Date: 2014-11-09 16:40:52 +0000 (Sun, 09 Nov 2014)
Log Message:
-----------
Relaxed system tables protection for cases UPDATE ... SET RDB$*_SOURCE = NULL. So far nullification is allowed for views/packages/procedures/functions/triggers only. I'm not sure somebody really needs hiding sources for defaults and check constraints, but this can be supported later, if required. This is a temporary solution, intended to be replaced with something more clever (e.g. special permissions or new DDL command) in v4.
Modified Paths:
--------------
firebird/trunk/src/jrd/vio.cpp
Modified: firebird/trunk/src/jrd/vio.cpp
===================================================================
--- firebird/trunk/src/jrd/vio.cpp 2014-11-09 14:47:08 UTC (rev 60182)
+++ firebird/trunk/src/jrd/vio.cpp 2014-11-09 16:40:52 UTC (rev 60183)
@@ -95,6 +95,7 @@
using namespace Firebird;
static void check_class(thread_db*, jrd_tra*, record_param*, record_param*, USHORT);
+static bool check_nullify_source(record_param*, record_param*, USHORT);
static void check_owner(thread_db*, jrd_tra*, record_param*, record_param*, USHORT);
static bool check_user(thread_db*, const dsc*);
static int check_precommitted(const jrd_tra*, const record_param*);
@@ -2501,7 +2502,8 @@
break;
case rel_relations:
- protect_system_table_delupd(tdbb, relation, "UPDATE");
+ if (!check_nullify_source(org_rpb, new_rpb, f_rel_source))
+ protect_system_table_delupd(tdbb, relation, "UPDATE");
EVL_field(0, org_rpb->rpb_record, f_rel_name, &desc1);
SCL_check_relation(tdbb, &desc1, SCL_alter);
check_class(tdbb, transaction, org_rpb, new_rpb, f_rel_class);
@@ -2510,7 +2512,8 @@
break;
case rel_packages:
- protect_system_table_delupd(tdbb, relation, "UPDATE");
+ if (!check_nullify_source(org_rpb, new_rpb, f_pkg_header_source))
+ protect_system_table_delupd(tdbb, relation, "UPDATE");
if (EVL_field(0, org_rpb->rpb_record, f_pkg_name, &desc1))
SCL_check_package(tdbb, &desc1, SCL_alter);
check_class(tdbb, transaction, org_rpb, new_rpb, f_pkg_class);
@@ -2518,7 +2521,8 @@
break;
case rel_procedures:
- protect_system_table_delupd(tdbb, relation, "UPDATE");
+ if (!check_nullify_source(org_rpb, new_rpb, f_prc_source))
+ protect_system_table_delupd(tdbb, relation, "UPDATE");
EVL_field(0, org_rpb->rpb_record, f_prc_name, &desc1);
if (EVL_field(0, org_rpb->rpb_record, f_prc_pkg_name, &desc2))
@@ -2543,7 +2547,8 @@
break;
case rel_funs:
- protect_system_table_delupd(tdbb, relation, "UPDATE");
+ if (!check_nullify_source(org_rpb, new_rpb, f_fun_source))
+ protect_system_table_delupd(tdbb, relation, "UPDATE");
EVL_field(0, org_rpb->rpb_record, f_fun_name, &desc1);
if (EVL_field(0, org_rpb->rpb_record, f_fun_pkg_name, &desc2))
@@ -2670,7 +2675,8 @@
break;
case rel_triggers:
- protect_system_table_delupd(tdbb, relation, "UPDATE");
+ if (!check_nullify_source(org_rpb, new_rpb, f_trg_source))
+ protect_system_table_delupd(tdbb, relation, "UPDATE");
EVL_field(0, new_rpb->rpb_record, f_trg_rname, &desc1);
SCL_check_relation(tdbb, &desc1, SCL_control);
@@ -4057,6 +4063,45 @@
}
+/**************************************
+ *
+ * c h e c k _ n u l l i f y _ s o u r c e
+ *
+ **************************************
+ *
+ * Functional description
+ * A record in a system relation containing a source blob is
+ * being changed. Check to see if only the source blob has changed,
+ * and if so, validate whether it was an assignment to NULL.
+ *
+ **************************************/
+static bool check_nullify_source(record_param* org_rpb, record_param* new_rpb, USHORT field_id)
+{
+ bool nullify_found = false;
+
+ dsc org_desc, new_desc;
+ for (USHORT iter = 0; iter < org_rpb->rpb_record->rec_format->fmt_count; ++iter)
+ {
+ const bool org_null = !EVL_field(NULL, org_rpb->rpb_record, iter, &org_desc);
+ const bool new_null = !EVL_field(NULL, new_rpb->rpb_record, iter, &new_desc);
+
+ if (iter == field_id && new_null)
+ {
+ fb_assert(org_desc.dsc_dtype == dtype_blob);
+ fb_assert(new_desc.dsc_dtype == dtype_blob);
+
+ nullify_found = true;
+ continue;
+ }
+
+ if (org_null != new_null || MOV_compare(&org_desc, &new_desc))
+ return false;
+ }
+
+ return nullify_found;
+}
+
+
static void check_owner(thread_db* tdbb,
jrd_tra* transaction,
record_param* old_rpb, record_param* new_rpb, USHORT id)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <di...@us...> - 2014-11-30 16:00:26
|
Revision: 60313
http://sourceforge.net/p/firebird/code/60313
Author: dimitr
Date: 2014-11-30 16:00:19 +0000 (Sun, 30 Nov 2014)
Log Message:
-----------
Simplest possible fix for CORE-4618: Rollback doesn`t undo changes when MERGE statement updates the same target rows multiple times and PLAN MERGE is used. An alternative solution is being considered.
Modified Paths:
--------------
firebird/trunk/src/jrd/vio.cpp
Modified: firebird/trunk/src/jrd/vio.cpp
===================================================================
--- firebird/trunk/src/jrd/vio.cpp 2014-11-30 15:50:00 UTC (rev 60312)
+++ firebird/trunk/src/jrd/vio.cpp 2014-11-30 16:00:19 UTC (rev 60313)
@@ -2753,7 +2753,7 @@
// We're about to modify the record. Post a refetch request
// to all the active cursors positioned at this record.
- invalidate_cursor_records(transaction, org_rpb);
+ invalidate_cursor_records(transaction, new_rpb);
// hvlad: prepare_update() take EX lock on data page. Subsequent call of
// IDX_modify_flag_uk_modified() will read database - if relation's partners
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sta...@us...> - 2014-12-30 08:17:27
|
Revision: 60454
http://sourceforge.net/p/firebird/code/60454
Author: starodubov
Date: 2014-12-30 08:17:19 +0000 (Tue, 30 Dec 2014)
Log Message:
-----------
Fixed CORE-4656: Server could hang during chasing dead record version
Modified Paths:
--------------
firebird/trunk/src/jrd/vio.cpp
Modified: firebird/trunk/src/jrd/vio.cpp
===================================================================
--- firebird/trunk/src/jrd/vio.cpp 2014-12-30 00:16:00 UTC (rev 60453)
+++ firebird/trunk/src/jrd/vio.cpp 2014-12-30 08:17:19 UTC (rev 60454)
@@ -842,7 +842,8 @@
if (rpb->rpb_b_page != temp.rpb_b_page || rpb->rpb_b_line != temp.rpb_b_line ||
rpb->rpb_f_page != temp.rpb_f_page || rpb->rpb_f_line != temp.rpb_f_line ||
- rpb->rpb_flags != temp.rpb_flags)
+ rpb->rpb_flags != temp.rpb_flags &&
+ !(state == tra_dead && rpb->rpb_flags == (temp.rpb_flags | rpb_gc_active)) )
{
CCH_RELEASE(tdbb, &rpb->getWindow(tdbb));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <asf...@us...> - 2015-01-12 00:21:14
|
Revision: 60484
http://sourceforge.net/p/firebird/code/60484
Author: asfernandes
Date: 2015-01-12 00:21:07 +0000 (Mon, 12 Jan 2015)
Log Message:
-----------
Correction.
Modified Paths:
--------------
firebird/trunk/src/jrd/vio.cpp
Modified: firebird/trunk/src/jrd/vio.cpp
===================================================================
--- firebird/trunk/src/jrd/vio.cpp 2015-01-12 00:04:14 UTC (rev 60483)
+++ firebird/trunk/src/jrd/vio.cpp 2015-01-12 00:21:07 UTC (rev 60484)
@@ -843,7 +843,7 @@
if (rpb->rpb_b_page != temp.rpb_b_page || rpb->rpb_b_line != temp.rpb_b_line ||
rpb->rpb_f_page != temp.rpb_f_page || rpb->rpb_f_line != temp.rpb_f_line ||
(rpb->rpb_flags != temp.rpb_flags &&
- !(state == tra_dead && rpb->rpb_flags == (temp.rpb_flags | rpb_gc_active)))
+ !(state == tra_dead && rpb->rpb_flags == (temp.rpb_flags | rpb_gc_active))))
{
CCH_RELEASE(tdbb, &rpb->getWindow(tdbb));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <hv...@us...> - 2015-03-18 17:26:59
|
Revision: 61005
http://sourceforge.net/p/firebird/code/61005
Author: hvlad
Date: 2015-03-18 17:26:56 +0000 (Wed, 18 Mar 2015)
Log Message:
-----------
Fixed bug CORE-4713 : "BLOB not found" error at rollback after insert into table with expression index
Modified Paths:
--------------
firebird/trunk/src/jrd/vio.cpp
Modified: firebird/trunk/src/jrd/vio.cpp
===================================================================
--- firebird/trunk/src/jrd/vio.cpp 2015-03-18 17:22:48 UTC (rev 61004)
+++ firebird/trunk/src/jrd/vio.cpp 2015-03-18 17:26:56 UTC (rev 61005)
@@ -475,8 +475,8 @@
DPM_backout_mark(tdbb, rpb, transaction);
RecordStack empty_staying;
+ IDX_garbage_collect(tdbb, rpb, going, empty_staying);
BLB_garbage_collect(tdbb, going, empty_staying, rpb->rpb_page, relation);
- IDX_garbage_collect(tdbb, rpb, going, empty_staying);
going.pop();
if (!DPM_get(tdbb, rpb, LCK_write))
@@ -512,8 +512,8 @@
rpb->rpb_prior = NULL;
list_staying(tdbb, rpb, staying);
+ IDX_garbage_collect(tdbb, rpb, going, staying);
BLB_garbage_collect(tdbb, going, staying, rpb->rpb_page, relation);
- IDX_garbage_collect(tdbb, rpb, going, staying);
if (going.hasData())
going.pop();
@@ -4454,8 +4454,8 @@
JRD_reschedule(tdbb, 0, true);
}
+ IDX_garbage_collect(tdbb, rpb, going, staying);
BLB_garbage_collect(tdbb, going, staying, prior_page, rpb->rpb_relation);
- IDX_garbage_collect(tdbb, rpb, going, staying);
clearRecordStack(going);
}
@@ -4495,8 +4495,8 @@
going.push(old_data ? old_data : org_rpb->rpb_record);
+ IDX_garbage_collect(tdbb, org_rpb, going, staying);
BLB_garbage_collect(tdbb, going, staying, org_rpb->rpb_page, org_rpb->rpb_relation);
- IDX_garbage_collect(tdbb, org_rpb, going, staying);
going.pop();
@@ -5902,8 +5902,8 @@
RecordStack going;
going.push(org_rpb->rpb_record);
+ IDX_garbage_collect(tdbb, org_rpb, going, staying);
BLB_garbage_collect(tdbb, going, staying, org_rpb->rpb_page, relation);
- IDX_garbage_collect(tdbb, org_rpb, going, staying);
staying.pop();
clearRecordStack(staying);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ro...@us...> - 2015-03-24 01:30:22
|
Revision: 61074
http://sourceforge.net/p/firebird/code/61074
Author: robocop
Date: 2015-03-24 01:30:20 +0000 (Tue, 24 Mar 2015)
Log Message:
-----------
Misc.
Modified Paths:
--------------
firebird/trunk/src/jrd/vio.cpp
Modified: firebird/trunk/src/jrd/vio.cpp
===================================================================
--- firebird/trunk/src/jrd/vio.cpp 2015-03-24 00:55:21 UTC (rev 61073)
+++ firebird/trunk/src/jrd/vio.cpp 2015-03-24 01:30:20 UTC (rev 61074)
@@ -2690,7 +2690,7 @@
((old_rel_flags = MOV_get_long(&desc2, 0)) != new_rel_flags))
{
DFW_post_work(transaction,
- new_rel_flags & FILE_backing_up ? dfw_begin_backup : dfw_end_backup,
+ (new_rel_flags & FILE_backing_up ? dfw_begin_backup : dfw_end_backup),
&desc1, 0);
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ale...@us...> - 2015-04-01 15:10:17
|
Revision: 61200
http://sourceforge.net/p/firebird/code/61200
Author: alexpeshkoff
Date: 2015-04-01 15:10:06 +0000 (Wed, 01 Apr 2015)
Log Message:
-----------
Fixes assertion in DFW, caused by uninitialized descriptor
Modified Paths:
--------------
firebird/trunk/src/jrd/vio.cpp
Modified: firebird/trunk/src/jrd/vio.cpp
===================================================================
--- firebird/trunk/src/jrd/vio.cpp 2015-04-01 13:17:54 UTC (rev 61199)
+++ firebird/trunk/src/jrd/vio.cpp 2015-04-01 15:10:06 UTC (rev 61200)
@@ -3093,7 +3093,7 @@
case rel_database:
if (set_security_class(tdbb, rpb->rpb_record, f_dat_class))
- DFW_post_work(transaction, dfw_grant, &desc, obj_database);
+ DFW_post_work(transaction, dfw_grant, "", obj_database);
break;
case rel_relations:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ale...@us...> - 2015-04-15 14:01:35
|
Revision: 61325
http://sourceforge.net/p/firebird/code/61325
Author: alexpeshkoff
Date: 2015-04-15 14:01:24 +0000 (Wed, 15 Apr 2015)
Log Message:
-----------
Fixed CORE-4715: Restore of shadowed database fails using -k ("restore without shadow") switch
Modified Paths:
--------------
firebird/trunk/src/jrd/vio.cpp
Modified: firebird/trunk/src/jrd/vio.cpp
===================================================================
--- firebird/trunk/src/jrd/vio.cpp 2015-04-15 13:19:18 UTC (rev 61324)
+++ firebird/trunk/src/jrd/vio.cpp 2015-04-15 14:01:24 UTC (rev 61325)
@@ -187,17 +187,29 @@
protect_system_table_delupd(tdbb, relation, op, true);
}
-// The only table whose contents gbak might delete is RDB$INDEX_SEGMENTS if it detects
-// inconsistencies while restoring. Used in VIO_erase.
+// Used in VIO_erase.
inline void check_gbak_cheating_delete(thread_db* tdbb, const jrd_rel* relation)
{
const Attachment* const attachment = tdbb->getAttachment();
- // TDBB_dont_post_dfw signals that we are in DFW.
- if (attachment->isGbak() &&
- (!(attachment->att_flags & ATT_creator) ||
- relation->rel_id != rel_segments && !(tdbb->tdbb_flags & TDBB_dont_post_dfw)))
+ if (attachment->isGbak())
{
+ if (attachment->att_flags & ATT_creator)
+ {
+ // TDBB_dont_post_dfw signals that we are in DFW.
+ if (tdbb->tdbb_flags & TDBB_dont_post_dfw)
+ return;
+
+ // There are 2 tables whose contents gbak might delete:
+ // - RDB$INDEX_SEGMENTS if it detects inconsistencies while restoring
+ // - RDB$FILES if switch -k is set
+ switch(relation->rel_id)
+ {
+ case rel_segments:
+ case rel_files:
+ return;
+ }
+ }
protect_system_table_delupd(tdbb, relation, "DELETE", true);
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ale...@us...> - 2015-04-16 11:58:26
|
Revision: 61334
http://sourceforge.net/p/firebird/code/61334
Author: alexpeshkoff
Date: 2015-04-16 11:58:19 +0000 (Thu, 16 Apr 2015)
Log Message:
-----------
Postfix for CORE-4731
Modified Paths:
--------------
firebird/trunk/src/jrd/vio.cpp
Modified: firebird/trunk/src/jrd/vio.cpp
===================================================================
--- firebird/trunk/src/jrd/vio.cpp 2015-04-15 22:10:06 UTC (rev 61333)
+++ firebird/trunk/src/jrd/vio.cpp 2015-04-16 11:58:19 UTC (rev 61334)
@@ -3229,6 +3229,7 @@
break;
case rel_indices:
+ protect_system_table_insert(tdbb, request, relation);
EVL_field(0, rpb->rpb_record, f_idx_relation, &desc);
SCL_check_relation(tdbb, &desc, SCL_control);
EVL_field(0, rpb->rpb_record, f_idx_name, &desc);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ale...@us...> - 2015-04-20 11:42:24
|
Revision: 61368
http://sourceforge.net/p/firebird/code/61368
Author: alexpeshkoff
Date: 2015-04-20 11:42:17 +0000 (Mon, 20 Apr 2015)
Log Message:
-----------
Write-protect one more system relation
Modified Paths:
--------------
firebird/trunk/src/jrd/vio.cpp
Modified: firebird/trunk/src/jrd/vio.cpp
===================================================================
--- firebird/trunk/src/jrd/vio.cpp 2015-04-20 09:36:29 UTC (rev 61367)
+++ firebird/trunk/src/jrd/vio.cpp 2015-04-20 11:42:17 UTC (rev 61368)
@@ -3245,6 +3245,7 @@
break;
case rel_rfr:
+ protect_system_table_insert(tdbb, request, relation);
EVL_field(0, rpb->rpb_record, f_rfr_rname, &desc);
SCL_check_relation(tdbb, &desc, SCL_control);
DFW_post_work(transaction, dfw_update_format, &desc, 0);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ale...@us...> - 2015-04-27 13:15:52
|
Revision: 61456
http://sourceforge.net/p/firebird/code/61456
Author: alexpeshkoff
Date: 2015-04-27 13:15:44 +0000 (Mon, 27 Apr 2015)
Log Message:
-----------
Check for source nullifying a bit more accurate
Modified Paths:
--------------
firebird/trunk/src/jrd/vio.cpp
Modified: firebird/trunk/src/jrd/vio.cpp
===================================================================
--- firebird/trunk/src/jrd/vio.cpp 2015-04-27 12:36:09 UTC (rev 61455)
+++ firebird/trunk/src/jrd/vio.cpp 2015-04-27 13:15:44 UTC (rev 61456)
@@ -4149,7 +4149,7 @@
const bool org_null = !EVL_field(NULL, org_rpb->rpb_record, iter, &org_desc);
const bool new_null = !EVL_field(NULL, new_rpb->rpb_record, iter, &new_desc);
- if (iter == field_id && new_null)
+ if (iter == field_id && new_null && (!org_null))
{
fb_assert(org_desc.dsc_dtype == dtype_blob);
fb_assert(new_desc.dsc_dtype == dtype_blob);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <hv...@us...> - 2015-07-03 08:05:20
|
Revision: 61927
http://sourceforge.net/p/firebird/code/61927
Author: hvlad
Date: 2015-07-03 08:05:18 +0000 (Fri, 03 Jul 2015)
Log Message:
-----------
Wrong check, thanks to Claudio
Modified Paths:
--------------
firebird/trunk/src/jrd/vio.cpp
Modified: firebird/trunk/src/jrd/vio.cpp
===================================================================
--- firebird/trunk/src/jrd/vio.cpp 2015-07-03 08:03:50 UTC (rev 61926)
+++ firebird/trunk/src/jrd/vio.cpp 2015-07-03 08:05:18 UTC (rev 61927)
@@ -200,7 +200,7 @@
return false;
vec<Lock*>* vector = transaction->tra_relation_locks;
- if (!vector || vector->count() < relation->rel_id)
+ if (!vector || relation->rel_id >= vector->count())
return false;
Lock* lock = (*vector)[relation->rel_id];
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <di...@us...> - 2015-08-18 10:00:54
|
Revision: 62109
http://sourceforge.net/p/firebird/code/62109
Author: dimitr
Date: 2015-08-18 10:00:52 +0000 (Tue, 18 Aug 2015)
Log Message:
-----------
Totally misc.
Modified Paths:
--------------
firebird/trunk/src/jrd/vio.cpp
Modified: firebird/trunk/src/jrd/vio.cpp
===================================================================
--- firebird/trunk/src/jrd/vio.cpp 2015-08-17 00:08:28 UTC (rev 62108)
+++ firebird/trunk/src/jrd/vio.cpp 2015-08-18 10:00:52 UTC (rev 62109)
@@ -3573,8 +3573,8 @@
rpb.rpb_stream_flags = RPB_s_no_data | RPB_s_sweeper;
rpb.getWindow(tdbb).win_flags = WIN_large_scan;
- jrd_rel* relation = 0; // wasn't initialized: memory problem in catch () part.
- vec<jrd_rel*>* vector = 0;
+ jrd_rel* relation = NULL; // wasn't initialized: memory problem in catch () part.
+ vec<jrd_rel*>* vector = NULL;
GarbageCollector* gc = dbb->dbb_garbage_collector;
bool ret = true;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <di...@us...> - 2015-10-06 12:10:46
|
Revision: 62313
http://sourceforge.net/p/firebird/code/62313
Author: dimitr
Date: 2015-10-06 12:10:44 +0000 (Tue, 06 Oct 2015)
Log Message:
-----------
Fixed setting RDB$PACKAGE_BODY_SOURCE to NULL.
Modified Paths:
--------------
firebird/trunk/src/jrd/vio.cpp
Modified: firebird/trunk/src/jrd/vio.cpp
===================================================================
--- firebird/trunk/src/jrd/vio.cpp 2015-10-06 10:58:56 UTC (rev 62312)
+++ firebird/trunk/src/jrd/vio.cpp 2015-10-06 12:10:44 UTC (rev 62313)
@@ -95,7 +95,7 @@
using namespace Firebird;
static void check_class(thread_db*, jrd_tra*, record_param*, record_param*, USHORT);
-static bool check_nullify_source(thread_db*, record_param*, record_param*, USHORT);
+static bool check_nullify_source(thread_db*, record_param*, record_param*, int, int = -1);
static void check_owner(thread_db*, jrd_tra*, record_param*, record_param*, USHORT);
static bool check_user(thread_db*, const dsc*);
static int check_precommitted(const jrd_tra*, const record_param*);
@@ -2602,7 +2602,7 @@
break;
case rel_packages:
- if (!check_nullify_source(tdbb, org_rpb, new_rpb, f_pkg_header_source))
+ if (!check_nullify_source(tdbb, org_rpb, new_rpb, f_pkg_header_source, f_pkg_body_source))
protect_system_table_delupd(tdbb, relation, "UPDATE");
if (EVL_field(0, org_rpb->rpb_record, f_pkg_name, &desc1))
SCL_check_package(tdbb, &desc1, SCL_alter);
@@ -4236,7 +4236,7 @@
*
**************************************/
static bool check_nullify_source(thread_db* tdbb, record_param* org_rpb, record_param* new_rpb,
- USHORT field_id)
+ int field_id_1, int field_id_2)
{
if (!tdbb->getAttachment()->locksmith())
return false;
@@ -4249,13 +4249,17 @@
const bool org_null = !EVL_field(NULL, org_rpb->rpb_record, iter, &org_desc);
const bool new_null = !EVL_field(NULL, new_rpb->rpb_record, iter, &new_desc);
- if (iter == field_id && new_null && !org_null)
+ if ((field_id_1 >= 0 && iter == (USHORT) field_id_1) ||
+ (field_id_2 >= 0 && iter == (USHORT) field_id_2))
{
fb_assert(org_desc.dsc_dtype == dtype_blob);
fb_assert(new_desc.dsc_dtype == dtype_blob);
- nullify_found = true;
- continue;
+ if (new_null && !org_null)
+ {
+ nullify_found = true;
+ continue;
+ }
}
if (org_null != new_null || MOV_compare(&org_desc, &new_desc))
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <hv...@us...> - 2016-02-12 13:13:13
|
Revision: 62965
http://sourceforge.net/p/firebird/code/62965
Author: hvlad
Date: 2016-02-12 13:13:11 +0000 (Fri, 12 Feb 2016)
Log Message:
-----------
Simplest fix for bug CORE-5110 : False PK\FK violation could be reported when attachment used isc_dpb_no_garbage_collect flag
Modified Paths:
--------------
firebird/trunk/src/jrd/vio.cpp
Modified: firebird/trunk/src/jrd/vio.cpp
===================================================================
--- firebird/trunk/src/jrd/vio.cpp 2016-02-12 13:04:02 UTC (rev 62964)
+++ firebird/trunk/src/jrd/vio.cpp 2016-02-12 13:13:11 UTC (rev 62965)
@@ -2266,8 +2266,10 @@
case tra_committed:
return !(rpb->rpb_flags & rpb_deleted);
case tra_dead:
- if (transaction->tra_attachment->att_flags & ATT_no_cleanup)
- return !foreign_key;
+ // Run backout else false key violation could be reported, see CORE-5110
+ //
+ // if (transaction->tra_attachment->att_flags & ATT_no_cleanup)
+ // return !foreign_key;
{
jrd_rel::GCShared gcGuard(tdbb, rpb->rpb_relation);
@@ -2356,8 +2358,8 @@
return true;
case tra_dead:
- if (transaction->tra_attachment->att_flags & ATT_no_cleanup)
- return !foreign_key;
+ // if (transaction->tra_attachment->att_flags & ATT_no_cleanup)
+ // return !foreign_key;
{
jrd_rel::GCShared gcGuard(tdbb, rpb->rpb_relation);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|