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

Assertion `field_handlers == 0 || field_pos < field_count' failed in Protocol_text::store

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Duplicate
    • 10.2(EOL), 10.3(EOL), 10.4(EOL)
    • N/A
    • N/A
    • None

    Description

      create table t1 ( pk int) ;
      insert into t1 values (10);
       
      --disable_warnings
      delimiter $$;
       
      create function f1() returns varchar(16000) 
      begin 
      declare ret varchar(16000);  
      analyze format=json select t1.`pk` from t1 into ret;
      return ret;
      end$$
      delimiter ;$$
       
      select f1();
      --error 0
      select 1;
      
      

      10.4 e8392e58b2a5a69f

       10.4/src/sql/protocol.cc:1164: virtual bool Protocol_text::store(const char*, size_t, CHARSET_INFO*): Assertion `field_handlers == 0 || field_pos < field_count' failed.
       
      190705 17:36:09 [ERROR] mysqld got signal 6 ;
       
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x11390)[0x7f3276bb6390]
      linux/raise.c:54(__GI_raise)[0x7f3275d6b428]
      stdlib/abort.c:91(__GI_abort)[0x7f3275d6d02a]
      assert/assert.c:92(__assert_fail_base)[0x7f3275d63bd7]
      sql/protocol.cc:1165(Protocol_text::store(char const*, unsigned long, charset_info_st const*))[0x5607801089cb]
      sql/sql_type.cc:6745(Type_handler::Item_send_str(Item*, Protocol*, st_value*) const)[0x560780435299]
      sql/sql_type.h:4659(Type_handler_string_result::Item_send(Item*, Protocol*, st_value*) const)[0x560780440d76]
      sql/item.h:1036(Item::send(Protocol*, st_value*))[0x5607801083f1]
      sql/protocol.cc:1035(Protocol::send_result_set_row(List<Item>*))[0x5607801b68f0]
      sql/sql_class.cc:3005(select_send::send_data(List<Item>&))[0x560780275083]
      sql/sql_select.cc:4257(JOIN::exec_inner())[0x56078027499e]
      sql/sql_select.cc:4174(JOIN::exec())[0x560780276043]
      sql/sql_select.cc:4607(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*))[0x56078026660c]
      sql/sql_select.cc:425(handle_select(THD*, LEX*, select_result*, unsigned long))[0x56078022ff48]
      sql/sql_parse.cc:6340(execute_sqlcom_select(THD*, TABLE_LIST*))[0x560780225d96]
      sql/sql_parse.cc:3882(mysql_execute_command(THD*))[0x560780233d20]
      sql/sql_parse.cc:7892(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x56078021ff8f]
      sql/sql_parse.cc:1829(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x56078021e721]
      sql/sql_parse.cc:1360(do_command(THD*))[0x56078039889e]
      sql/sql_connect.cc:1404(do_handle_one_connection(CONNECT*))[0x5607803985c7]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba)[0x7f3276bac6ba]
      x86_64/clone.S:111(clone)[0x7f3275e3d41d]
      

      Attachments

        Issue Links

          Activity

            alice Alice Sherepa created issue -
            alice Alice Sherepa made changes -
            Field Original Value New Value
            Description  {noformat:10.4 e8392e58b2a5a69f9c0}
             /10.4/sql/protocol.cc:1153: virtual bool Protocol_text::store(const char*, size_t, CHARSET_INFO*): Assertion `field_handlers == 0 || field_pos < field_count' failed.
            190705 15:51:45 [ERROR] mysqld got signal 6 ;

            linux/raise.c:54(__GI_raise)[0x7f55cf55d428]
            stdlib/abort.c:91(__GI_abort)[0x7f55cf55f02a]
            assert/assert.c:92(__assert_fail_base)[0x7f55cf555bd7]
            /lib/x86_64-linux-gnu/libc.so.6(+0x2dc82)[0x7f55cf555c82]
            sql/protocol.cc:1154(Protocol_text::store(char const*, unsigned long, charset_info_st const*))[0x55e55b27c5fb]
            sql/sql_type.cc:6740(Type_handler::Item_send_str(Item*, Protocol*, st_value*) const)[0x55e55b5a8adf]
            sql/sql_type.h:4629(Type_handler_string_result::Item_send(Item*, Protocol*, st_value*) const)[0x55e55b5b45f4]
            /10.4/sql/mysqld(+0x6d0394)[0x55e55b281394]
            sql/item.h:1036(Item::send(Protocol*, st_value*))[0x55e55b27c021]
            sql/protocol.cc:1024(Protocol::send_result_set_row(List<Item>*))[0x55e55b32a36a]
            sql/sql_class.cc:3002(select_send::send_data(List<Item>&))[0x55e55b3e8a59]
            sql/sql_select.cc:4257(JOIN::exec_inner())[0x55e55b3e8374]
            sql/sql_select.cc:4174(JOIN::exec())[0x55e55b3e9a19]
            sql/sql_select.cc:4607(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*))[0x55e55b3d9fe2]
            sql/sql_select.cc:425(handle_select(THD*, LEX*, select_result*, unsigned long))[0x55e55b3a3957]
            sql/sql_parse.cc:6335(execute_sqlcom_select(THD*, TABLE_LIST*))[0x55e55b399818]
            sql/sql_parse.cc:3884(mysql_execute_command(THD*))[0x55e55b3a7730]
            sql/sql_parse.cc:7887(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x55e55b393a11]
            sql/sql_parse.cc:1831(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x55e55b3921a3]
            sql/sql_parse.cc:1362(do_command(THD*))[0x55e55b50c12f]
            sql/sql_connect.cc:1403(do_handle_one_connection(CONNECT*))[0x55e55b50be6d]
            /lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba)[0x7f55d039e6ba]
            x86_64/clone.S:111(clone)[0x7f55cf62f41d]
            {noformat}
            {code:sql}
            create table t1 ( pk int) ;
            insert into t1 values (10);

            --disable_warnings
            delimiter $$;

            create function f1() returns varchar(16000)
            begin
            declare ret varchar(16000);
            analyze format=json select t1.`pk` from t1 into ret;
            return ret;
            end$$
            delimiter ;$$

            select f1();
            --error 0
            select 1;

            {code}

            {noformat:title=10.4 e8392e58b2a5a69f}
             10.4/src/sql/protocol.cc:1164: virtual bool Protocol_text::store(const char*, size_t, CHARSET_INFO*): Assertion `field_handlers == 0 || field_pos < field_count' failed.

            190705 17:36:09 [ERROR] mysqld got signal 6 ;

            /lib/x86_64-linux-gnu/libpthread.so.0(+0x11390)[0x7f3276bb6390]
            linux/raise.c:54(__GI_raise)[0x7f3275d6b428]
            stdlib/abort.c:91(__GI_abort)[0x7f3275d6d02a]
            assert/assert.c:92(__assert_fail_base)[0x7f3275d63bd7]
            sql/protocol.cc:1165(Protocol_text::store(char const*, unsigned long, charset_info_st const*))[0x5607801089cb]
            sql/sql_type.cc:6745(Type_handler::Item_send_str(Item*, Protocol*, st_value*) const)[0x560780435299]
            sql/sql_type.h:4659(Type_handler_string_result::Item_send(Item*, Protocol*, st_value*) const)[0x560780440d76]
            sql/item.h:1036(Item::send(Protocol*, st_value*))[0x5607801083f1]
            sql/protocol.cc:1035(Protocol::send_result_set_row(List<Item>*))[0x5607801b68f0]
            sql/sql_class.cc:3005(select_send::send_data(List<Item>&))[0x560780275083]
            sql/sql_select.cc:4257(JOIN::exec_inner())[0x56078027499e]
            sql/sql_select.cc:4174(JOIN::exec())[0x560780276043]
            sql/sql_select.cc:4607(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*))[0x56078026660c]
            sql/sql_select.cc:425(handle_select(THD*, LEX*, select_result*, unsigned long))[0x56078022ff48]
            sql/sql_parse.cc:6340(execute_sqlcom_select(THD*, TABLE_LIST*))[0x560780225d96]
            sql/sql_parse.cc:3882(mysql_execute_command(THD*))[0x560780233d20]
            sql/sql_parse.cc:7892(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x56078021ff8f]
            sql/sql_parse.cc:1829(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x56078021e721]
            sql/sql_parse.cc:1360(do_command(THD*))[0x56078039889e]
            sql/sql_connect.cc:1404(do_handle_one_connection(CONNECT*))[0x5607803985c7]
            /lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba)[0x7f3276bac6ba]
            x86_64/clone.S:111(clone)[0x7f3275e3d41d]
            {noformat}
            alice Alice Sherepa made changes -
            Affects Version/s 10.2 [ 14601 ]
            Affects Version/s 10.3 [ 22126 ]
            alice Alice Sherepa made changes -
            Fix Version/s 10.2 [ 14601 ]
            Fix Version/s 10.3 [ 22126 ]
            alice Alice Sherepa made changes -
            Summary [draft] Assertion `field_handlers == 0 || field_pos < field_count' failed in Protocol_text::store Assertion `field_handlers == 0 || field_pos < field_count' failed in Protocol_text::store
            alice Alice Sherepa made changes -
            alice Alice Sherepa made changes -
            Component/s N/A [ 14411 ]
            Fix Version/s N/A [ 14700 ]
            Fix Version/s 10.2 [ 14601 ]
            Fix Version/s 10.3 [ 22126 ]
            Fix Version/s 10.4 [ 22408 ]
            Resolution Duplicate [ 3 ]
            Status Open [ 1 ] Closed [ 6 ]
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 98047 ] MariaDB v4 [ 156446 ]

            People

              alice Alice Sherepa
              alice Alice Sherepa
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.