修复on update场景在sqlbypass下的问题
This commit is contained in:
@ -368,6 +368,7 @@ lreplace:
|
||||
ItemPointer tupleid = NULL;
|
||||
bool *temp_isnull = NULL;
|
||||
Datum *temp_values;
|
||||
int temp_nvalid = m_local.m_reslot->tts_nvalid;
|
||||
relkind = result_rel_info->ri_RelationDesc->rd_rel->relkind;
|
||||
result_rel_info = result_rel_info + m_c_local.m_estate->result_rel_index;
|
||||
if (relkind == RELKIND_RELATION || RELKIND_IS_SEQUENCE(relkind)) {
|
||||
@ -392,6 +393,7 @@ lreplace:
|
||||
}
|
||||
m_local.m_reslot->tts_isnull = temp_isnull;
|
||||
m_local.m_reslot->tts_values = temp_values;
|
||||
m_local.m_reslot->tts_nvalid = temp_nvalid;
|
||||
}
|
||||
|
||||
if (rel->rd_att->constr) {
|
||||
|
||||
@ -784,6 +784,20 @@ select * from bypass_pt_update order by a;
|
||||
9 | 2
|
||||
(8 rows)
|
||||
|
||||
drop table bypass_pt_update;
|
||||
create table bypass_pt_update (a int primary key, c text, d timestamp(0) with time zone default current_timestamp(0) on update current_timestamp(0));
|
||||
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "bypass_pt_update_pkey" for table "bypass_pt_update"
|
||||
insert into bypass_pt_update select 1, 'sdawa';
|
||||
explain (costs off) update bypass_pt_update set c = 'sdawa' where a = 1;
|
||||
QUERY PLAN
|
||||
------------------------------------------------------------------
|
||||
[Bypass]
|
||||
Update on bypass_pt_update
|
||||
-> Index Scan using bypass_pt_update_pkey on bypass_pt_update
|
||||
Index Cond: (a = 1)
|
||||
(4 rows)
|
||||
|
||||
update bypass_pt_update set c = 'sdawa' where a = 1;
|
||||
drop table bypass_pt_update;
|
||||
set sql_beta_feature='a_style_coerce';
|
||||
set enable_partition_opfusion = off;
|
||||
|
||||
@ -328,6 +328,13 @@ update bypass_pt_update set a = 9 where a = 2;
|
||||
select * from bypass_pt_update order by a;
|
||||
|
||||
drop table bypass_pt_update;
|
||||
|
||||
create table bypass_pt_update (a int primary key, c text, d timestamp(0) with time zone default current_timestamp(0) on update current_timestamp(0));
|
||||
insert into bypass_pt_update select 1, 'sdawa';
|
||||
explain (costs off) update bypass_pt_update set c = 'sdawa' where a = 1;
|
||||
update bypass_pt_update set c = 'sdawa' where a = 1;
|
||||
drop table bypass_pt_update;
|
||||
|
||||
set sql_beta_feature='a_style_coerce';
|
||||
set enable_partition_opfusion = off;
|
||||
set enable_opfusion = off;
|
||||
|
||||
Reference in New Issue
Block a user