Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-39055

Error: expected PlanStage for table DBname.t4, got <nil> SQLState: HY000 ErrorCode: 1105, MongoDB 2.6 server

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 4.0.2
    • Component/s: Querying
    • Labels:
      None
    • ALL
    • Hide

      This issue is specific to MONGO 2.6 server.

      When we try to run the following query against MongoDB BI Connector 2.6 on MongoDB 4.0.2 server then it throws the ERROR: error cross join optimizer: expected PlanStage for table dbcert.t4, got <nil>
      SQLState: HY000
      ErrorCode: 1105

      PLEASE NOTE: This issue does not occur when we use the same query against MongoDB BI Connector 2.7 on MongoDB 4.0.3 and MongoDB BI Connector 2.8 on MongoDB 4.0.5

       

      QUERY:

      SELECT
      `t1`.`col1` AS `C1`,
      `t1`.`col2` AS `C2`,
      `t1`.`col3` AS `C3`
      FROM
      `dbName`.`Table1` `t2`,
      `dbName`.`Table1` `t3`,
      (
      SELECT
      `col2`,
      1 AS `c2`
      FROM
      `dbName`.`Table1`
      WHERE
      `col2` IN (
      'P1',
      'c' )
      ) `t4`,
      (
      SELECT
      `col1`,
      `col2`,
      `col3`
      FROM
      `dbName`.`Table2`
      WHERE
      `col1` = 'S1' AND
      `col2` = 'P1'
      ) `t1`
      WHERE
      `t2`.`col2` = `t1`.`col2` AND
      `t2`.`col2` = `t4`.`col2` AND
      `t2`.`col2` = `t3`.`col2` AND
      `t2`.`col2` IN (
      'P1',
      'a' ) AND
      `t3`.`col2` IN (
      'P1',
      'b' )
      ORDER BY
      `C3` ASC

      Show
      This issue is specific to MONGO 2.6 server. When we try to run the following query against  MongoDB BI Connector 2.6 on MongoDB 4.0.2  server then it throws the ERROR: error cross join optimizer: expected PlanStage for table dbcert.t4, got <nil> SQLState: HY000 ErrorCode: 1105 PLEASE NOTE: This issue does not occur when we use the same query against MongoDB BI Connector 2.7 on MongoDB 4.0.3 and MongoDB BI Connector 2.8 on MongoDB 4.0.5   QUERY: SELECT `t1`.`col1` AS `C1`, `t1`.`col2` AS `C2`, `t1`.`col3` AS `C3` FROM `dbName`.`Table1` `t2`, `dbName`.`Table1` `t3`, ( SELECT `col2`, 1 AS `c2` FROM `dbName`.`Table1` WHERE `col2` IN ( 'P1', 'c' ) ) `t4`, ( SELECT `col1`, `col2`, `col3` FROM `dbName`.`Table2` WHERE `col1` = 'S1' AND `col2` = 'P1' ) `t1` WHERE `t2`.`col2` = `t1`.`col2` AND `t2`.`col2` = `t4`.`col2` AND `t2`.`col2` = `t3`.`col2` AND `t2`.`col2` IN ( 'P1', 'a' ) AND `t3`.`col2` IN ( 'P1', 'b' ) ORDER BY `C3` ASC

      SELECT
      `t1`.`col1` AS `C1`,
      `t1`.`col2` AS `C2`,
      `t1`.`col3` AS `C3`
      FROM
      `dbName`.`Table1` `t2`,
      `dbName`.`Table1` `t3`,
      (
      SELECT
      `col2`,
      1 AS `c2`
      FROM
      `dbName`.`Table1`
      WHERE
      `col2` IN (
      'P1',
      'c' )
      ) `t4`,
      (
      SELECT
      `col1`,
      `col2`,
      `col3`
      FROM
      `dbName`.`Table2`
      WHERE
      `col1` = 'S1' AND
      `col2` = 'P1'
      ) `t1`
      WHERE
      `t2`.`col2` = `t1`.`col2` AND
      `t2`.`col2` = `t4`.`col2` AND
      `t2`.`col2` = `t3`.`col2` AND
      `t2`.`col2` IN (
      'P1',
      'a' ) AND
      `t3`.`col2` IN (
      'P1',
      'b' )
      ORDER BY
      `C3` ASC

            Assignee:
            daniel.hatcher@mongodb.com Danny Hatcher (Inactive)
            Reporter:
            adarshdeep.cheema Adarshdeep Cheema
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: