Skip to content

Commit d0d128d

Browse files
committed
change update test suite
1 parent b609c5f commit d0d128d

File tree

3 files changed

+41
-16
lines changed

3 files changed

+41
-16
lines changed

src/partition_filter.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1173,6 +1173,7 @@ append_rri_to_estate(EState *estate, ResultRelInfo *rri)
11731173
{
11741174
ResultRelInfo *rri_array = estate->es_result_relations;
11751175

1176+
/* HACK: we can't repalloc or free previous array (there might be users) */
11761177
result_rels_allocated = result_rels_allocated * ALLOC_EXP + 1;
11771178
estate->es_result_relations = palloc(result_rels_allocated *
11781179
sizeof(ResultRelInfo));
Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,4 @@
1-
#!/usr/bin/bash
2-
3-
4-
rndstr=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 13 ; echo '')
5-
bindir=$($PG_CONFIG --bindir)
6-
dbname=$1
7-
flname=pathman_objects_$rndstr.txt
8-
9-
# show file name
10-
echo $flname
11-
12-
$bindir/psql $dbname << EOF
13-
14-
\o $flname
1+
CREATE EXTENSION IF NOT EXISTS pg_pathman;
152

163
SELECT pg_get_functiondef(objid)
174
FROM pg_catalog.pg_depend JOIN pg_proc ON pg_proc.oid = pg_depend.objid
@@ -27,5 +14,3 @@ ORDER BY objid::regprocedure::TEXT ASC;
2714
\d+ pathman_partition_list
2815
\d+ pathman_cache_stats
2916
\d+ pathman_concurrent_part_tasks
30-
31-
EOF

tests/update/get_sql_diff

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/usr/bin/env bash
2+
3+
PG_VER=$1
4+
WORK_DIR=/tmp/pg_pathman
5+
BRANCH_1=$2
6+
BRANCH_2=$3
7+
8+
9+
if [ -z "$PG_VER" ]; then
10+
PG_VER=10
11+
fi
12+
13+
if [ -z "$BRANCH_1" ]; then
14+
BRANCH_1=master
15+
fi
16+
17+
if [ -z "$BRANCH_1" ]; then
18+
BRANCH_2=$(git tag | sort -V | tail -1)
19+
fi
20+
21+
22+
printf "PG:\\t$PG_VER\\n"
23+
printf "BRANCH_1:\\t$BRANCH_1\\n"
24+
printf "BRANCH_2:\\t$BRANCH_2\\n"
25+
26+
27+
cp -R "$(dirname $0)" "$WORK_DIR"
28+
29+
git checkout "$BRANCH_1"
30+
31+
norsu pgxs "$PG_VER" -- clean install
32+
norsu run "$PG_VER" --pgxs --psql < "$WORK_DIR"/dump_pathman_objects.sql > "$WORK_DIR"/dump_1
33+
34+
git checkout "$BRANCH_2"
35+
36+
norsu pgxs "$PG_VER" -- clean install
37+
norsu run "$PG_VER" --pgxs --psql < "$WORK_DIR"/dump_pathman_objects.sql > "$WORK_DIR"/dump_2
38+
39+
diff -u "$WORK_DIR"/dump_1 "$WORK_DIR"/dump_2 > "$WORK_DIR"/diff

0 commit comments

Comments
 (0)