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

Connect Engine : Got error 122 'SQLExecDirect: [Oracle][ODBC][Ora]ORA-01000 from Engine

Details

    Description

      Hi all,
      I've created two table with engine connect from source Oracle database 12c, but with this simple query the connect engine return the following error:
      Connect Engine : Got error 122 'SQLExecDirect: [Oracle][ODBC][Ora]ORA-01000 from Engine

      I do not see this error in the Oracle Database logs.

      this is the query I launch:

      select count(*) from  `AG_UBICAZIONE_SLOT` US
      inner join `AG_ATTORE_UBICAZIONE` AUTIR on (AUTIR.PROG_ESERCIZIO_ID=US.PROG_ESERCIZIO_ID OR AUTIR.PROG_MAGAZZINO_ID=US.PROG_MAGAZZINO_ID)
      

      Queries on individual tables work without problems.

      Thanks.
      Regards.

      Attachments

        Activity

          bertrandop Olivier Bertrand added a comment - - edited

          I am currently re-installing my computer and Oracle is not yet available. However, to try reproducing this case, please publish your table create statements and possibly the Oracle tables definition and data sample.

          Meanwhile, a possible turnover is to define an ODBC table based on a view specified in the SRCDEF option. Something such as:

          CREATE TABLE whatever ENGINE=CONNECT TABLE_TYPE=ODBC BLOCK_SIZE=10
          CONNECTION='your oracle data source'
          SRCDEF='select count(*) from  `AG_UBICAZIONE_SLOT` US
          inner join `AG_ATTORE_UBICAZIONE` AUTIR on (AUTIR.PROG_ESERCIZIO_ID=US.PROG_ESERCIZIO_ID OR AUTIR.PROG_MAGAZZINO_ID=US.PROG_MAGAZZINO_ID)';
          

          Normally CONNECT should be able to make the colum definition.

          The advantage of doing so is to let Oracle do the join and to retrieve only the query result. Sometimes it can be much faster than when MariaDB does the join itself. See Random Access of ODBC Tables for information on what to do when an ODBC table is randomly used, like when joining tables.

          bertrandop Olivier Bertrand added a comment - - edited I am currently re-installing my computer and Oracle is not yet available. However, to try reproducing this case, please publish your table create statements and possibly the Oracle tables definition and data sample. Meanwhile, a possible turnover is to define an ODBC table based on a view specified in the SRCDEF option. Something such as: CREATE TABLE whatever ENGINE=CONNECT TABLE_TYPE=ODBC BLOCK_SIZE=10 CONNECTION='your oracle data source' SRCDEF='select count(*) from `AG_UBICAZIONE_SLOT` US inner join `AG_ATTORE_UBICAZIONE` AUTIR on (AUTIR.PROG_ESERCIZIO_ID=US.PROG_ESERCIZIO_ID OR AUTIR.PROG_MAGAZZINO_ID=US.PROG_MAGAZZINO_ID)'; Normally CONNECT should be able to make the colum definition. The advantage of doing so is to let Oracle do the join and to retrieve only the query result. Sometimes it can be much faster than when MariaDB does the join itself. See Random Access of ODBC Tables for information on what to do when an ODBC table is randomly used, like when joining tables.

          People

            bertrandop Olivier Bertrand
            nbattista89 Nicola
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.