Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6728123

Browse files
committed
Fix bug in handling duplicate values in vops_populate
1 parent58cb505 commit6728123

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

‎vops.c‎

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1491,7 +1491,7 @@ Datum vops_populate(PG_FUNCTION_ARGS)
14911491
for (i=0;i<n_attrs;i++) {
14921492
if (types[i].tid!=VOPS_LAST) {
14931493
vops_tile_hdr*tile= (vops_tile_hdr*)DatumGetPointer(values[i]);
1494-
tile->empty_mask|= (uint64)~0 <<j;
1494+
tile->empty_mask= (uint64)~0 <<j;
14951495
}
14961496
}
14971497
insert_tuple(values,nulls);
@@ -1546,7 +1546,7 @@ Datum vops_populate(PG_FUNCTION_ARGS)
15461546
for (i=0;i<n_attrs;i++) {
15471547
if (types[i].tid!=VOPS_LAST) {
15481548
vops_tile_hdr*tile= (vops_tile_hdr*)DatumGetPointer(values[i]);
1549-
tile->empty_mask|= (uint64)~0 <<j;
1549+
tile->empty_mask= (uint64)~0 <<j;
15501550
}
15511551
}
15521552
}
@@ -1650,6 +1650,12 @@ Datum vops_import(PG_FUNCTION_ARGS)
16501650
for (j=0,loaded=0;fgets(buf,sizeofbuf,in)!=NULL;loaded++,vops_import_lineno++,j++) {
16511651
char*p=buf;
16521652
if (j==TILE_SIZE) {
1653+
for (i=0;i<n_attrs;i++) {
1654+
if (types[i].tid!=VOPS_LAST) {
1655+
vops_tile_hdr*tile= (vops_tile_hdr*)DatumGetPointer(values[i]);
1656+
tile->empty_mask=0;
1657+
}
1658+
}
16531659
insert_tuple(values,nulls);
16541660
j=0;
16551661
}
@@ -1711,7 +1717,7 @@ Datum vops_import(PG_FUNCTION_ARGS)
17111717
for (k=0;k<n_attrs;k++) {
17121718
if (types[k].tid!=VOPS_LAST) {
17131719
vops_tile_hdr*tile= (vops_tile_hdr*)DatumGetPointer(values[k]);
1714-
tile->empty_mask|= (uint64)~0 <<j;
1720+
tile->empty_mask= (uint64)~0 <<j;
17151721
}
17161722
}
17171723
insert_tuple(values,nulls);
@@ -1793,7 +1799,7 @@ Datum vops_import(PG_FUNCTION_ARGS)
17931799
for (i=0;i<n_attrs;i++) {
17941800
if (types[i].tid!=VOPS_LAST) {
17951801
vops_tile_hdr*tile= (vops_tile_hdr*)DatumGetPointer(values[i]);
1796-
tile->empty_mask|= (uint64)~0 <<j;
1802+
tile->empty_mask= (uint64)~0 <<j;
17971803
}
17981804
}
17991805
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp