提交 560dbb58 编写于 作者: A akaError 提交者: linzhigang.lzg

fix bux:oceanbase.__tenant_virtual_table_column definition result in ISNULL...

fix bux:oceanbase.__tenant_virtual_table_column definition result in ISNULL fail when rewrite stmt(#977)
上级 5404b976
......@@ -265,7 +265,7 @@ int ObTableColumns::fill_row_cells(const ObTableSchema& table_schema, const ObCo
CS_TYPE_BINARY != column_schema.get_collation_type()) {
cur_row_.cells_[cell_idx].set_varchar(ObCharset::collation_name(column_schema.get_collation_type()));
} else {
cur_row_.cells_[cell_idx].set_varchar(ObString("NULL"));
cur_row_.cells_[cell_idx].set_null();
}
cur_row_.cells_[cell_idx].set_collation_type(
ObCharset::get_default_collation(ObCharset::get_default_charset()));
......@@ -329,8 +329,7 @@ int ObTableColumns::fill_row_cells(const ObTableSchema& table_schema, const ObCo
cur_row_.cells_[cell_idx].set_varchar(ObString(static_cast<int32_t>(pos), buf));
}
} else if (def_obj.is_null()) {
// NOTICE: default value is NULL need print string "NULL"
cur_row_.cells_[cell_idx].set_varchar("NULL");
cur_row_.cells_[cell_idx].set_null();
} else if (def_obj.is_bit()) {
if (OB_FAIL(def_obj.print_varchar_literal(buf, buf_len, pos, TZ_INFO(session_)))) {
LOG_WARN("fail to print varchar literal", K(ret), K(def_obj), K(buf_len), K(pos), K(buf));
......
......@@ -464,7 +464,7 @@ int ObInnerTableSchema::tenant_virtual_table_column_schema(ObTableSchema &table_
MAX_COLLATION_LENGTH, //column_length
-1, //column_precision
-1, //column_scale
false, //is_nullable
true, //is_nullable
false); //is_autoincrement
}
......@@ -509,7 +509,7 @@ int ObInnerTableSchema::tenant_virtual_table_column_schema(ObTableSchema &table_
COLUMN_DEFAULT_LENGTH, //column_length
-1, //column_precision
-1, //column_scale
false, //is_nullable
true, //is_nullable
false); //is_autoincrement
}
......
......@@ -282,7 +282,7 @@ int ObInnerTableSchema::tenant_virtual_table_column_ora_schema(ObTableSchema &ta
MAX_COLLATION_LENGTH, //column_length
2, //column_precision
-1, //column_scale
false, //is_nullable
true, //is_nullable
false); //is_autoincrement
}
......@@ -327,7 +327,7 @@ int ObInnerTableSchema::tenant_virtual_table_column_ora_schema(ObTableSchema &ta
COLUMN_DEFAULT_LENGTH, //column_length
2, //column_precision
-1, //column_scale
false, //is_nullable
true, //is_nullable
false); //is_autoincrement
}
......
......@@ -4937,10 +4937,10 @@ def_table_schema(
normal_columns = [
('type', 'varchar:COLUMN_TYPE_LENGTH'),
('collation', 'varchar:MAX_COLLATION_LENGTH'),
('collation', 'varchar:MAX_COLLATION_LENGTH', 'true'),
('null', 'varchar:COLUMN_NULLABLE_LENGTH'),
('key', 'varchar:COLUMN_KEY_LENGTH'),
('default', 'varchar:COLUMN_DEFAULT_LENGTH'),
('default', 'varchar:COLUMN_DEFAULT_LENGTH', 'true'),
('extra', 'varchar:COLUMN_EXTRA_LENGTH'),
('privileges', 'varchar:MAX_COLUMN_PRIVILEGE_LENGTH'),
('comment', 'varchar:MAX_COLUMN_COMMENT_LENGTH'),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册