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

MariaDB Server crashes when planning the query to a view

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Duplicate
    • 10.11.9
    • 10.5.27
    • Optimizer
    • None
    • Windows 10

    Description

      A Server crash can be reproduced in the example below:

      1) Create a database:

      CREATE DATABASE sample;

      2) Create a view with the following statement:

      DROP VIEW IF EXISTS `v_test`;
      CREATE VIEW `v_test`
      AS
      (
      SELECT 1 AS `Column1`
      FROM (SELECT 1) t1
      )
      UNION ALL
      (
      SELECT
      CASE 1 > 1
      WHEN 0 THEN 1
      ELSE 0
      END AS `Column1`
      FROM (SELECT 2) t2
      );

      3) Run the following query:

      Notes:

      • You can run the query with or without the EXPLAIN operator but you will get the same result
      • The query runs without error if `condition_pushdown_for_derived` is disabled

      – EXPLAIN
      SELECT *
      FROM `v_test`
      WHERE `v_test`.`Column1`= 1;

      4) MariaDB has crashed.

      Backtrace added to Attachments.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              stanly Stan Lyubich
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.