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

date_format() mixed with if() in a computed column causes server segfault

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Duplicate
    • 10.4.14
    • N/A
    • Virtual Columns
    • None
    • Fedora 32

    Description

      I have a table containing two date fields, a text field and a varchar(128) field. I did a

      alter table event add full_event_name text as (concat(
        date_format(event_starts_on, '%Y-%m-%d '),                         
        if(event_starts_on <> event_ends_on, date_format(event_ends_on, 'to %Y-%m-%d '), ''),
        event_location_id, ' ',                                                              
        event_name));
      

      After I did that, accessing the table (say, by doing a mysqldump of its database) causes the server to segfault. If I remove the date_format() calls or the if(), the server doesn't segfault.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              dajt Jay Fenlason (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.