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

SHOW CREATE VIEW don't provide formating in .frm file

    XMLWordPrintable

Details

    • Task
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Duplicate
    • N/A
    • Views
    • None

    Description

      SHOW CREATE VIEW don't reflect the formating information from the original create statement,
      even they are available in the .frm file.

      For really huge view create bodys it is heavily readable.

      to reproduce.

      CREATE TABLE `t1` (
      	`id` INT NULL
      )
      ;
       
      CREATE ALGORITHM = UNDEFINED SQL SECURITY DEFINER VIEW `view_t1` AS SELECT *
      FROM 
      t1;
      

      SHOW CREATE VIEW `view_t1`;

      give the following output

      CREATE ALGORITHM=UNDEFINED DEFINER=`richard`@`localhost` SQL SECURITY DEFINER VIEW `view_t1` AS select `t1`.`id` AS `id` from `t1
      

      But the formating information with \n are available in the .frm file

      Output of more view_t1.frm
      (source= section)

      TYPE=VIEW
      query=select `try`.`t1`.`id` AS `id` from `try`.`t1`
      md5=c60d386caaf21a6ba36d48fb4561c351
      updatable=1
      algorithm=0
      definer_user=richard
      definer_host=localhost
      suid=1
      with_check_option=0
      timestamp=2017-09-14 15:12:16
      create-version=2
      source=SELECT *
      \nFROM 
      \nt1
      client_cs_name=utf8mb4
      connection_cl_name=utf8mb4_general_ci
      view_body_utf8=select `try`.`t1`.`id` AS `id` from `try`.`t1`
      mariadb-version=100207
      

      Attachments

        Issue Links

          Activity

            People

              cvicentiu Vicențiu Ciorbaru
              Richard Richard Stracke
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.