| 235 | |
| 236 | |
| 237 | ULONG DataTypeUtilBase::fixLength(const dsc* desc, ULONG length) |
| 238 | { |
| 239 | const UCHAR bpc = maxBytesPerChar(desc->getCharSet()); |
| 240 | |
| 241 | USHORT overhead = 0; |
| 242 | if (desc->dsc_dtype == dtype_varying) |
| 243 | overhead = sizeof(USHORT); |
| 244 | else if (desc->dsc_dtype == dtype_cstring) |
| 245 | overhead = sizeof(UCHAR); |
| 246 | |
| 247 | return MIN(((MAX_STR_SIZE - overhead) / bpc) * bpc, length); |
| 248 | } |
| 249 | |
| 250 | |
| 251 | void DataTypeUtilBase::makeConcatenate(dsc* result, const dsc* value1, const dsc* value2) |
no test coverage detected