Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
RekGRpth committed Oct 31, 2024
1 parent 36e9099 commit 3a7f5b1
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/quotamodel.c
Original file line number Diff line number Diff line change
Expand Up @@ -935,8 +935,7 @@ calculate_table_disk_usage(StringInfo active_oids, bool is_init)
* calculate the file size for active table and update namespace_size_map
* and role_size_map
*/
bool connected;
SPI_connect_wrapper(&connected);
bool connected = SPI_connect_wrapper();

if ((plan = SPI_prepare(sql.data, 1, (Oid[]){OIDOID})) == NULL)
ereport(ERROR, (errmsg("[diskquota] SPI_prepare(\"%s\") failed", sql.data)));
Expand Down Expand Up @@ -1359,9 +1358,8 @@ dispatch_rejectmap(char *active_oids)
"ARRAY[%s]::oid[]) from gp_dist_random('gp_id')",
active_oids);

bool connected;
SPI_connect_wrapper(&connected);
int ret = SPI_execute(sql.data, false, 0);
bool connected = SPI_connect_wrapper();
int ret = SPI_execute(sql.data, false, 0);
if (ret != SPI_OK_SELECT)
ereport(ERROR, (errcode(ERRCODE_INTERNAL_ERROR),
errmsg("[diskquota] diskquota.refresh_rejectmap SPI_execute failed: error code %d", ret)));
Expand Down

0 comments on commit 3a7f5b1

Please sign in to comment.