Changeset: f2130cd53149 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f2130cd53149
Modified Files:
Branch: default
Log Message:
Merge with Apr2011 branch.
diffs (45 lines):
diff --git a/gdk/gdk_bat.mx b/gdk/gdk_bat.mx
--- a/gdk/gdk_bat.mx
+++ b/gdk/gdk_bat.mx
@@ -1640,6 +1640,7 @@
idx2 = last;
if (p != last) {
unsigned short hs = Hsize(b), ts = Tsize(b);
+ BATiter bi2 = bat_iterator(b);
@:acc_move(last,p,idx2,idx1)@
/* If a column was sorted before the BUN was
@@ -1651,7 +1652,7 @@
if p+1==last, the new value is now the
last, so no comparison is needed. */
if (b->hsorted & 1) {
- if (p + 1 < last && ATOMcmp(b->htype,
BUNhead(bi, p), BUNhead(bi, p + 1)) > 0) {
+ if (p + 1 < last && ATOMcmp(b->htype,
BUNhead(bi, p), BUNhead(bi2, p + 1)) > 0) {
b->hsorted = FALSE;
b->H->nosorted = idx1;
}
@@ -1660,13 +1661,13 @@
b->H->nodense = idx1;
}
} else if (b->hsorted == (bit) GDK_SORTED_REV) {
- if (p + 1 < last && ATOMcmp(b->htype,
BUNhead(bi, p), BUNhead(bi, p + 1)) < 0) {
+ if (p + 1 < last && ATOMcmp(b->htype,
BUNhead(bi, p), BUNhead(bi2, p + 1)) < 0) {
b->hsorted = FALSE;
b->H->nosorted_rev = idx1;
}
}
if (b->tsorted & 1) {
- if (p + 1 < last && ATOMcmp(b->ttype,
BUNtail(bi, p), BUNtail(bi, p + 1)) > 0) {
+ if (p + 1 < last && ATOMcmp(b->ttype,
BUNtail(bi, p), BUNtail(bi2, p + 1)) > 0) {
b->tsorted = FALSE;
b->H->nosorted = idx1;
}
@@ -1675,7 +1676,7 @@
b->T->nodense = idx1;
}
} else if (b->tsorted == (bit) GDK_SORTED_REV) {
- if (p + 1 < last && ATOMcmp(b->ttype,
BUNtail(bi, p), BUNtail(bi, p + 1)) < 0) {
+ if (p + 1 < last && ATOMcmp(b->ttype,
BUNtail(bi, p), BUNtail(bi2, p + 1)) < 0) {
b->tsorted = FALSE;
b->H->nosorted_rev = idx1;
}
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list