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

Commite91c75d

Browse files
committed
Fix bug in handling duplicate values in vops_populate
1 parent867493e commite91c75d

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
@@ -1514,7 +1514,7 @@ Datum vops_populate(PG_FUNCTION_ARGS)
15141514
for (i=0;i<n_attrs;i++) {
15151515
if (types[i].tid!=VOPS_LAST) {
15161516
vops_tile_hdr*tile=DatumGetVops(values[i]);
1517-
tile->empty_mask|= (uint64)~0 <<j;
1517+
tile->empty_mask= (uint64)~0 <<j;
15181518
}
15191519
}
15201520
insert_tuple(values,nulls);
@@ -1569,7 +1569,7 @@ Datum vops_populate(PG_FUNCTION_ARGS)
15691569
for (i=0;i<n_attrs;i++) {
15701570
if (types[i].tid!=VOPS_LAST) {
15711571
vops_tile_hdr*tile=DatumGetVops(values[i]);
1572-
tile->empty_mask|= (uint64)~0 <<j;
1572+
tile->empty_mask= (uint64)~0 <<j;
15731573
}
15741574
}
15751575
}
@@ -1673,6 +1673,12 @@ Datum vops_import(PG_FUNCTION_ARGS)
16731673
for (j=0,loaded=0;fgets(buf,sizeofbuf,in)!=NULL;loaded++,vops_import_lineno++,j++) {
16741674
char*p=buf;
16751675
if (j==TILE_SIZE) {
1676+
for (k=0;k<n_attrs;k++) {
1677+
if (types[k].tid!=VOPS_LAST) {
1678+
vops_tile_hdr*tile=DatumGetVops(values[k]);
1679+
tile->empty_mask=0;
1680+
}
1681+
}
16761682
insert_tuple(values,nulls);
16771683
j=0;
16781684
}
@@ -1734,7 +1740,7 @@ Datum vops_import(PG_FUNCTION_ARGS)
17341740
for (k=0;k<n_attrs;k++) {
17351741
if (types[k].tid!=VOPS_LAST) {
17361742
vops_tile_hdr*tile=DatumGetVops(values[k]);
1737-
tile->empty_mask|= (uint64)~0 <<j;
1743+
tile->empty_mask= (uint64)~0 <<j;
17381744
}
17391745
}
17401746
insert_tuple(values,nulls);
@@ -1816,7 +1822,7 @@ Datum vops_import(PG_FUNCTION_ARGS)
18161822
for (i=0;i<n_attrs;i++) {
18171823
if (types[i].tid!=VOPS_LAST) {
18181824
vops_tile_hdr*tile=DatumGetVops(values[i]);
1819-
tile->empty_mask|= (uint64)~0 <<j;
1825+
tile->empty_mask= (uint64)~0 <<j;
18201826
}
18211827
}
18221828
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp