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

segfault in Item_func_from_unixtime::get_date on updating table with virtual columns

    XMLWordPrintable

Details

    Description

      Hey,
      since i added two virtual columns to a table querying that table cause some random segfaults.

      The table looks like that:

      CREATE TABLE

      CREATE TABLE `tl_astars_reservation_group` (
        `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
        `tstamp` int(10) unsigned NOT NULL DEFAULT '0',
        `pid` int(10) unsigned NOT NULL DEFAULT '0',
        `resid` int(10) unsigned NOT NULL DEFAULT '0',
        `time` int(10) unsigned NOT NULL DEFAULT '0',
        `time_hr` int(10) unsigned AS (`time`/3600) VIRTUAL,
        `repeatEach` varchar(64) NOT NULL DEFAULT '',
        `recurrDayWise` varchar(64) NOT NULL DEFAULT '',
        `duration` int(10) unsigned NOT NULL DEFAULT '0',
        `seriesBegin` int(10) unsigned NOT NULL DEFAULT '0',
        `seriesBeginWeekdayHr` varchar(50) AS (DATE_FORMAT(FROM_UNIXTIME(`seriesBegin`), '%W')) VIRTUAL,
        `seriesEnd` int(10) unsigned NOT NULL DEFAULT '0',
        `onhold` char(1) NOT NULL DEFAULT '',
        `locked` char(1) NOT NULL DEFAULT '',
        `season` varchar(64) NOT NULL DEFAULT '',
        `specialprice` decimal(20,4) DEFAULT NULL,
        `paid` char(1) NOT NULL DEFAULT '',
        `weeks` varchar(64) NOT NULL DEFAULT '',
        `day` varchar(7) NOT NULL DEFAULT '0',
        `downpayment` decimal(20,4) DEFAULT NULL,
        PRIMARY KEY (`id`),
        KEY `pid` (`pid`),
        KEY `resid` (`resid`),
        KEY `locked` (`locked`)
      ) ENGINE=MyISAM AUTO_INCREMENT=9885 DEFAULT CHARSET=utf8

      The new colums are the following ones:

      `time_hr` int(10) unsigned AS (`time`/3600) VIRTUAL,
      `seriesBeginWeekdayHr` varchar(50) AS (DATE_FORMAT(FROM_UNIXTIME(`seriesBegin`), '%W')) VIRTUAL,

      You can find the entire stacktrace as an attachment. The IRC user `tanj` recommended to try the following command to fix the issue:

      mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql

      But this did not solve the problem at all.
      If you need more data, please contact me. I am happy to provide them.

      Greetings
      Leo

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              leo.unglaub Leo Unglaub
              Votes:
              0 Vote for this issue
              Watchers:
              5 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.