Bug #108783 Create view with subquery assertion error
Submitted: 14 Oct 2022 12:10 Modified: 16 Nov 2022 1:48
Reporter: Pedro Ferreira Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: DDL Severity:S6 (Debug Builds)
Version:8.0.31 OS:Ubuntu (22.04)
Assigned to: CPU Architecture:x86 (x86_64)
Tags: subquery, VIEW

[14 Oct 2022 12:10] Pedro Ferreira
Description:
The following query:

CREATE VIEW t1(c0) AS (SELECT group_concat((SELECT 1), 1));

Triggers an assertion error at item_subselect.cc:655

assert(!thd->lex->is_view_context_analysis());

The compilation parameters are the same as issue 108148:

-DWITH_DEBUG=1 -DWITH_ASAN=ON -DWITH_UBSAN=ON and boost library version 1.77

How to repeat:
Run the query above.
[14 Oct 2022 12:20] MySQL Verification Team
Hello Pedro Ferreira,

Thank you for the report and feedback.
Observed that 8.0.31 debug build is affected.

regards,
Umesh
[16 Nov 2022 1:48] Jon Stephens
Documented fix in the MySQL 8.0.32 changelog as follows:

    A CREATE VIEW statement that contained a subquery sometimes led
    to an assertion in debug builds.

Closed.