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

Assertion `item->type() == Item::FIELD_ITEM || (item->type() == Item::REF_ITEM && ((Item_ref *) item)->ref_type() == Item_ref::VIEW_REF)' failed in find_producing_item

    XMLWordPrintable

Details

    • Bug
    • Status: Confirmed (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.4(EOL), 10.5, 10.6, 10.11, 11.0(EOL), 11.1(EOL), 11.2(EOL), 11.3(EOL), 11.4
    • 10.5, 10.6, 10.11, 11.4
    • None
    • None

    Description

       SET collation_connection      = utf8mb4_czech_ci ;
       CREATE  VIEW v1 AS select 'a' AS a  ;
       
      prepare stmt from " SELECT  1 FROM v1 WHERE a LIKE collation(CASE 1 WHEN a THEN (convert(default(a) USING utf8mb4))  END)";
      execute stmt;
      

      Version: '10.4.29-MariaDB-debug-log'
      mysqld: /10.4/src/sql/item.cc:7644: Item* find_producing_item(Item*, st_select_lex*): Assertion `item->type() == Item::FIELD_ITEM || (item->type() == Item::REF_ITEM && ((Item_ref *) item)->ref_type() == Item_ref::VIEW_REF)' failed.
      230404 18:07:14 [ERROR] mysqld got signal 6 ;
       
      Server version: 10.4.29-MariaDB-debug-log source revision: 0a6343909fcf8b193a1b517b3a16eabd4ae89a83
       
      /lib/x86_64-linux-gnu/libc.so.6(+0x33fd6)[0x7f01f7ce5fd6]
      sql/item.cc:7647(find_producing_item(Item*, st_select_lex*))[0x556924fe5b29]
      sql/item.cc:7680(Item_field::derived_field_transformer_for_where(THD*, unsigned char*))[0x556924fe6053]
      sql/item.cc:9664(Item_default_value::transform(THD*, Item* (Item::*)(THD*, unsigned char*), unsigned char*))[0x556924ffad2f]
      sql/item_func.cc:465(Item_args::transform_args(THD*, Item* (Item::*)(THD*, unsigned char*), unsigned char*))[0x5569250b3e1b]
      sql/item_func.cc:501(Item_func::transform(THD*, Item* (Item::*)(THD*, unsigned char*), unsigned char*))[0x5569250b4099]
      sql/item_func.cc:465(Item_args::transform_args(THD*, Item* (Item::*)(THD*, unsigned char*), unsigned char*))[0x5569250b3e1b]
      sql/item_func.cc:501(Item_func::transform(THD*, Item* (Item::*)(THD*, unsigned char*), unsigned char*))[0x5569250b4099]
      sql/item_func.cc:465(Item_args::transform_args(THD*, Item* (Item::*)(THD*, unsigned char*), unsigned char*))[0x5569250b3e1b]
      sql/item_func.cc:501(Item_func::transform(THD*, Item* (Item::*)(THD*, unsigned char*), unsigned char*))[0x5569250b4099]
      sql/item_func.cc:465(Item_args::transform_args(THD*, Item* (Item::*)(THD*, unsigned char*), unsigned char*))[0x5569250b3e1b]
      sql/item_func.cc:501(Item_func::transform(THD*, Item* (Item::*)(THD*, unsigned char*), unsigned char*))[0x5569250b4099]
      sql/item_func.cc:465(Item_args::transform_args(THD*, Item* (Item::*)(THD*, unsigned char*), unsigned char*))[0x5569250b3e1b]
      sql/item_func.cc:501(Item_func::transform(THD*, Item* (Item::*)(THD*, unsigned char*), unsigned char*))[0x5569250b4099]
      sql/sql_derived.cc:1366(transform_condition_or_part(THD*, Item*, Item* (Item::*)(THD*, unsigned char*), unsigned char*))[0x5569246cb0e3]
      sql/sql_lex.cc:9856(st_select_lex::pushdown_cond_into_where_clause(THD*, Item*, Item**, Item* (Item::*)(THD*, unsigned char*), unsigned char*))[0x556924759c61]
      sql/sql_derived.cc:1558(pushdown_cond_for_derived(THD*, Item*, TABLE_LIST*))[0x5569246cbed1]
      sql/sql_select.cc:2177(JOIN::optimize_inner())[0x55692485a49d]
      sql/sql_select.cc:1690(JOIN::optimize())[0x55692485500b]
      sql/sql_select.cc:4797(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*))[0x5569248761a1]
      sql/sql_select.cc:442(handle_select(THD*, LEX*, select_result*, unsigned long))[0x556924846e84]
      sql/sql_parse.cc:6463(execute_sqlcom_select(THD*, TABLE_LIST*))[0x5569247b35bc]
      sql/sql_parse.cc:3966(mysql_execute_command(THD*))[0x5569247a0d33]
      sql/sql_prepare.cc:5024(Prepared_statement::execute(String*, bool))[0x5569248123f3]
      sql/sql_prepare.cc:4493(Prepared_statement::execute_loop(String*, bool, unsigned char*, unsigned char*))[0x55692480d888]
      sql/sql_prepare.cc:3578(mysql_sql_stmt_execute(THD*))[0x55692480739d]
      sql/sql_parse.cc:3983(mysql_execute_command(THD*))[0x5569247a0d78]
      sql/sql_parse.cc:7998(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x5569247bca1f]
      sql/sql_parse.cc:1860(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x55692479305f]
      sql/sql_parse.cc:1378(do_command(THD*))[0x55692478fb94]
      sql/sql_connect.cc:1420(do_handle_one_connection(CONNECT*))[0x556924b9bce5]
      sql/sql_connect.cc:1325(handle_one_connection)[0x556924b9b589]
      perfschema/pfs.cc:1871(pfs_spawn_thread)[0x55692583d3e0]
      nptl/pthread_create.c:478(start_thread)[0x7f01f8200609]
      /lib/x86_64-linux-gnu/libc.so.6(clone+0x43)[0x7f01f7dd1133]
       
      Query (0x62b000062328): SELECT  1 FROM v1 WHERE a LIKE collation(CASE 1 WHEN a THEN (convert(default(a) USING utf8mb4))  END)
      

      also repeatable with ANALYZE.

      Attachments

        Issue Links

          Activity

            People

              igor Igor Babaev
              alice Alice Sherepa
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.