Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-6541

IJ's SHOW command cannot handle some legal schema and table names

Agile BoardAttach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 10.10.1.1
    • Fix Version/s: None
    • Component/s: Tools
    • Labels:
      None

      Description

      The IJ command SHOW can take a schema or table name as input. E.g. SHOW TABLES/INDEXES IN <schema name>
      SHOW INDEXES FROM <table name>

      But the command fails if the schema or table name is a quoted identifier, which is permitted for schema and table names. E.g.:

      ij> create schema "schema_identifier";
      0 rows inserted/updated/deleted
      ij> set schema "schema_identifier";
      0 rows inserted/updated/deleted
      ij> create table "table_identifier"(i int);
      0 rows inserted/updated/deleted
      ij> show schemas;
      TABLE_SCHEM
      ------------------------------
      APP
      NULLID
      SQLJ
      SYS
      SYSCAT
      SYSCS_DIAG
      SYSCS_UTIL
      SYSFUN
      SYSIBM
      SYSPROC
      SYSSTAT
      schema_identifier

      12 rows selected
      ij> show tables in app;
      TABLE_SCHEM |TABLE_NAME |REMARKS
      ------------------------------------------------------------------------

      0 rows selected
      ij> show tables in "schema_identifier";
      ERROR 42X01: Syntax error: Encountered "show" at line 1, column 1.
      Issue the 'help' command for general information on IJ command syntax.
      Any unrecognized commands are treated as potential SQL commands and executed directly.
      Consult your DBMS server reference documentation for details of the SQL syntax supported by your server.
      ij> show indexes from SYS.SYSTABLES;
      TABLE_NAME |COLUMN_NAME |NON_U&|TYPE|ASC&|CARDINA&|PAGES
      ----------------------------------------------------------------------------
      SYSTABLES |TABLENAME |false |3 |A |NULL |NULL
      SYSTABLES |SCHEMAID |false |3 |A |NULL |NULL
      SYSTABLES |TABLEID |false |3 |A |NULL |NULL
      ij> show indexes from "table_identifier";
      ERROR 42X01: Syntax error: Encountered "show" at line 1, column 1.
      Issue the 'help' command for general information on IJ command syntax.
      Any unrecognized commands are treated as potential SQL commands and executed directly.
      Consult your DBMS server reference documentation for details of the SQL syntax supported by your server.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              dyret Dyre Tjeldvoll

              Dates

              • Created:
                Updated:

                Issue deployment