Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch for "type_info_all result has 19 keys but 20 fields" errors [rt.cpan.org #118422] #50

Closed
mpeppler opened this issue Feb 4, 2021 · 1 comment

Comments

@mpeppler
Copy link
Owner

mpeppler commented Feb 4, 2021

Migrated from rt.cpan.org#118422 (status was 'new')

Requestors:

From edavis@cpan.org on 2016-10-18 08:58:40
:

See #91380.

Newer MSSQL versions add a new field to sp_datatype_info.  This is a quick fix.

--- /usr/lib64/perl5/vendor_perl/DBD/Sybase.pm  2013-04-04 20:50:11.000000000 +0100
+++ lib/DBD/Sybase.pm   2016-10-18 09:58:13.677168442 +0100
@@ -402,12 +402,13 @@
                                sql_datetime_sub   => 16,
                                num_prec_radix     => 17,
                                interval_precision => 18,
+                                USERTYPE           => 19,
                        },
                ];

                # ASE 11.x only returns 13 columns:
                my $c;
-               if ( ( $c = scalar( @{ $data->[0] } ) ) < 19 ) {
+               if ( ( $c = scalar( @{ $data->[0] } ) ) < 20 ) {
                        foreach ( keys( %{ $ti->[0] } ) ) {
                                if ( $ti->[0]->{$_} >= $c ) {
                                        delete( $ti->[0]->{$_} );


@mpeppler
Copy link
Owner Author

mpeppler commented Feb 8, 2021

Fixed with an earlier patch.

@mpeppler mpeppler closed this as completed Feb 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant