[
https://issues.apache.org/jira/browse/HAWQ-328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15101025#comment-15101025
]
Ruilong Huo commented on HAWQ-328:
----------------------------------
I would prefer the later solution since:
1. Both HAWQ-328 and HAWQ-133 have the synced status: Open/In progress before
they are addressed, or Closed after they are addressed.
2. We get a chance to verify if the fix works for both scenarios.
> plsql loop three times exit abnormality
> ---------------------------------------
>
> Key: HAWQ-328
> URL: https://issues.apache.org/jira/browse/HAWQ-328
> Project: Apache HAWQ
> Issue Type: Bug
> Components: Catalog
> Reporter: longgeligelong
> Assignee: Ruilong Huo
> Priority: Blocker
>
> plsql of hawq loop three times exit abnormality.
> Add print in code, Then I found when program looped third time, before
> running line 824 in src/backend/executor/execMain.c, the value of
> queryDesc->plannedstmt->resource->type is 1050. After running this line the
> value became a random number. But after running this line in the tirst two
> loop, the value is still 1050. Because queryDesc is not a actual parameter
> of prepareDispatchedCatalogRelation in line 824, I cannot continue to keep
> track of code.
> stdour and stderr as below :
> psql:test_plsql_loop.sql:66: NOTICE: for loop: quantity here is 1
> psql:test_plsql_loop.sql:66: NOTICE: FOR LOOP: ROW HERE IS (14929)
> psql:test_plsql_loop.sql:66: NOTICE: for loop: quantity here is 2
> psql:test_plsql_loop.sql:66: NOTICE: FOR LOOP: ROW HERE is (14929)
> psql:test_plsql_loop.sql:66: NOTICE: for loop: quantity here is 3
> psql:test_plsql_loop.sql:66: ERROR: could not serialize unrecognized node
> type: 38814640 (outfast.c:4742)
> CONTEXT: SQL statement "SELECT COUNT(1) FROM oiq_t_2"
> PL/pgSQL function "func2" line 11 at SQL statement
> plsql code as below:
> CREATE OR REPLACE FUNCTION funcloop() RETURNS text AS $func$
> DECLARE
> rowvar RECORD;
> BEGIN
> FOR i IN 1..10 LOOP
> RAISE NOTICE 'loop: quantity here is %', i;
> SELECT COUNT(1) INTO rowvar FROM oiq_t_2;
> RAISE NOTICE 'FOR LOOP: ROW HERE IS %', rowvar;
> END LOOP;
> return rowvar;
> END;
> $func$ LANGUAGE plpgsql;
> select funcloop();
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)