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

Assertion `!derived->first_select()->first_inner_unit() || derived->first_select()->first_inner_unit()->with_element || derived->first_select()->first_inner_unit()->first_select()-> exclude_from_table_unique_test' failed

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.2(EOL), 10.3(EOL), 10.4(EOL)
    • 10.2.24
    • Optimizer
    • None

    Description

      create table t1 (i int) engine=myisam; 
      create algorithm=temptable view v1 as select * from t1 ;
      select * from (select 1 from v1 union (select 1 from v1 where @a := uuid())) dt;
      

      10.2 d59ad6972bc70c32ad75

      mysqld: /10.2/sql/table.cc:5637: void TABLE_LIST::set_check_materialized(): Assertion `!derived->first_select()->first_inner_unit() || derived->first_select()->first_inner_unit()->first_select()-> exclude_from_table_unique_test' failed.
       
      stdlib/abort.c:91(__GI_abort)[0x7fc843736bd7]
      assert/assert.c:92(__assert_fail_base)[0x7fc843736c82]
      /10.2/sql/mysqld(_ZN10TABLE_LIST22set_check_materializedEv+0x2af)[0x55c67728514b]
      /10.2/sql/mysqld(_ZN10TABLE_LIST24set_materialized_derivedEv+0x23f)[0x55c676f1597f]
      sql/table.cc:5639(TABLE_LIST::set_check_materialized())[0x55c6777062e8]
      sql/table.h:2360(TABLE_LIST::set_materialized_derived())[0x55c6770928c4]
      sql/item_func.cc:4720(Item_func_set_user_var::fix_fields(THD*, Item**))[0x55c6770902ab]
      sql/sql_select.cc:1353(JOIN::optimize_inner())[0x55c676f8c3f9]
      sql/sql_select.cc:1115(JOIN::optimize())[0x55c676f885aa]
      sql/sql_derived.cc:897(mysql_derived_optimize(THD*, LEX*, TABLE_LIST*))[0x55c677093072]
      sql/sql_derived.cc:198(mysql_handle_single_derived(LEX*, TABLE_LIST*, unsigned int))[0x55c6770902ab]
      sql/sql_select.cc:1401(JOIN::optimize_inner())[0x55c677231e04]
      sql/sql_select.cc:1115(JOIN::optimize())[0x55c676f8c2d6]
      sql/sql_union.cc:957(st_select_lex_unit::optimize())[0x55c676f885aa]
      sql/sql_derived.cc:888(mysql_derived_optimize(THD*, LEX*, TABLE_LIST*))[0x55c677093072]
      sql/sql_derived.cc:198(mysql_handle_single_derived(LEX*, TABLE_LIST*, unsigned int))[0x55c6770902ab]
      sql/sql_select.cc:1401(JOIN::optimize_inner())[0x55c6770a978b]
      sql/sql_select.cc:1115(JOIN::optimize())[0x55c67708913d]
      sql/sql_select.cc:3804(mysql_select(THD*, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*))[0x55c677010aad]
      sql/sql_select.cc:376(handle_select(THD*, LEX*, select_result*, unsigned long))[0x55c676ffdf73]
      sql/sql_parse.cc:6479(execute_sqlcom_select(THD*, TABLE_LIST*))[0x55c677019211]
      sql/sql_parse.cc:3537(mysql_execute_command(THD*))[0x55c676ff48c6]
      sql/sql_parse.cc:8013(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x55c676ff1a45]
      sql/sql_parse.cc:1834(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x55c6773199f6]
      sql/sql_parse.cc:1386(do_command(THD*))[0x55c6773193fe]
      sql/sql_connect.cc:1335(do_handle_one_connection(CONNECT*))[0x55c6784d1404]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba)[0x7fc84437b6ba]
      x86_64/clone.S:111(clone)[0x7fc84381041d]
      

      Attachments

        Issue Links

          Activity

            alice Alice Sherepa created issue -
            alice Alice Sherepa made changes -
            Field Original Value New Value
            Description
            {noformat}
            mysqld: /10.4/sql/table.cc:6165: void TABLE_LIST::set_check_materialized(): Assertion `!derived->first_select()->first_inner_unit() || derived->first_select()->first_inner_unit()->with_element || derived->first_select()->first_inner_unit()->first_select()-> exclude_from_table_unique_test' failed.
            190402 13:44:38 [ERROR] mysqld got signal 6 ;

            stdlib/abort.c:91(__GI_abort)[0x7fb7fcbf502a]
            assert/assert.c:92(__assert_fail_base)[0x7fb7fcbebbd7]
            /lib/x86_64-linux-gnu/libc.so.6(+0x2dc82)[0x7fb7fcbebc82]
            sql/table.cc:6167(TABLE_LIST::set_check_materialized())[0x55b0fc32685d]
            sql/table.h:2631(TABLE_LIST::set_materialized_derived())[0x55b0fbf2810f]
            sql/item_func.cc:4419(Item_func_set_user_var::fix_fields(THD*, Item**))[0x55b0fc9227a3]
            sql/sql_select.cc:1902(JOIN::optimize_inner())[0x55b0fc105a10]
            sql/sql_select.cc:1551(JOIN::optimize())[0x55b0fc1026e7]
            sql/sql_derived.cc:987(mysql_derived_optimize(THD*, LEX*, TABLE_LIST*))[0x55b0fbfab47d]
            sql/sql_derived.cc:203(mysql_handle_single_derived(LEX*, TABLE_LIST*, unsigned int))[0x55b0fbfa6926]
            sql/sql_select.cc:2044(JOIN::optimize_inner())[0x55b0fc10756e]
            sql/sql_select.cc:1551(JOIN::optimize())[0x55b0fc1026e7]
            sql/sql_union.cc:1368(st_select_lex_unit::optimize())[0x55b0fc2c564a]
            sql/sql_derived.cc:956(mysql_derived_optimize(THD*, LEX*, TABLE_LIST*))[0x55b0fbfab175]
            sql/sql_derived.cc:203(mysql_handle_single_derived(LEX*, TABLE_LIST*, unsigned int))[0x55b0fbfa6926]
            sql/sql_select.cc:2044(JOIN::optimize_inner())[0x55b0fc10756e]
            sql/sql_select.cc:1551(JOIN::optimize())[0x55b0fc1026e7]
            sql/sql_select.cc:4571(mysql_select(THD*, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*))[0x55b0fc11f7bb]
            sql/sql_select.cc:424(handle_select(THD*, LEX*, select_result*, unsigned long))[0x55b0fc0f6872]
            sql/sql_parse.cc:6602(execute_sqlcom_select(THD*, TABLE_LIST*))[0x55b0fc07bb61]
            sql/sql_parse.cc:3891(mysql_execute_command(THD*))[0x55b0fc068d7e]
            sql/sql_parse.cc:8154(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x55b0fc083e30]
            sql/sql_parse.cc:1834(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x55b0fc05cad2]
            sql/sql_parse.cc:1365(do_command(THD*))[0x55b0fc059a11]
            sql/sql_connect.cc:1398(do_handle_one_connection(CONNECT*))[0x55b0fc3cd079]
            sql/sql_connect.cc:1302(handle_one_connection)[0x55b0fc3cca43]
            perfschema/pfs.cc:1864(pfs_spawn_thread)[0x55b0fd78bf25]
            /lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba)[0x7fb7fda346ba]
            x86_64/clone.S:111(clone)[0x7fb7fccc541d]

            {noformat}


            {code:sql}
            create table t1 (i int);
            create algorithm=temptable view v1 as select * from t1 ;
            select * from (select 1 from v1 union (select 1 from v1 where @a := uuid())) dt;
            {code}

            {noformat:title=10.2 d59ad6972bc70c32ad75}
            mysqld: /10.2/sql/table.cc:5637: void TABLE_LIST::set_check_materialized(): Assertion `!derived->first_select()->first_inner_unit() || derived->first_select()->first_inner_unit()->first_select()-> exclude_from_table_unique_test' failed.

            stdlib/abort.c:91(__GI_abort)[0x7fc843736bd7]
            assert/assert.c:92(__assert_fail_base)[0x7fc843736c82]
            /10.2/sql/mysqld(_ZN10TABLE_LIST22set_check_materializedEv+0x2af)[0x55c67728514b]
            /10.2/sql/mysqld(_ZN10TABLE_LIST24set_materialized_derivedEv+0x23f)[0x55c676f1597f]
            sql/table.cc:5639(TABLE_LIST::set_check_materialized())[0x55c6777062e8]
            sql/table.h:2360(TABLE_LIST::set_materialized_derived())[0x55c6770928c4]
            sql/item_func.cc:4720(Item_func_set_user_var::fix_fields(THD*, Item**))[0x55c6770902ab]
            sql/sql_select.cc:1353(JOIN::optimize_inner())[0x55c676f8c3f9]
            sql/sql_select.cc:1115(JOIN::optimize())[0x55c676f885aa]
            sql/sql_derived.cc:897(mysql_derived_optimize(THD*, LEX*, TABLE_LIST*))[0x55c677093072]
            sql/sql_derived.cc:198(mysql_handle_single_derived(LEX*, TABLE_LIST*, unsigned int))[0x55c6770902ab]
            sql/sql_select.cc:1401(JOIN::optimize_inner())[0x55c677231e04]
            sql/sql_select.cc:1115(JOIN::optimize())[0x55c676f8c2d6]
            sql/sql_union.cc:957(st_select_lex_unit::optimize())[0x55c676f885aa]
            sql/sql_derived.cc:888(mysql_derived_optimize(THD*, LEX*, TABLE_LIST*))[0x55c677093072]
            sql/sql_derived.cc:198(mysql_handle_single_derived(LEX*, TABLE_LIST*, unsigned int))[0x55c6770902ab]
            sql/sql_select.cc:1401(JOIN::optimize_inner())[0x55c6770a978b]
            sql/sql_select.cc:1115(JOIN::optimize())[0x55c67708913d]
            sql/sql_select.cc:3804(mysql_select(THD*, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*))[0x55c677010aad]
            sql/sql_select.cc:376(handle_select(THD*, LEX*, select_result*, unsigned long))[0x55c676ffdf73]
            sql/sql_parse.cc:6479(execute_sqlcom_select(THD*, TABLE_LIST*))[0x55c677019211]
            sql/sql_parse.cc:3537(mysql_execute_command(THD*))[0x55c676ff48c6]
            sql/sql_parse.cc:8013(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x55c676ff1a45]
            sql/sql_parse.cc:1834(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x55c6773199f6]
            sql/sql_parse.cc:1386(do_command(THD*))[0x55c6773193fe]
            sql/sql_connect.cc:1335(do_handle_one_connection(CONNECT*))[0x55c6784d1404]
            /lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba)[0x7fc84437b6ba]
            x86_64/clone.S:111(clone)[0x7fc84381041d]
            {noformat}
            alice Alice Sherepa made changes -
            Affects Version/s 10.2 [ 14601 ]
            Affects Version/s 10.3 [ 22126 ]
            Affects Version/s 10.4 [ 22408 ]
            alice Alice Sherepa made changes -
            Fix Version/s 10.2 [ 14601 ]
            Fix Version/s 10.3 [ 22126 ]
            Fix Version/s 10.4 [ 22408 ]
            alice Alice Sherepa made changes -
            Description

            {code:sql}
            create table t1 (i int);
            create algorithm=temptable view v1 as select * from t1 ;
            select * from (select 1 from v1 union (select 1 from v1 where @a := uuid())) dt;
            {code}

            {noformat:title=10.2 d59ad6972bc70c32ad75}
            mysqld: /10.2/sql/table.cc:5637: void TABLE_LIST::set_check_materialized(): Assertion `!derived->first_select()->first_inner_unit() || derived->first_select()->first_inner_unit()->first_select()-> exclude_from_table_unique_test' failed.

            stdlib/abort.c:91(__GI_abort)[0x7fc843736bd7]
            assert/assert.c:92(__assert_fail_base)[0x7fc843736c82]
            /10.2/sql/mysqld(_ZN10TABLE_LIST22set_check_materializedEv+0x2af)[0x55c67728514b]
            /10.2/sql/mysqld(_ZN10TABLE_LIST24set_materialized_derivedEv+0x23f)[0x55c676f1597f]
            sql/table.cc:5639(TABLE_LIST::set_check_materialized())[0x55c6777062e8]
            sql/table.h:2360(TABLE_LIST::set_materialized_derived())[0x55c6770928c4]
            sql/item_func.cc:4720(Item_func_set_user_var::fix_fields(THD*, Item**))[0x55c6770902ab]
            sql/sql_select.cc:1353(JOIN::optimize_inner())[0x55c676f8c3f9]
            sql/sql_select.cc:1115(JOIN::optimize())[0x55c676f885aa]
            sql/sql_derived.cc:897(mysql_derived_optimize(THD*, LEX*, TABLE_LIST*))[0x55c677093072]
            sql/sql_derived.cc:198(mysql_handle_single_derived(LEX*, TABLE_LIST*, unsigned int))[0x55c6770902ab]
            sql/sql_select.cc:1401(JOIN::optimize_inner())[0x55c677231e04]
            sql/sql_select.cc:1115(JOIN::optimize())[0x55c676f8c2d6]
            sql/sql_union.cc:957(st_select_lex_unit::optimize())[0x55c676f885aa]
            sql/sql_derived.cc:888(mysql_derived_optimize(THD*, LEX*, TABLE_LIST*))[0x55c677093072]
            sql/sql_derived.cc:198(mysql_handle_single_derived(LEX*, TABLE_LIST*, unsigned int))[0x55c6770902ab]
            sql/sql_select.cc:1401(JOIN::optimize_inner())[0x55c6770a978b]
            sql/sql_select.cc:1115(JOIN::optimize())[0x55c67708913d]
            sql/sql_select.cc:3804(mysql_select(THD*, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*))[0x55c677010aad]
            sql/sql_select.cc:376(handle_select(THD*, LEX*, select_result*, unsigned long))[0x55c676ffdf73]
            sql/sql_parse.cc:6479(execute_sqlcom_select(THD*, TABLE_LIST*))[0x55c677019211]
            sql/sql_parse.cc:3537(mysql_execute_command(THD*))[0x55c676ff48c6]
            sql/sql_parse.cc:8013(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x55c676ff1a45]
            sql/sql_parse.cc:1834(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x55c6773199f6]
            sql/sql_parse.cc:1386(do_command(THD*))[0x55c6773193fe]
            sql/sql_connect.cc:1335(do_handle_one_connection(CONNECT*))[0x55c6784d1404]
            /lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba)[0x7fc84437b6ba]
            x86_64/clone.S:111(clone)[0x7fc84381041d]
            {noformat}
            {code:sql}
            create table t1 (i int) engine=myisam;
            create algorithm=temptable view v1 as select * from t1 ;
            select * from (select 1 from v1 union (select 1 from v1 where @a := uuid())) dt;
            {code}

            {noformat:title=10.2 d59ad6972bc70c32ad75}
            mysqld: /10.2/sql/table.cc:5637: void TABLE_LIST::set_check_materialized(): Assertion `!derived->first_select()->first_inner_unit() || derived->first_select()->first_inner_unit()->first_select()-> exclude_from_table_unique_test' failed.

            stdlib/abort.c:91(__GI_abort)[0x7fc843736bd7]
            assert/assert.c:92(__assert_fail_base)[0x7fc843736c82]
            /10.2/sql/mysqld(_ZN10TABLE_LIST22set_check_materializedEv+0x2af)[0x55c67728514b]
            /10.2/sql/mysqld(_ZN10TABLE_LIST24set_materialized_derivedEv+0x23f)[0x55c676f1597f]
            sql/table.cc:5639(TABLE_LIST::set_check_materialized())[0x55c6777062e8]
            sql/table.h:2360(TABLE_LIST::set_materialized_derived())[0x55c6770928c4]
            sql/item_func.cc:4720(Item_func_set_user_var::fix_fields(THD*, Item**))[0x55c6770902ab]
            sql/sql_select.cc:1353(JOIN::optimize_inner())[0x55c676f8c3f9]
            sql/sql_select.cc:1115(JOIN::optimize())[0x55c676f885aa]
            sql/sql_derived.cc:897(mysql_derived_optimize(THD*, LEX*, TABLE_LIST*))[0x55c677093072]
            sql/sql_derived.cc:198(mysql_handle_single_derived(LEX*, TABLE_LIST*, unsigned int))[0x55c6770902ab]
            sql/sql_select.cc:1401(JOIN::optimize_inner())[0x55c677231e04]
            sql/sql_select.cc:1115(JOIN::optimize())[0x55c676f8c2d6]
            sql/sql_union.cc:957(st_select_lex_unit::optimize())[0x55c676f885aa]
            sql/sql_derived.cc:888(mysql_derived_optimize(THD*, LEX*, TABLE_LIST*))[0x55c677093072]
            sql/sql_derived.cc:198(mysql_handle_single_derived(LEX*, TABLE_LIST*, unsigned int))[0x55c6770902ab]
            sql/sql_select.cc:1401(JOIN::optimize_inner())[0x55c6770a978b]
            sql/sql_select.cc:1115(JOIN::optimize())[0x55c67708913d]
            sql/sql_select.cc:3804(mysql_select(THD*, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*))[0x55c677010aad]
            sql/sql_select.cc:376(handle_select(THD*, LEX*, select_result*, unsigned long))[0x55c676ffdf73]
            sql/sql_parse.cc:6479(execute_sqlcom_select(THD*, TABLE_LIST*))[0x55c677019211]
            sql/sql_parse.cc:3537(mysql_execute_command(THD*))[0x55c676ff48c6]
            sql/sql_parse.cc:8013(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x55c676ff1a45]
            sql/sql_parse.cc:1834(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x55c6773199f6]
            sql/sql_parse.cc:1386(do_command(THD*))[0x55c6773193fe]
            sql/sql_connect.cc:1335(do_handle_one_connection(CONNECT*))[0x55c6784d1404]
            /lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba)[0x7fc84437b6ba]
            x86_64/clone.S:111(clone)[0x7fc84381041d]
            {noformat}
            alice Alice Sherepa made changes -
            Status Open [ 1 ] Confirmed [ 10101 ]
            alice Alice Sherepa made changes -
            Assignee Alice Sherepa [ alice ] Igor Babaev [ igor ]
            igor Igor Babaev (Inactive) made changes -
            Assignee Igor Babaev [ igor ] Galina Shalygina [ shagalla ]
            alice Alice Sherepa made changes -

            The bug occurs because @a := uuid() is pushed into v1 view. It shouldn't be pushed so the fix for this bug is trivial.

            shagalla Galina Shalygina (Inactive) added a comment - The bug occurs because @a := uuid() is pushed into v1 view. It shouldn't be pushed so the fix for this bug is trivial.
            shagalla Galina Shalygina (Inactive) made changes -
            Status Confirmed [ 10101 ] In Progress [ 3 ]
            shagalla Galina Shalygina (Inactive) made changes -
            Assignee Galina Shalygina [ shagalla ] Igor Babaev [ igor ]
            Status In Progress [ 3 ] In Review [ 10002 ]

            Ok to push into 10.2

            igor Igor Babaev (Inactive) added a comment - Ok to push into 10.2
            igor Igor Babaev (Inactive) made changes -
            Status In Review [ 10002 ] Stalled [ 10000 ]
            shagalla Galina Shalygina (Inactive) made changes -
            Assignee Igor Babaev [ igor ] Galina Shalygina [ shagalla ]

            Pushed in 10.2

            shagalla Galina Shalygina (Inactive) added a comment - Pushed in 10.2
            shagalla Galina Shalygina (Inactive) made changes -
            Component/s Optimizer [ 10200 ]
            Fix Version/s 10.2.24 [ 23308 ]
            Fix Version/s 10.2 [ 14601 ]
            Fix Version/s 10.3 [ 22126 ]
            Fix Version/s 10.4 [ 22408 ]
            Resolution Fixed [ 1 ]
            Status Stalled [ 10000 ] Closed [ 6 ]
            alice Alice Sherepa made changes -
            alice Alice Sherepa made changes -
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 94171 ] MariaDB v4 [ 156025 ]

            People

              shagalla Galina Shalygina (Inactive)
              alice Alice Sherepa
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.