Update of /cvsroot/monetdb/sql/src/storage/restrict
In directory
sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv28661/sql/src/storage/restrict
Modified Files:
Tag: SQL_2-24
restrict_logger.mx
Log Message:
Step 0 of my (not yet finished/successful) attempt to fix
[ 1976341 ] XQ: leftovers after deleting document
https://sourceforge.net/tracker/index.php?func=detail&aid=1976341&group_id=56967&atid=482468
0.a)
Changes the logger's internal "changes" counter
from type "unsigned int" to "size_t",
maily because that seems more natural for "changes"
counter that basically counts affected BUNs/tuples;
moreover, it simplifies part (b) below.
The logger's internal "logger_changes()" function
now also returns a "size_t" instead of an "unsigned int".
However, all it's wrapper functions (in MIL, in MAL,
and the "bl_changes()" & "ro_changes()" functions for the
"logger_functions" in SQL) still return an int ---
now properly casted and with "overflow protection".
0.b)
Made "logger_add_bat()" and "logger_del_bat()" increase
the "changes" by the BATcount() of the respective BAT
(plus 1 to handle empty BATs) to make sure that
BATs that hold shredded documents in Pathfinder are
(eventually) handled properly.
U restrict_logger.mx
Index: restrict_logger.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/storage/restrict/restrict_logger.mx,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -d -r1.2 -r1.2.2.1
--- restrict_logger.mx 20 May 2008 10:45:50 -0000 1.2
+++ restrict_logger.mx 5 Jun 2008 21:00:08 -0000 1.2.2.1
@@ -77,7 +77,7 @@
static int
bl_changes(void)
{
- return logger_changes(restrict_logger);
+ return (int) MIN(logger_changes(restrict_logger), GDK_int_max);
}
static int
@@ -97,7 +97,7 @@
static int
ro_changes(void)
{
- int c = logger_changes(restrict_logger);
+ int c = (int) MIN(logger_changes(restrict_logger), GDK_int_max);
assert(c==0);
return c;
}
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins