Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-5340

ConnectSE: discovery does not work well for Oracle's INT data type

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 10.0.7
    • Component/s: None
    • Labels:
      None

      Description

      Create this table in Oracle:

      [bar@home ~]$ sqlplus
      SQL*Plus: Release 11.2.0.2.0 Production on Tue Nov 26 12:37:51 2013
      Copyright (c) 1982, 2011, Oracle.  All rights reserved.
      Enter user-name: system
      Enter password: 
      Connected to:
      Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production
      SQL> create table t1 (a int);
      Table created.
      SQL> insert into t1 values (10);
      1 row created.
      SQL> commit;
      Commit complete.

      Now create a ConnectSE ODBC table and try to SELECT from it.
      It does not work:

      mysql> drop table if exists t1; create table t1 engine=connect table_type=odbc connection='DSN=oraodbc;UID=system;PWD=manager' tabname='T1'; select * from t1;Query OK, 0 rows affected (0.00 sec)
       
      Query OK, 0 rows affected (0.12 sec)
       
      ERROR 1296 (HY000): Got error 122 '[Oracle][ODBC]SQL data type out of range <-25>.' from CONNECT

      If the table structure is specified explicitly, it works fine:

      mysql> drop table if exists t1; create table t1 (a int) engine=connect table_type=odbc connection='DSN=oraodbc;UID=system;PWD=manager' tabname='T1'; select * from t1;
      Query OK, 0 rows affected (0.00 sec)
       
      Query OK, 0 rows affected (0.06 sec)
       
      +------+
      | a    |
      +------+
      |   10 |
      +------+
      1 row in set (0.05 sec)

      Note, discovery works fine with VARCHAR columns.
      Create this table on the Oracle side:

      SQL> drop table t1;
      Table dropped.
      SQL> create table t1 (a varchar(10));
      Table created.
      SQL> insert into t1 values ('test');
      1 row created.
      SQL> commit;
      Commit complete.

      Now try to create an ODBC table on the Maria side and read from it:

      mysql> drop table if exists t1; create table t1 engine=connect table_type=odbc connection='DSN=oraodbc;UID=system;PWD=manager' tabname='T1'; select * from t1;
      Query OK, 0 rows affected (0.00 sec)
       
      Query OK, 0 rows affected (0.13 sec)
       
      +------+
      | A    |
      +------+
      | test |
      +------+
      1 row in set (0.06 sec)

      Discovery should be fixed for the Oracle's INT data type.

        Attachments

          Activity

            People

            Assignee:
            bertrandop Olivier Bertrand
            Reporter:
            bar Alexander Barkov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: