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

Virtual Column with CURDATE function cause suddenly entire MariaDB crash

    XMLWordPrintable

Details

    Description

      I see that MariaDb is restarting continuosly after I inserted the new column "is_available".
      This is a virtual column on:

      `date_availability_start` < curdate() and `date_availability_end` > curdate()
      

      It crash with a 30% of possibility if I run just:

      SELECT * FROM `products_gas` LIMIT 0, 25
      

      So every 3 refresh the server is restarting.
      I decided to drop the column and now it works back again.
      I'll attach the log to this.

      CREATE TABLE `products_gas` (
        `product_gas_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
        `provider_id` int(11) unsigned NOT NULL,
        `product_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
        `product_code` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
        `market_type` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL,
        `customer_type` varchar(255) COLLATE utf8mb4_unicode_ci GENERATED ALWAYS AS (json_unquote(json_extract(`parsed_raw`,'$.customer_type'))) VIRTUAL,
        `offer_type` varchar(255) COLLATE utf8mb4_unicode_ci GENERATED ALWAYS AS (json_unquote(json_extract(`parsed_raw`,'$.offer_type'))) VIRTUAL,
        `product_raw` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
        `parsed_raw` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
        `is_parsed` tinyint(1) GENERATED ALWAYS AS (`date_parsed` is not null) VIRTUAL,
        `is_available` tinyint(1) GENERATED ALWAYS AS (`date_availability_start` < curdate() and `date_availability_end` > curdate()) VIRTUAL,
        `is_deleted` tinyint(1) GENERATED ALWAYS AS (`date_deleted` is not null) VIRTUAL,
        `date_created` datetime NOT NULL,
        `date_parsed` datetime DEFAULT NULL,
        `date_availability_start` datetime DEFAULT NULL,
        `date_availability_end` datetime DEFAULT NULL,
        `date_deleted` datetime DEFAULT NULL,
        PRIMARY KEY (`product_gas_id`),
        KEY `provider_id` (`provider_id`),
        KEY `product_code` (`product_code`),
        KEY `market_type` (`market_type`),
        KEY `customer_type` (`customer_type`),
        KEY `offer_type` (`offer_type`)
      ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
      

      Attachments

        Issue Links

          Activity

            People

              midenok Aleksey Midenkov
              maxcuttins Massimiliano Cuttini
              Votes:
              0 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.