diff --git a/src/logservice/libobcdc/src/ob_log_formatter.cpp b/src/logservice/libobcdc/src/ob_log_formatter.cpp index 66f89b5e6..fbcdf4a3e 100644 --- a/src/logservice/libobcdc/src/ob_log_formatter.cpp +++ b/src/logservice/libobcdc/src/ob_log_formatter.cpp @@ -1581,10 +1581,6 @@ int ObLogFormatter::build_binlog_record_( } else if (OB_ISNULL(br_data = br->get_data())) { ret = OB_INVALID_ARGUMENT; LOG_ERROR("binlog record data is invalid", KR(ret), K(br)); - } else if (OB_ISNULL(rv->new_column_array_) || OB_ISNULL(rv->old_column_array_)) { - ret = OB_INVALID_ARGUMENT; - LOG_ERROR("invalid row value, new_column_array or old_column_array is invalid", - K(rv->new_column_array_), K(rv->old_column_array_)); } else if (OB_FAIL(is_hbase_mode_put_(table_id, dml_flag, rv->column_num_, new_column_cnt, rv->contain_old_column_, is_hbase_mode_put))) { LOG_ERROR("is_hbase_mode_put_ fail", KR(ret), K(table_id), K(dml_flag), @@ -1603,6 +1599,10 @@ int ObLogFormatter::build_binlog_record_( "table_id", simple_table_schema->get_table_id()); // ignore table with no columns br->set_is_valid(false); + } else if (OB_ISNULL(rv->new_column_array_) || OB_ISNULL(rv->old_column_array_)) { + ret = OB_INVALID_ARGUMENT; + LOG_ERROR("invalid row value, new_column_array or old_column_array is invalid", + K(rv->new_column_array_), K(rv->old_column_array_)); } else { br_data->setNewColumn(rv->new_column_array_, static_cast(rv->column_num_)); br_data->setOldColumn(rv->old_column_array_, static_cast(rv->column_num_)); diff --git a/src/logservice/libobcdc/src/ob_log_meta_manager.cpp b/src/logservice/libobcdc/src/ob_log_meta_manager.cpp index 133b61cf0..7ea14f011 100644 --- a/src/logservice/libobcdc/src/ob_log_meta_manager.cpp +++ b/src/logservice/libobcdc/src/ob_log_meta_manager.cpp @@ -1709,9 +1709,12 @@ int ObLogMetaManager::set_unique_keys_(ITableMeta *table_meta, int64_t column_count = tb_schema_info.get_usr_column_count(); LOG_TRACE("set_unique_keys_ begin", KPC(table_schema), K(index_table_count), K(tb_schema_info)); if (column_count < 0) { + ret = OB_ERR_UNEXPECTED; LOG_ERROR("column_num is invalid", "table_name", table_schema->get_table_name(), "table_id", table_schema->get_table_id(), K(column_count)); - ret = OB_ERR_UNEXPECTED; + } else if (0 == column_count) { + LOG_INFO("ignore table without usr_column", "table_id", table_schema->get_table_id(), + "table_name", table_schema->get_table_name(), K(column_count) ); } else { if (index_table_count > 0) { int64_t is_uk_column_array_size = column_count * sizeof(bool);