[ https://issues.apache.org/jira/browse/HAWQ-328?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ruilong Huo resolved HAWQ-328. ------------------------------ Resolution: Fixed This issue has been fixed. Refer to HAWQ-412 for details. > 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: Core > Affects Versions: 2.0.0-beta-incubating > Reporter: longgeligelong > Assignee: Ruilong Huo > Priority: Blocker > Fix For: 2.0.0 > > > 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)