[improvement](storage) For debugging problems: add session variable skip_storage_engine_merge to treat agg and unique data model as dup model (#11952)
For debug purpose: Add session variable skip_storage_engine_merge, when set to true, tables of aggregate key model and unique key model will be read as duplicate key model. Add session variable skip_delete_predicate, when set to true, rows deleted with delete statement will be selected.
This commit is contained in:
@ -455,7 +455,9 @@ public class Util {
|
||||
}
|
||||
|
||||
public static boolean showHiddenColumns() {
|
||||
return ConnectContext.get() != null && ConnectContext.get().getSessionVariable().showHiddenColumns();
|
||||
return ConnectContext.get() != null && (
|
||||
ConnectContext.get().getSessionVariable().showHiddenColumns()
|
||||
|| ConnectContext.get().getSessionVariable().skipStorageEngineMerge());
|
||||
}
|
||||
|
||||
public static String escapeSingleRegex(String s) {
|
||||
|
||||
@ -211,6 +211,10 @@ public class SessionVariable implements Serializable, Writable {
|
||||
|
||||
public static final String ENABLE_LOCAL_EXCHANGE = "enable_local_exchange";
|
||||
|
||||
public static final String SKIP_STORAGE_ENGINE_MERGE = "skip_storage_engine_merge";
|
||||
|
||||
public static final String SKIP_DELETE_PREDICATE = "skip_delete_predicate";
|
||||
|
||||
// session origin value
|
||||
public Map<Field, String> sessionOriginValue = new HashMap<Field, String>();
|
||||
// check stmt is or not [select /*+ SET_VAR(...)*/ ...]
|
||||
@ -530,6 +534,18 @@ public class SessionVariable implements Serializable, Writable {
|
||||
@VariableMgr.VarAttr(name = ENABLE_LOCAL_EXCHANGE)
|
||||
public boolean enableLocalExchange = false;
|
||||
|
||||
/**
|
||||
* For debugg purpose, dont' merge unique key and agg key when reading data.
|
||||
*/
|
||||
@VariableMgr.VarAttr(name = SKIP_STORAGE_ENGINE_MERGE)
|
||||
public boolean skipStorageEngineMerge = false;
|
||||
|
||||
/**
|
||||
* For debugg purpose, skip delte predicate when reading data.
|
||||
*/
|
||||
@VariableMgr.VarAttr(name = SKIP_DELETE_PREDICATE)
|
||||
public boolean skipDeletePredicate = false;
|
||||
|
||||
public String getBlockEncryptionMode() {
|
||||
return blockEncryptionMode;
|
||||
}
|
||||
@ -843,6 +859,10 @@ public class SessionVariable implements Serializable, Writable {
|
||||
this.showHiddenColumns = showHiddenColumns;
|
||||
}
|
||||
|
||||
public boolean skipStorageEngineMerge() {
|
||||
return skipStorageEngineMerge;
|
||||
}
|
||||
|
||||
public boolean isAllowPartitionColumnNullable() {
|
||||
return allowPartitionColumnNullable;
|
||||
}
|
||||
@ -1124,6 +1144,10 @@ public class SessionVariable implements Serializable, Writable {
|
||||
tResult.setFragmentTransmissionCompressionCodec(fragmentTransmissionCompressionCodec);
|
||||
tResult.setEnableLocalExchange(enableLocalExchange);
|
||||
|
||||
tResult.setSkipStorageEngineMerge(skipStorageEngineMerge);
|
||||
|
||||
tResult.setSkipDeletePredicate(skipDeletePredicate);
|
||||
|
||||
return tResult;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user