Details
-
Bug
-
Status: Resolved
-
Blocker
-
Resolution: Fixed
-
2.0.0.0-incubating
-
None
Description
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();
Attachments
Issue Links
- duplicates
-
HAWQ-133 core when use plpython udf
- Closed
- is related to
-
HAWQ-412 Allocate query resource for multiple EXECUTIONs in explicit and implicit prepared statement
- Closed
-
MADLIB-960 Test MADlib on HAWQ 2.0 beta build
- Resolved