
|
If you were logged in you would be able to see more operations.
|
|
|
|
Environment:
|
Firebird ODBC driver version 02.00.0150
Linux Ubuntu 10.10
Perl 5.10.1
Perl DBI 1.616
Perl DBD::ODBC 1.27
Firebird ODBC driver version 02.00.0150
Linux Ubuntu 10.10
Perl 5.10.1
Perl DBI 1.616
Perl DBD::ODBC 1.27
|
|
Issue Links:
|
Duplicate
|
|
|
|
This issue is duplicated by:
|
|
ODBC-83
SQLGetData is not consistent with SQL_DESC_DISPLAY_SIZE for timestamp column
|
|
|
|
|
|
|
|
If you create a timestamp column and call SQLDescribeCol the display size is returned as 24 but the driver can return 29 characters for some dates:
1998-05-15 00:01:00.100000000
The tests in DBD::ODBC fail because DBD::ODBC believes that 24 and bind with a column length of 25 but then they get data truncation error. I had to work around the problem in DBD::ODBC by adding the following to dbdimp.c:
/* Workaround bug in Firebird driver that reports timestamps are
display size 24 when in fact it can return the longer
e.g., 1998-05-15 00:01:00.100000000 */
if ((imp_dbh->driver_type == DT_FIREBIRD) &&
(fbh->ColSqlType == SQL_TYPE_TIMESTAMP)) {
fbh->ColDisplaySize = 30;
}
which you can find in the subversion trunk for DBD::ODBC.
The display size should be set to 29 or you should not be returning all those digits for the fractional seconds - I cannot say which as I don't really know Firebird.
|
|
Description
|
If you create a timestamp column and call SQLDescribeCol the display size is returned as 24 but the driver can return 29 characters for some dates:
1998-05-15 00:01:00.100000000
The tests in DBD::ODBC fail because DBD::ODBC believes that 24 and bind with a column length of 25 but then they get data truncation error. I had to work around the problem in DBD::ODBC by adding the following to dbdimp.c:
/* Workaround bug in Firebird driver that reports timestamps are
display size 24 when in fact it can return the longer
e.g., 1998-05-15 00:01:00.100000000 */
if ((imp_dbh->driver_type == DT_FIREBIRD) &&
(fbh->ColSqlType == SQL_TYPE_TIMESTAMP)) {
fbh->ColDisplaySize = 30;
}
which you can find in the subversion trunk for DBD::ODBC.
The display size should be set to 29 or you should not be returning all those digits for the fractional seconds - I cannot say which as I don't really know Firebird.
|
Show » |
| There are no comments yet on this issue.
|
|