Description:
Buffer length for wide char resultsets columns is a little too big for the reported
column size. Usually for wide char columns buffer length and column size do not fail this
assert:
ASSERT( nBufferLength == pRow->column_size * sizeof(wchar_t) );
rc = SQLColAttribute( hstmt, nCol,SQL_DESC_LENGTH, NULL,0, NULL,
(SQLLEN*) &pRow->column_size );
// buffer length
rc = SQLColAttribute( hstmt,
nCol,
SQL_DESC_OCTET_LENGTH,
NULL,
0,
NULL,
&pRow->buffer_length );
How to repeat:
select
trigger_name,
action_timing
from
information_schema.triggers
Describe the resultset using above two api calls I get the following column sizes: 64 and
6 and buffer sizes are reported as 193 and 19 respectively.
trigger_name varchar(64) SQL_WVARCHAR
action_timing varchar(6) SQL_WVARCHAR
Is this by design? seems that reported buffer size is (column_size*3 + 1) instead of the
usual column_size*2 for wide chars
Description: Buffer length for wide char resultsets columns is a little too big for the reported column size. Usually for wide char columns buffer length and column size do not fail this assert: ASSERT( nBufferLength == pRow->column_size * sizeof(wchar_t) ); rc = SQLColAttribute( hstmt, nCol,SQL_DESC_LENGTH, NULL,0, NULL, (SQLLEN*) &pRow->column_size ); // buffer length rc = SQLColAttribute( hstmt, nCol, SQL_DESC_OCTET_LENGTH, NULL, 0, NULL, &pRow->buffer_length ); How to repeat: select trigger_name, action_timing from information_schema.triggers Describe the resultset using above two api calls I get the following column sizes: 64 and 6 and buffer sizes are reported as 193 and 19 respectively. trigger_name varchar(64) SQL_WVARCHAR action_timing varchar(6) SQL_WVARCHAR Is this by design? seems that reported buffer size is (column_size*3 + 1) instead of the usual column_size*2 for wide chars