On 05/02/2013 14:53, H.Merijn Brand wrote:
On Tue, 05 Feb 2013 14:33:38 +0000, "Martin J. Evans"
<martin.ev...@easysoft.com> wrote:

On 05/02/13 14:16, Lyle wrote:
Drivers are also free to return extra driver-specific columns of
information - though it's recommended that they start at column index
50 to leave room for expansion of the DBI/ODBC specification.

Although I've yet to find a driver that has followed this guidance.
Most didn't specify any above 18 at all. see below

Sorry, I should have qualified that with "from the drivers I've seen that have specified extra driver specific columns":

C:\>perl -mDBI -e "my $dbh = DBI->connect('DBI:mysql:database=test;h
ost=localhost;','test','test'); use Data::Dumper; use Tie::IxHash; my %return; t ie %return, Tie::IxHash; my %index = %{ $dbh->type_info_all->[0] }; %return = ma p { $_ => $index{$_} } sort { $index{$a} <=> $index{$b} } keys %index; print Dum
per( \%return );"
$VAR1 = {
          'TYPE_NAME' => 0,
          'DATA_TYPE' => 1,
          'COLUMN_SIZE' => 2,
          'LITERAL_PREFIX' => 3,
          'LITERAL_SUFFIX' => 4,
          'CREATE_PARAMS' => 5,
          'NULLABLE' => 6,
          'CASE_SENSITIVE' => 7,
          'SEARCHABLE' => 8,
          'UNSIGNED_ATTRIBUTE' => 9,
          'FIXED_PREC_SCALE' => 10,
          'AUTO_UNIQUE_VALUE' => 11,
          'LOCAL_TYPE_NAME' => 12,
          'MINIMUM_SCALE' => 13,
          'MAXIMUM_SCALE' => 14,
          'NUM_PREC_RADIX' => 15,
          'SQL_DATATYPE' => 16,
          'SQL_DATETIME_SUB' => 17,
          'INTERVAL_PRECISION' => 18,
          'mysql_native_type' => 19,
          'mysql_is_num' => 20
        };

It seems that as ODBC has added a new attribute to the index, DBI should follow suit. I guess this may affect DBD::mysql users?


Lyle

Reply via email to