[FEAT MERGE]implement user-defined rewrite rules

This commit is contained in:
obdev
2022-12-30 08:10:42 +00:00
committed by ob-robot
parent 21c0bac716
commit 9dcc0a529e
100 changed files with 5540 additions and 315 deletions

View File

@ -958,6 +958,15 @@ int ObGvSqlAudit::fill_cells(obmysql::ObMySQLRequestRecord &record)
cells[cell_idx].set_collation_type(ObCharset::get_default_collation(
ObCharset::get_default_charset()));
} break;
case RULE_NAME: {
if ((record.data_.rule_name_len_ > 0) && (NULL != record.data_.rule_name_)) {
cells[cell_idx].set_varchar(record.data_.rule_name_, record.data_.rule_name_len_);
} else {
cells[cell_idx].set_varchar("");
}
cells[cell_idx].set_collation_type(ObCharset::get_default_collation(
ObCharset::get_default_charset()));
} break;
default: {
ret = OB_ERR_UNEXPECTED;
SERVER_LOG(WARN, "invalid column id", K(ret), K(cell_idx), K(col_id));