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

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 10.4.14
    • Fix Version/s: N/A
    • Component/s: Virtual Columns
    • Labels:
      None
    • Environment:
      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

              Assignee:
              Unassigned Unassigned
              Reporter:
              dajt Jay Fenlason
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Git Integration