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

CREATE TABLE AS <subquery> does not maintain the collation for character types.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 10.3.1.4, 10.4.1.3
    • 10.3.1.4, 10.4.1.3
    • SQL
    • None

    Description

      create table t as select tablename from sys.systables with no data;

      This creates a column TABLENAME with collation based upon the user schema, but the type of sys.systables.tablename has collation UCS_BASIC.

      The required behaviour should be verified with the SQL standard (11.3 SR6), but since collation is an attribute of a type it seems logical that the collation is maintained by the create.

      Fixing this to keep the collation of the system column will cause problems though as there would be no way to recreate this table through a regular create table, say if the schema is dumped and recreated using ddlutils.

      I think this is critical as fixing it after a release would lead to a change in behaviour for applications.

      Attachments

        Issue Links

          Activity

            People

              mamtas Mamta A. Satoor
              djd Daniel John Debrunner
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: