!6729 修复_outPlannedStmt函数逻辑错误
Merge pull request !6729 from james/gms_debug
This commit is contained in:
@ -579,7 +579,8 @@ static void _outPlannedStmt(StringInfo str, PlannedStmt* node)
|
||||
WRITE_INT_FIELD(gather_count);
|
||||
WRITE_INT_FIELD(num_nodes);
|
||||
|
||||
if (t_thrd.proc->workingVersionNum < 92097 || node->num_streams > 0 || IS_SPQ_RUNNING) {
|
||||
if ((t_thrd.proc->workingVersionNum < 92097 || node->num_streams > 0 || IS_SPQ_RUNNING) &&
|
||||
node->nodesDefinition != NULL) {
|
||||
for (int i = 0; i < node->num_nodes; i++) {
|
||||
/* Write the field name only one time and just append the value of each field */
|
||||
appendStringInfo(str, " :nodesDefinition[%d]", i);
|
||||
|
||||
20
src/test/regress/expected/outfuncs_bugfix.out
Normal file
20
src/test/regress/expected/outfuncs_bugfix.out
Normal file
@ -0,0 +1,20 @@
|
||||
set log_min_messages = debug5;
|
||||
set log_min_error_statement = debug5;
|
||||
alter system set debug_print_rewritten = on;
|
||||
alter system set debug_print_plan = on;
|
||||
drop table t1;
|
||||
ERROR: table "t1" does not exist
|
||||
create table t1(col1 int, col2 varchar(20));
|
||||
insert into t1 values (1,'tom'), (2,'daisy'), (3,'john');
|
||||
set query_dop=1004;
|
||||
select * from t1 limit 1;
|
||||
col1 | col2
|
||||
------+------
|
||||
1 | tom
|
||||
(1 row)
|
||||
|
||||
drop table t1;
|
||||
reset log_min_messages ;
|
||||
reset log_min_error_statement ;
|
||||
alter system set debug_print_rewritten = off;
|
||||
alter system set debug_print_plan = off;
|
||||
@ -127,6 +127,7 @@ test: single_node_tablespace
|
||||
#test startwith...connect by
|
||||
test: sw_prepare
|
||||
test: sw_basic sw_icbc sw_siblings sw_bugfix-1 sw_bugfix-2 sw_by_rownum_level sw_prior
|
||||
test: outfuncs_bugfix
|
||||
test: sw_clearup
|
||||
|
||||
# test customer base environment hint
|
||||
|
||||
17
src/test/regress/sql/outfuncs_bugfix.sql
Normal file
17
src/test/regress/sql/outfuncs_bugfix.sql
Normal file
@ -0,0 +1,17 @@
|
||||
set log_min_messages = debug5;
|
||||
set log_min_error_statement = debug5;
|
||||
alter system set debug_print_rewritten = on;
|
||||
alter system set debug_print_plan = on;
|
||||
|
||||
drop table t1;
|
||||
create table t1(col1 int, col2 varchar(20));
|
||||
insert into t1 values (1,'tom'), (2,'daisy'), (3,'john');
|
||||
set query_dop=1004;
|
||||
select * from t1 limit 1;
|
||||
drop table t1;
|
||||
|
||||
|
||||
reset log_min_messages ;
|
||||
reset log_min_error_statement ;
|
||||
alter system set debug_print_rewritten = off;
|
||||
alter system set debug_print_plan = off;
|
||||
Reference in New Issue
Block a user