set correct character length of varchar in dblink
This commit is contained in:
@ -81,7 +81,7 @@ int ObMySQLResult::format_precision_scale_length(int16_t &precision, int16_t &sc
|
|||||||
int16_t tmp_precision = precision;
|
int16_t tmp_precision = precision;
|
||||||
int16_t tmp_scale = scale;
|
int16_t tmp_scale = scale;
|
||||||
int32_t tmp_length = length;
|
int32_t tmp_length = length;
|
||||||
int64_t mbmaxlen = 0;
|
int64_t mbminlen = 0;
|
||||||
LOG_DEBUG("dblink pull meta", K(precision), K(scale), K(length), K(ret), K(ob_type));
|
LOG_DEBUG("dblink pull meta", K(precision), K(scale), K(length), K(ret), K(ob_type));
|
||||||
// format precision from others to oceanbase
|
// format precision from others to oceanbase
|
||||||
if (!lib::is_oracle_mode()) {
|
if (!lib::is_oracle_mode()) {
|
||||||
@ -118,10 +118,10 @@ int ObMySQLResult::format_precision_scale_length(int16_t &precision, int16_t &sc
|
|||||||
}
|
}
|
||||||
case ObCharType:
|
case ObCharType:
|
||||||
case ObVarcharType: {
|
case ObVarcharType: {
|
||||||
if (OB_FAIL(common::ObCharset::get_mbmaxlen_by_coll(meta_cs_type, mbmaxlen))) {
|
if (OB_FAIL(common::ObCharset::get_mbminlen_by_coll(meta_cs_type, mbminlen))) {
|
||||||
LOG_WARN("fail to get mbmaxlen", K(meta_cs_type), K(ret));
|
LOG_WARN("fail to get mbminlen", K(meta_cs_type), K(ret));
|
||||||
} else {
|
} else {
|
||||||
length /= mbmaxlen;
|
length /= mbminlen;
|
||||||
precision = -1;
|
precision = -1;
|
||||||
scale = -1;
|
scale = -1;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user