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

View is created with wrong column name if column name > 64 symbols

    XMLWordPrintable

Details

    • Bug
    • Status: Stalled (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.3, 10.4, 10.5, 10.6, 10.7, 10.8
    • 10.4
    • None

    Description

      According standard "If a <view column list> is" not "specified ... the <column name>s of the view are the <column name>s of the table specified by the <query expression>"

      But:

      If column name less or equal 64 symbols is everything Ok:

      CREATE OR REPLACE VIEW v2 AS SELECT 111;
      

      TABLE_SCHEMA	TABLE_NAME	COLUMN_NAME
      test	                         v2	                111
      

      But if column name more than 64 symbols the column name changes to "Name_exp_1"

      CREATE OR REPLACE VIEW v1 AS SELECT 11111111111111111111111111111111111111111111111111111111111111111;
      

      TABLE_SCHEMA	TABLE_NAME	COLUMN_NAME
      test	                        v1	                Name_exp_1
      

      Also it is impossible to set column name more than 64 symbols:

      mysqltest: At line 6: query 'CREATE OR REPLACE VIEW v2 AS SELECT 111 as a2222222222222222222222222222222222222222222222222222222222222222' failed: 1166: Incorrect column name 'a2222222222222222222222222222222222222222222222222222222222222222'
      

      After fix this bug view-protocol should be enable in tests: main.ctype_ldml, main.date_formats, main.order_by (possible), main.alias

      Attachments

        Issue Links

          Activity

            People

              lstartseva Lena Startseva
              lstartseva Lena Startseva
              Votes:
              0 Vote for this issue
              Watchers:
              5 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.