Skip to content

[Bug]: Execute the instance sql and the connection is disconnected #3957

@Huangxiao-mas

Description

@Huangxiao-mas

ODC version

ODC432bp

OB version

oceanbase2277 oracle

What happened?

image

What did you expect to happen?

.

How can we reproduce it (as minimally and precisely as possible)?

SELECT
  "SYSTEM",
  "BRANCH",
  "CCY",
  "GL_CODE",
  "PROFIT_CENTRE",
  "PROD_TYPE",
  "BUSI_PROD",
  "MARKETING_PROD",
  "COMPANY",
  "RUN_DATE"
FROM
  (
    SELECT
      RECON,
      "SYSTEM",
      "BRANCH",
      "CCY",
      "GL_CODE",
      "PROFIT_CENTRE",
      "PROD_TYPE",
      "BUSI_PROD",
      "MARKETING_PROD",
      "COMPANY",
      "RUN_DATE"
    FROM
      (
        SELECT
          ROWNUM AS RECON,
          "SYSTEM",
          "BRANCH",
          "CCY",
          "GL_CODE",
          "PROFIT_CENTRE",
          "PROD_TYPE",
          "BUSI_PROD",
          "MARKETING_PROD",
          "COMPANY",
          "RUN_DATE"
        FROM
          (
            SELECT
              /*+ READ_CLUSTER(SLAVE), READ_CONSISTENCY(WEAK), NO_REWRITE */
              "SYSTEM",
              "BRANCH",
              "CCY",
              "GL_CODE",
              "PROFIT_CENTRE",
              "PROD_TYPE",
              "BUSI_PROD",
              "MARKETING_PROD",
              "COMPANY",
              "RUN_DATE"
            FROM
              "ENS_GL"."GL_PROD_BAL_HIST" PARTITION(P_202410)
            WHERE
              (
                (
                  ("SYSTEM" > ?)
                  or (
                    "SYSTEM" = ?
                    and "BRANCH" > ?
                  )
                  or (
                    "SYSTEM" = ?
                    and "BRANCH" = ?
                    and "CCY" > ?
                  )
                  or (
                    "SYSTEM" = ?
                    and "BRANCH" = ?
                    and "CCY" = ?
                    and "GL_CODE" > ?
                  )
                  or (
                    "SYSTEM" = ?
                    and "BRANCH" = ?
                    and "CCY" = ?
                    and "GL_CODE" = ?
                    and "PROFIT_CENTRE" > ?
                  )
                  or (
                    "SYSTEM" = ?
                    and "BRANCH" = ?
                    and "CCY" = ?
                    and "GL_CODE" = ?
                    and "PROFIT_CENTRE" = ?
                    and "PROD_TYPE" > ?
                  )
                  or (
                    "SYSTEM" = ?
                    and "BRANCH" = ?
                    and "CCY" = ?
                    and "GL_CODE" = ?
                    and "PROFIT_CENTRE" = ?
                    and "PROD_TYPE" = ?
                    and "BUSI_PROD" > ?
                  )
                  or (
                    "SYSTEM" = ?
                    and "BRANCH" = ?
                    and "CCY" = ?
                    and "GL_CODE" = ?
                    and "PROFIT_CENTRE" = ?
                    and "PROD_TYPE" = ?
                    and "BUSI_PROD" = ?
                    and "MARKETING_PROD" > ?
                  )
                  or (
                    "SYSTEM" = ?
                    and "BRANCH" = ?
                    and "CCY" = ?
                    and "GL_CODE" = ?
                    and "PROFIT_CENTRE" = ?
                    and "PROD_TYPE" = ?
                    and "BUSI_PROD" = ?
                    and "MARKETING_PROD" = ?
                    and "COMPANY" > ?
                  )
                  or (
                    "SYSTEM" = ?
                    and "BRANCH" = ?
                    and "CCY" = ?
                    and "GL_CODE" = ?
                    and "PROFIT_CENTRE" = ?
                    and "PROD_TYPE" = ?
                    and "BUSI_PROD" = ?
                    and "MARKETING_PROD" = ?
                    and "COMPANY" = ?
                    and "RUN_DATE" > TO_TIMESTAMP(?, ?)
                  )
                )
              )
              AND (
                (
                  ("SYSTEM" < ?)
                  or (
                    "SYSTEM" = ?
                    and "BRANCH" < ?
                  )
                  or (
                    "SYSTEM" = ?
                    and "BRANCH" = ?
                    and "CCY" < ?
                  )
                  or (
                    "SYSTEM" = ?
                    and "BRANCH" = ?
                    and "CCY" = ?
                    and "GL_CODE" < ?
                  )
                  or (
                    "SYSTEM" = ?
                    and "BRANCH" = ?
                    and "CCY" = ?
                    and "GL_CODE" = ?
                    and "PROFIT_CENTRE" < ?
                  )
                  or (
                    "SYSTEM" = ?
                    and "BRANCH" = ?
                    and "CCY" = ?
                    and "GL_CODE" = ?
                    and "PROFIT_CENTRE" = ?
                    and "PROD_TYPE" < ?
                  )
                  or (
                    "SYSTEM" = ?
                    and "BRANCH" = ?
                    and "CCY" = ?
                    and "GL_CODE" = ?
                    and "PROFIT_CENTRE" = ?
                    and "PROD_TYPE" = ?
                    and "BUSI_PROD" < ?
                  )
                  or (
                    "SYSTEM" = ?
                    and "BRANCH" = ?
                    and "CCY" = ?
                    and "GL_CODE" = ?
                    and "PROFIT_CENTRE" = ?
                    and "PROD_TYPE" = ?
                    and "BUSI_PROD" = ?
                    and "MARKETING_PROD" < ?
                  )
                  or (
                    "SYSTEM" = ?
                    and "BRANCH" = ?
                    and "CCY" = ?
                    and "GL_CODE" = ?
                    and "PROFIT_CENTRE" = ?
                    and "PROD_TYPE" = ?
                    and "BUSI_PROD" = ?
                    and "MARKETING_PROD" = ?
                    and "COMPANY" < ?
                  )
                  or (
                    "SYSTEM" = ?
                    and "BRANCH" = ?
                    and "CCY" = ?
                    and "GL_CODE" = ?
                    and "PROFIT_CENTRE" = ?
                    and "PROD_TYPE" = ?
                    and "BUSI_PROD" = ?
                    and "MARKETING_PROD" = ?
                    and "COMPANY" = ?
                    and "RUN_DATE" <= TO_TIMESTAMP(?, ?)
                  )
                )
              )
            ORDER BY
              "SYSTEM" ASC,
              "BRANCH" ASC,
              "CCY" ASC,
              "GL_CODE" ASC,
              "PROFIT_CENTRE" ASC,
              "PROD_TYPE" ASC,
              "BUSI_PROD" ASC,
              "MARKETING_PROD" ASC,
              "COMPANY" ASC,
              "RUN_DATE" ASC
          ) T1
        WHERE
          ROWNUM <= ?
      ) T2
    ORDER BY
      RECON DESC
  )
WHERE
  ROWNUM = ?

Anything else we need to know?

No response

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

Status
New

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions