Changeset: 4fcf45f027df for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4fcf45f027df
Modified Files:
clients/Tests/MAL-signatures.stable.out
clients/Tests/MAL-signatures.stable.out.int128
clients/Tests/exports.stable.out
monetdb5/modules/atoms/blob.c
monetdb5/modules/atoms/blob.mal
sql/storage/store.c
sql/test/BugTracker-2016/Tests/convert-function-test.Bug-3460.stable.out
sql/test/BugTracker-2016/Tests/convert-function-test.Bug-3460.stable.out.int128
Branch: default
Log Message:
Merge with Dec2016 branch.
diffs (167 lines):
diff --git a/clients/Tests/MAL-signatures.stable.out
b/clients/Tests/MAL-signatures.stable.out
--- a/clients/Tests/MAL-signatures.stable.out
+++ b/clients/Tests/MAL-signatures.stable.out
@@ -6184,12 +6184,12 @@ Ready.
[ "bbp", "getRefCount", "command bbp.getRefCount(b:bat[:any_1]):int ",
"CMDgetBATrefcnt;", "Utility for debugging MAL interpreter" ]
[ "bbp", "getStatus", "command bbp.getStatus():bat[:str] ",
"CMDbbpStatus;", "Create a BAT with the disk/load status" ]
[ "bbp", "setName", "command bbp.setName(b:bat[:any_1], n:str):str
", "CMDsetName;", "Rename a BAT" ]
+[ "blob", "#cmp", "command blob.#cmp():void ", "BLOBcmp;", ""
]
[ "blob", "#del", "command blob.#del():void ", "BLOBdel;", ""
]
[ "blob", "#fromstr", "command blob.#fromstr():void ",
"BLOBfromstr;", "" ]
[ "blob", "#hash", "command blob.#hash():void ", "BLOBhash;",
"" ]
[ "blob", "#heap", "command blob.#heap():void ", "BLOBheap;",
"" ]
[ "blob", "#length", "command blob.#length():void ", "BLOBlength;",
"" ]
-[ "blob", "#nequal", "command blob.#nequal():void ", "BLOBnequal;",
"" ]
[ "blob", "#null", "command blob.#null():void ", "BLOBnull;",
"" ]
[ "blob", "#put", "command blob.#put():void ", "BLOBput;", ""
]
[ "blob", "#read", "command blob.#read():void ", "BLOBread;",
"" ]
diff --git a/clients/Tests/MAL-signatures.stable.out.int128
b/clients/Tests/MAL-signatures.stable.out.int128
--- a/clients/Tests/MAL-signatures.stable.out.int128
+++ b/clients/Tests/MAL-signatures.stable.out.int128
@@ -8153,12 +8153,12 @@ Ready.
[ "bbp", "getRefCount", "command bbp.getRefCount(b:bat[:any_1]):int ",
"CMDgetBATrefcnt;", "Utility for debugging MAL interpreter" ]
[ "bbp", "getStatus", "command bbp.getStatus():bat[:str] ",
"CMDbbpStatus;", "Create a BAT with the disk/load status" ]
[ "bbp", "setName", "command bbp.setName(b:bat[:any_1], n:str):str
", "CMDsetName;", "Rename a BAT" ]
+[ "blob", "#cmp", "command blob.#cmp():void ", "BLOBcmp;", ""
]
[ "blob", "#del", "command blob.#del():void ", "BLOBdel;", ""
]
[ "blob", "#fromstr", "command blob.#fromstr():void ",
"BLOBfromstr;", "" ]
[ "blob", "#hash", "command blob.#hash():void ", "BLOBhash;",
"" ]
[ "blob", "#heap", "command blob.#heap():void ", "BLOBheap;",
"" ]
[ "blob", "#length", "command blob.#length():void ", "BLOBlength;",
"" ]
-[ "blob", "#nequal", "command blob.#nequal():void ", "BLOBnequal;",
"" ]
[ "blob", "#null", "command blob.#null():void ", "BLOBnull;",
"" ]
[ "blob", "#put", "command blob.#put():void ", "BLOBput;", ""
]
[ "blob", "#read", "command blob.#read():void ", "BLOBread;",
"" ]
diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out
--- a/clients/Tests/exports.stable.out
+++ b/clients/Tests/exports.stable.out
@@ -819,6 +819,7 @@ str BKCsetkey(bat *res, const bat *bid,
str BKCshrinkBAT(bat *ret, const bat *bid, const bat *did);
str BLOBblob_blob(blob **d, blob **s);
str BLOBblob_fromstr(blob **b, str *d);
+int BLOBcmp(blob *l, blob *r);
void BLOBdel(Heap *h, var_t *index);
str BLOBfromblob(str *retval, blob **b);
str BLOBfromidx(str *retval, blob **binp, int *index);
@@ -827,7 +828,6 @@ int BLOBget(Heap *h, int *bun, int *l, b
BUN BLOBhash(blob *b);
void BLOBheap(Heap *heap, size_t capacity);
int BLOBlength(blob *p);
-int BLOBnequal(blob *l, blob *r);
str BLOBnitems(int *ret, blob *b);
blob *BLOBnull(void);
str BLOBprelude(void *ret);
diff --git a/monetdb5/modules/atoms/blob.c b/monetdb5/modules/atoms/blob.c
--- a/monetdb5/modules/atoms/blob.c
+++ b/monetdb5/modules/atoms/blob.c
@@ -39,7 +39,7 @@ mal_export str BLOBprelude(void *ret);
mal_export int BLOBtostr(str *tostr, int *l, blob *pin);
mal_export int BLOBfromstr(char *instr, int *l, blob **val);
-mal_export int BLOBnequal(blob *l, blob *r);
+mal_export int BLOBcmp(blob *l, blob *r);
mal_export BUN BLOBhash(blob *b);
mal_export blob * BLOBnull(void);
mal_export var_t BLOBput(Heap *h, var_t *bun, blob *val);
@@ -94,17 +94,17 @@ blob_put(Heap *h, var_t *bun, blob *val)
}
static int
-blob_nequal(blob *l, blob *r)
+blob_cmp(blob *l, blob *r)
{
size_t len = l->nitems;
if (len != r->nitems)
- return (1);
+ return len - r->nitems;
if (len == ~(size_t) 0)
return (0);
- return memcmp(l->data, r->data, len) != 0;
+ return memcmp(l->data, r->data, len);
}
static void
@@ -447,9 +447,9 @@ fromblob_idx(str *retval, blob *b, int *
* @-
*/
int
-BLOBnequal(blob *l, blob *r)
+BLOBcmp(blob *l, blob *r)
{
- return blob_nequal(l, r);
+ return blob_cmp(l, r);
}
void
diff --git a/monetdb5/modules/atoms/blob.mal b/monetdb5/modules/atoms/blob.mal
--- a/monetdb5/modules/atoms/blob.mal
+++ b/monetdb5/modules/atoms/blob.mal
@@ -10,7 +10,7 @@ atom blob;
command tostr() address BLOBtostr;
command fromstr() address BLOBfromstr;
-command nequal() address BLOBnequal;
+command cmp() address BLOBcmp;
command hash() address BLOBhash;
command null() address BLOBnull;
command read() address BLOBread;
diff --git a/sql/storage/store.c b/sql/storage/store.c
--- a/sql/storage/store.c
+++ b/sql/storage/store.c
@@ -1694,6 +1694,8 @@ store_needs_vacuum( sql_trans *tr )
sql_table *t = n->data;
sql_column *c = t->columns.set->h->data;
+ if (!t->system)
+ continue;
/* no inserts, updates and enough deletes ? */
if (!store_funcs.count_col(tr, c, 0) &&
!store_funcs.count_upd(tr, t) &&
@@ -1714,6 +1716,8 @@ store_vacuum( sql_trans *tr )
sql_table *t = n->data;
sql_column *c = t->columns.set->h->data;
+ if (!t->system)
+ continue;
if (!store_funcs.count_col(tr, c, 0) &&
!store_funcs.count_upd(tr, t) &&
store_funcs.count_del(tr, t) > 128) {
diff --git
a/sql/test/BugTracker-2016/Tests/convert-function-test.Bug-3460.stable.out
b/sql/test/BugTracker-2016/Tests/convert-function-test.Bug-3460.stable.out
--- a/sql/test/BugTracker-2016/Tests/convert-function-test.Bug-3460.stable.out
+++ b/sql/test/BugTracker-2016/Tests/convert-function-test.Bug-3460.stable.out
@@ -268,12 +268,12 @@ Ready.
% v # name
% blob # type
% 0 # length
+[ NULL ]
+[ ]
[ 00 ]
[ 11 ]
[ 0123456789 ]
[ A0B2C3D4F5 ]
-[ ]
-[ NULL ]
#SELECT v, convert(v, varchar(16)) from T_blob;
% sys.t_blob, sys.L3 # table_name
% v, L3 # name
diff --git
a/sql/test/BugTracker-2016/Tests/convert-function-test.Bug-3460.stable.out.int128
b/sql/test/BugTracker-2016/Tests/convert-function-test.Bug-3460.stable.out.int128
---
a/sql/test/BugTracker-2016/Tests/convert-function-test.Bug-3460.stable.out.int128
+++
b/sql/test/BugTracker-2016/Tests/convert-function-test.Bug-3460.stable.out.int128
@@ -292,12 +292,12 @@ Ready.
% v # name
% blob # type
% 0 # length
+[ NULL ]
+[ ]
[ 00 ]
[ 11 ]
[ 0123456789 ]
[ A0B2C3D4F5 ]
-[ ]
-[ NULL ]
#SELECT v, convert(v, varchar(16)) from T_blob;
% sys.t_blob, sys.L3 # table_name
% v, L3 # name
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list