提交 2637bb3e 编写于 作者: J Jialun Du

Fix resource group bypass test case

- Remove async session before CREATE FUNCTION
- Change comment format from -- to /* */

(cherry picked from commit 1cc742247cc4de314941624cfac9e8676bc71100)
上级 584acc63
......@@ -104,14 +104,14 @@ ALTER RESOURCE GROUP rg_bypass_test SET concurrency 0;
-- gp_resource_group_bypass is not allowed inside a function
--
61: DROP FUNCTION IF EXISTS func_resgroup_bypass_test(int);
61: CREATE FUNCTION func_resgroup_bypass_test(c1 int) RETURNS INT AS $$
SET gp_resource_group_bypass TO ON; -- inside a function
SELECT 1
$$ LANGUAGE SQL;
61: SELECT func_resgroup_bypass_test(1);
61: DROP FUNCTION func_resgroup_bypass_test(int);
61q:
DROP FUNCTION IF EXISTS func_resgroup_bypass_test(int);
CREATE FUNCTION func_resgroup_bypass_test(c1 int) RETURNS INT AS $$
SET gp_resource_group_bypass TO ON; /* inside a function */
SELECT 1
$$ LANGUAGE SQL;
SELECT func_resgroup_bypass_test(1);
DROP FUNCTION func_resgroup_bypass_test(int);
--
-- memory limit in bypass mode, on qd
......
......@@ -117,7 +117,7 @@ off
61: BEGIN;
BEGIN
61: SET gp_resource_group_bypass to on;
ERROR: SET gp_resource_group_bypass cannot run inside a transaction block
ERROR: SET gp_resource_group_bypass cannot run inside a transaction block (guc_gp.c:5891)
61: ABORT;
ABORT
61q: ... <quitting>
......@@ -126,16 +126,16 @@ ABORT
-- gp_resource_group_bypass is not allowed inside a function
--
61: DROP FUNCTION IF EXISTS func_resgroup_bypass_test(int);
DROP FUNCTION IF EXISTS func_resgroup_bypass_test(int);
DROP
61: CREATE FUNCTION func_resgroup_bypass_test(c1 int) RETURNS INT AS $$ SET gp_resource_group_bypass TO ON; -- inside a function SELECT 1 $$ LANGUAGE SQL;
CREATE FUNCTION func_resgroup_bypass_test(c1 int) RETURNS INT AS $$ SET gp_resource_group_bypass TO ON; /* inside a function */ SELECT 1 $$ LANGUAGE SQL;
CREATE
61: SELECT func_resgroup_bypass_test(1);
ERROR: SET gp_resource_group_bypass cannot run inside a transaction block
SELECT func_resgroup_bypass_test(1);
ERROR: SET gp_resource_group_bypass cannot run inside a transaction block (guc_gp.c:5891)
CONTEXT: SQL function "func_resgroup_bypass_test" statement 1
61: DROP FUNCTION func_resgroup_bypass_test(int);
DROP FUNCTION func_resgroup_bypass_test(int);
DROP
61q: ... <quitting>
--
-- memory limit in bypass mode, on qd
......@@ -254,8 +254,9 @@ rg_bypass_test|1 |0
(2 rows)
61: SELECT * FROM eat_memory_on_one_slice;
ERROR: Out of memory (seg0 slice1 127.0.0.1:25432 pid=336)
DETAIL: Resource group memory limit reached
CONTEXT: SQL function "hold_memory" statement 1
DETAIL:
Resource group memory limit reached
SQL function "hold_memory" statement 1
SELECT * FROM memory_result;
rsgname |ismaster|avg_mem
--------------+--------+-------
......@@ -308,8 +309,9 @@ rg_bypass_test|1 |0
(2 rows)
61: SELECT * FROM eat_memory_on_slices;
ERROR: Out of memory (seg0 slice2 127.0.0.1:25432 pid=354)
DETAIL: Resource group memory limit reached
CONTEXT: SQL function "hold_memory" statement 1
DETAIL:
Resource group memory limit reached
SQL function "hold_memory" statement 1
SELECT * FROM memory_result;
rsgname |ismaster|avg_mem
--------------+--------+-------
......
......@@ -117,7 +117,7 @@ off
61: BEGIN;
BEGIN
61: SET gp_resource_group_bypass to on;
ERROR: SET gp_resource_group_bypass cannot run inside a transaction block
ERROR: SET gp_resource_group_bypass cannot run inside a transaction block (guc_gp.c:5891)
61: ABORT;
ABORT
61q: ... <quitting>
......@@ -126,16 +126,16 @@ ABORT
-- gp_resource_group_bypass is not allowed inside a function
--
61: DROP FUNCTION IF EXISTS func_resgroup_bypass_test(int);
DROP FUNCTION IF EXISTS func_resgroup_bypass_test(int);
DROP
61: CREATE FUNCTION func_resgroup_bypass_test(c1 int) RETURNS INT AS $$ SET gp_resource_group_bypass TO ON; -- inside a function SELECT 1 $$ LANGUAGE SQL;
CREATE FUNCTION func_resgroup_bypass_test(c1 int) RETURNS INT AS $$ SET gp_resource_group_bypass TO ON; /* inside a function */ SELECT 1 $$ LANGUAGE SQL;
CREATE
61: SELECT func_resgroup_bypass_test(1);
ERROR: SET gp_resource_group_bypass cannot run inside a transaction block
SELECT func_resgroup_bypass_test(1);
ERROR: SET gp_resource_group_bypass cannot run inside a transaction block (guc_gp.c:5891)
CONTEXT: SQL function "func_resgroup_bypass_test" statement 1
61: DROP FUNCTION func_resgroup_bypass_test(int);
DROP FUNCTION func_resgroup_bypass_test(int);
DROP
61q: ... <quitting>
--
-- memory limit in bypass mode, on qd
......@@ -250,8 +250,9 @@ rg_bypass_test|1 |0
(2 rows)
61: SELECT * FROM eat_memory_on_one_slice;
ERROR: Out of memory (seg0 slice1 127.0.0.1:25432 pid=336)
DETAIL: Resource group memory limit reached
CONTEXT: SQL function "hold_memory" statement 1
DETAIL:
Resource group memory limit reached
SQL function "hold_memory" statement 1
SELECT * FROM memory_result;
rsgname |ismaster|avg_mem
--------------+--------+-------
......@@ -304,8 +305,9 @@ rg_bypass_test|1 |0
(2 rows)
61: SELECT * FROM eat_memory_on_slices;
ERROR: Out of memory (seg0 slice2 127.0.0.1:25432 pid=354)
DETAIL: Resource group memory limit reached
CONTEXT: SQL function "hold_memory" statement 1
DETAIL:
Resource group memory limit reached
SQL function "hold_memory" statement 1
SELECT * FROM memory_result;
rsgname |ismaster|avg_mem
--------------+--------+-------
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册