Skip to content

Commit

Permalink
Address a few compile-time errors and regression diffs (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
reshke authored Feb 1, 2025
1 parent e962535 commit 7751387
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
2 changes: 2 additions & 0 deletions docker/regress/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,6 @@ gpstop -a -i && gpstart -a

createdb $USER

sed -i '/mdb-related/,$d' src/test/regress/input/misc.source src/test/regress/output/misc.source src/test/regress/output/misc.source

PGPORT=6000 make installcheck
12 changes: 9 additions & 3 deletions src/backend/access/appendonly/aomd.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,13 @@ OpenAOSegmentFile(Relation aorel, const char *nspname, char *filepathname, int64

RelationOpenSmgr(aorel);

fd = aorel->rd_smgr->smgr_ao->smgr_AORelOpenSegFile(RelationGetRelid(aorel), nspname, RelationGetRelationName(aorel), filepathname, O_RDWR | PG_BINARY, 0600, modcount);
fd = aorel->rd_smgr->smgr_ao->smgr_AORelOpenSegFile(
RelationGetRelid(aorel),
nspname,
RelationGetRelationName(aorel),
filepathname,
fileFlags, 0600, modcount);

if (fd < 0)
{
if (logicalEof == 0 && errno == ENOENT)
Expand Down Expand Up @@ -320,8 +326,8 @@ copy_file(char *srcsegpath, char *dstsegpath,
{
File srcFile;
File dstFile;
struct f_smgr_ao *srcSmgr;
struct f_smgr_ao *dstSmgr;
const struct f_smgr_ao *srcSmgr;
const struct f_smgr_ao *dstSmgr;
int64 left;
off_t offset;
char *buffer = palloc(BLCKSZ);
Expand Down
4 changes: 2 additions & 2 deletions src/backend/cdb/cdbappendonlyxlog.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ ao_insert_replay(XLogRecord *record)
dbPath = GetDatabasePath(xlrec->target.node.dbNode,
xlrec->target.node.spcNode);

struct f_smgr_ao * smgrao_curr = smgrao();
const struct f_smgr_ao * smgrao_curr = smgrao();

if (xlrec->target.segment_filenum == 0)
snprintf(path, MAXPGPATH, "%s/%u", dbPath, xlrec->target.node.relNode);
Expand Down Expand Up @@ -166,7 +166,7 @@ ao_truncate_replay(XLogRecord *record)
dbPath = GetDatabasePath(xlrec->target.node.dbNode,
xlrec->target.node.spcNode);

struct f_smgr_ao * smgrao_curr = smgrao();
const struct f_smgr_ao * smgrao_curr = smgrao();

if (xlrec->target.segment_filenum == 0)
snprintf(path, MAXPGPATH, "%s/%u", dbPath, xlrec->target.node.relNode);
Expand Down
2 changes: 1 addition & 1 deletion src/test/regress/output/external_table.source
Original file line number Diff line number Diff line change
Expand Up @@ -4826,7 +4826,7 @@ LOCATION (
)
FORMAT 'CUSTOM' (formatter='gpformatter');
SELECT * FROM tbl_ext_gpformatter;
ERROR: unexpected end of file (fileam.c:1086) (seg0 slice1 127.0.1.1:6002 pid=155340) (fileam.c:1086)
ERROR: unexpected end of file (fileam.c:1096) (seg0 slice1 127.0.1.1:6002 pid=155340) (fileam.c:1086)
CONTEXT: External table tbl_ext_gpformatter
COMMIT;
--
Expand Down

0 comments on commit 7751387

Please sign in to comment.