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

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

Details

    Description

      CREATE TABLE t1 (ct time);
      INSERT INTO t1 VALUES ('16:11:28');
       
      DELIMITER @@@;
      CREATE FUNCTION f1 () RETURNS varchar(100) 
      BEGIN 
      DECLARE xxx varchar(100); 
      ANALYZE SELECT sum(ct) FROM t1 INTO xxx ; 
      RETURN xxx; 
      END@@@
       
      DELIMITER ;@@@
      --error 2000
      SELECT f1();
      --error 0
      SELECT f1();
      

      10.2 0d7cf06af5c952f4beaf2

      mysqld: /10.2/src/sql/protocol.cc:1119: virtual bool Protocol_text::store(const char*, size_t, CHARSET_INFO*): Assertion `field_pos < field_count' failed.
       
      stdlib/abort.c:91(__GI_abort)[0x7fb4930ff02a]
      assert/assert.c:92(__assert_fail_base)[0x7fb4930f5bd7]
      /lib/x86_64-linux-gnu/libc.so.6(+0x2dc82)[0x7fb4930f5c82]
      sql/protocol.cc:1120(Protocol_text::store(char const*, unsigned long, charset_info_st const*))[0x55d546f3a851]
      sql/item.cc:6864(Item::send(Protocol*, String*))[0x55d547719f29]
      sql/protocol.cc:979(Protocol::send_result_set_row(List<Item>*))[0x55d546f39adc]
      sql/sql_class.cc:2708(select_send::send_data(List<Item>&))[0x55d5470536f0]
      sql/sql_select.cc:3495(JOIN::exec_inner())[0x55d5471a59f7]
      sql/sql_select.cc:3417(JOIN::exec())[0x55d5471a4874]
      sql/sql_select.cc:3818(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*))[0x55d5471a7bc1]
      sql/sql_select.cc:376(handle_select(THD*, LEX*, select_result*, unsigned long))[0x55d5471873dd]
      sql/sql_parse.cc:6479(execute_sqlcom_select(THD*, TABLE_LIST*))[0x55d54710df28]
      sql/sql_parse.cc:3485(mysql_execute_command(THD*))[0x55d5470faf21]
      sql/sql_parse.cc:8013(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x55d54711668d]
      sql/sql_parse.cc:1826(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x55d5470f1b74]
      sql/sql_parse.cc:1378(do_command(THD*))[0x55d5470eed28]
      sql/sql_connect.cc:1335(do_handle_one_connection(CONNECT*))[0x55d547414be4]
      sql/sql_connect.cc:1242(handle_one_connection)[0x55d5474145ec]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba)[0x7fb493d3a6ba]
      x86_64/clone.S:111(clone)[0x7fb4931cf41d]
      

      Attachments

        Issue Links

          Activity

            alice Alice Sherepa created issue -
            alice Alice Sherepa made changes -
            Field Original Value New Value
            Description {noformat}
            mysqld: /git/10.4/sql/protocol.cc:1120: virtual bool Protocol_text::store(const char*, size_t, CHARSET_INFO*): Assertion `field_types == 0 || field_pos < field_count' failed.
            181210 13:29:59 [ERROR] mysqld got signal 6 ;

            Server version: 10.4.1-MariaDB-debug-log

            stdlib/abort.c:91(__GI_abort)[0x7f8a270a402a]
            assert/assert.c:92(__assert_fail_base)[0x7f8a2709abd7]
            /lib/x86_64-linux-gnu/libc.so.6(+0x2dc82)[0x7f8a2709ac82]
            sql/protocol.cc:1121(Protocol_text::store(char const*, unsigned long, charset_info_st const*))[0x560e77bcb0bb]
            sql/sql_type.cc:6417(Type_handler::Item_send_str(Item*, Protocol*, st_value*) const)[0x560e782a751e]
            sql/sql_type.h:4338(Type_handler_string_result::Item_send(Item*, Protocol*, st_value*) const)[0x560e782b9542]
            /git/10.4/sql/mysqld(+0xe4dd10)[0x560e77bd6d10]
            sql/item.h:1014(Item::send(Protocol*, st_value*))[0x560e77bca02e]
            sql/protocol.cc:986(Protocol::send_result_set_row(List<Item>*))[0x560e77d35e2e]
            sql/sql_class.cc:2949(select_send::send_data(List<Item>&))[0x560e77ed48f8]
            sql/sql_select.cc:3967(JOIN::exec_inner())[0x560e77ed37e4]
            sql/sql_select.cc:3889(JOIN::exec())[0x560e77ed6c13]
            sql/sql_select.cc:4295(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*))[0x560e77eb0eae]
            sql/sql_select.cc:385(handle_select(THD*, LEX*, select_result*, unsigned long))[0x560e77e36e90]
            sql/sql_parse.cc:6566(execute_sqlcom_select(THD*, TABLE_LIST*))[0x560e77e255c3]
            sql/sql_parse.cc:3775(mysql_execute_command(THD*))[0x560e77e3f444]
            sql/sql_parse.cc:8103(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x560e77e1a266]
            sql/sql_parse.cc:1852(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x560e77e173fe]
            sql/sql_parse.cc:1395(do_command(THD*))[0x560e7816e4db]
            sql/sql_connect.cc:1402(do_handle_one_connection(CONNECT*))[0x560e7816deb8]
            /lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba)[0x7f8a27cdf6ba]
            x86_64/clone.S:111(clone)[0x7f8a2717441d]
            {noformat}
            {code:sql}
            CREATE TABLE t1 (ct time);
            INSERT INTO t1 VALUES ('16:11:28');

            DELIMITER @@@;
            CREATE FUNCTION f1 () RETURNS varchar(100)
            BEGIN
            DECLARE xxx varchar(100);
            ANALYZE SELECT sum(ct) FROM t1 INTO xxx ;
            RETURN xxx;
            END@@@

            DELIMITER ;@@@
            --error 2000
            SELECT f1();
            --error 0
            SELECT f1();
            {code}

            {noformat:title=10.2 0d7cf06af5c952f4beaf2}
            mysqld: /10.2/src/sql/protocol.cc:1119: virtual bool Protocol_text::store(const char*, size_t, CHARSET_INFO*): Assertion `field_pos < field_count' failed.
            181210 16:57:49 [ERROR] mysqld got signal 6 ;

            Server version: 10.2.20-MariaDB-debug

            stdlib/abort.c:91(__GI_abort)[0x7fb4930ff02a]
            assert/assert.c:92(__assert_fail_base)[0x7fb4930f5bd7]
            /lib/x86_64-linux-gnu/libc.so.6(+0x2dc82)[0x7fb4930f5c82]
            sql/protocol.cc:1120(Protocol_text::store(char const*, unsigned long, charset_info_st const*))[0x55d546f3a851]
            sql/item.cc:6864(Item::send(Protocol*, String*))[0x55d547719f29]
            sql/protocol.cc:979(Protocol::send_result_set_row(List<Item>*))[0x55d546f39adc]
            sql/sql_class.cc:2708(select_send::send_data(List<Item>&))[0x55d5470536f0]
            sql/sql_select.cc:3495(JOIN::exec_inner())[0x55d5471a59f7]
            sql/sql_select.cc:3417(JOIN::exec())[0x55d5471a4874]
            sql/sql_select.cc:3818(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*))[0x55d5471a7bc1]
            sql/sql_select.cc:376(handle_select(THD*, LEX*, select_result*, unsigned long))[0x55d5471873dd]
            sql/sql_parse.cc:6479(execute_sqlcom_select(THD*, TABLE_LIST*))[0x55d54710df28]
            sql/sql_parse.cc:3485(mysql_execute_command(THD*))[0x55d5470faf21]
            sql/sql_parse.cc:8013(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x55d54711668d]
            sql/sql_parse.cc:1826(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x55d5470f1b74]
            sql/sql_parse.cc:1378(do_command(THD*))[0x55d5470eed28]
            sql/sql_connect.cc:1335(do_handle_one_connection(CONNECT*))[0x55d547414be4]
            sql/sql_connect.cc:1242(handle_one_connection)[0x55d5474145ec]
            /lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba)[0x7fb493d3a6ba]
            x86_64/clone.S:111(clone)[0x7fb4931cf41d]
            {noformat}
            alice Alice Sherepa made changes -
            Description {code:sql}
            CREATE TABLE t1 (ct time);
            INSERT INTO t1 VALUES ('16:11:28');

            DELIMITER @@@;
            CREATE FUNCTION f1 () RETURNS varchar(100)
            BEGIN
            DECLARE xxx varchar(100);
            ANALYZE SELECT sum(ct) FROM t1 INTO xxx ;
            RETURN xxx;
            END@@@

            DELIMITER ;@@@
            --error 2000
            SELECT f1();
            --error 0
            SELECT f1();
            {code}

            {noformat:title=10.2 0d7cf06af5c952f4beaf2}
            mysqld: /10.2/src/sql/protocol.cc:1119: virtual bool Protocol_text::store(const char*, size_t, CHARSET_INFO*): Assertion `field_pos < field_count' failed.
            181210 16:57:49 [ERROR] mysqld got signal 6 ;

            Server version: 10.2.20-MariaDB-debug

            stdlib/abort.c:91(__GI_abort)[0x7fb4930ff02a]
            assert/assert.c:92(__assert_fail_base)[0x7fb4930f5bd7]
            /lib/x86_64-linux-gnu/libc.so.6(+0x2dc82)[0x7fb4930f5c82]
            sql/protocol.cc:1120(Protocol_text::store(char const*, unsigned long, charset_info_st const*))[0x55d546f3a851]
            sql/item.cc:6864(Item::send(Protocol*, String*))[0x55d547719f29]
            sql/protocol.cc:979(Protocol::send_result_set_row(List<Item>*))[0x55d546f39adc]
            sql/sql_class.cc:2708(select_send::send_data(List<Item>&))[0x55d5470536f0]
            sql/sql_select.cc:3495(JOIN::exec_inner())[0x55d5471a59f7]
            sql/sql_select.cc:3417(JOIN::exec())[0x55d5471a4874]
            sql/sql_select.cc:3818(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*))[0x55d5471a7bc1]
            sql/sql_select.cc:376(handle_select(THD*, LEX*, select_result*, unsigned long))[0x55d5471873dd]
            sql/sql_parse.cc:6479(execute_sqlcom_select(THD*, TABLE_LIST*))[0x55d54710df28]
            sql/sql_parse.cc:3485(mysql_execute_command(THD*))[0x55d5470faf21]
            sql/sql_parse.cc:8013(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x55d54711668d]
            sql/sql_parse.cc:1826(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x55d5470f1b74]
            sql/sql_parse.cc:1378(do_command(THD*))[0x55d5470eed28]
            sql/sql_connect.cc:1335(do_handle_one_connection(CONNECT*))[0x55d547414be4]
            sql/sql_connect.cc:1242(handle_one_connection)[0x55d5474145ec]
            /lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba)[0x7fb493d3a6ba]
            x86_64/clone.S:111(clone)[0x7fb4931cf41d]
            {noformat}
            {code:sql}
            CREATE TABLE t1 (ct time);
            INSERT INTO t1 VALUES ('16:11:28');

            DELIMITER @@@;
            CREATE FUNCTION f1 () RETURNS varchar(100)
            BEGIN
            DECLARE xxx varchar(100);
            ANALYZE SELECT sum(ct) FROM t1 INTO xxx ;
            RETURN xxx;
            END@@@

            DELIMITER ;@@@
            --error 2000
            SELECT f1();
            --error 0
            SELECT f1();
            {code}

            {noformat:title=10.2 0d7cf06af5c952f4beaf2}
            mysqld: /10.2/src/sql/protocol.cc:1119: virtual bool Protocol_text::store(const char*, size_t, CHARSET_INFO*): Assertion `field_pos < field_count' failed.

            stdlib/abort.c:91(__GI_abort)[0x7fb4930ff02a]
            assert/assert.c:92(__assert_fail_base)[0x7fb4930f5bd7]
            /lib/x86_64-linux-gnu/libc.so.6(+0x2dc82)[0x7fb4930f5c82]
            sql/protocol.cc:1120(Protocol_text::store(char const*, unsigned long, charset_info_st const*))[0x55d546f3a851]
            sql/item.cc:6864(Item::send(Protocol*, String*))[0x55d547719f29]
            sql/protocol.cc:979(Protocol::send_result_set_row(List<Item>*))[0x55d546f39adc]
            sql/sql_class.cc:2708(select_send::send_data(List<Item>&))[0x55d5470536f0]
            sql/sql_select.cc:3495(JOIN::exec_inner())[0x55d5471a59f7]
            sql/sql_select.cc:3417(JOIN::exec())[0x55d5471a4874]
            sql/sql_select.cc:3818(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*))[0x55d5471a7bc1]
            sql/sql_select.cc:376(handle_select(THD*, LEX*, select_result*, unsigned long))[0x55d5471873dd]
            sql/sql_parse.cc:6479(execute_sqlcom_select(THD*, TABLE_LIST*))[0x55d54710df28]
            sql/sql_parse.cc:3485(mysql_execute_command(THD*))[0x55d5470faf21]
            sql/sql_parse.cc:8013(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x55d54711668d]
            sql/sql_parse.cc:1826(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x55d5470f1b74]
            sql/sql_parse.cc:1378(do_command(THD*))[0x55d5470eed28]
            sql/sql_connect.cc:1335(do_handle_one_connection(CONNECT*))[0x55d547414be4]
            sql/sql_connect.cc:1242(handle_one_connection)[0x55d5474145ec]
            /lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba)[0x7fb493d3a6ba]
            x86_64/clone.S:111(clone)[0x7fb4931cf41d]
            {noformat}
            alice Alice Sherepa made changes -
            Affects Version/s 10.1 [ 16100 ]
            Affects Version/s 10.2 [ 14601 ]
            Affects Version/s 10.3 [ 22126 ]
            alice Alice Sherepa made changes -
            Fix Version/s 10.1 [ 16100 ]
            Fix Version/s 10.2 [ 14601 ]
            Fix Version/s 10.3 [ 22126 ]
            Fix Version/s 10.4 [ 22408 ]
            alice Alice Sherepa made changes -
            Status Open [ 1 ] Confirmed [ 10101 ]
            alice Alice Sherepa made changes -
            Assignee Alice Sherepa [ alice ] Sergei Petrunia [ psergey ]
            alice Alice Sherepa made changes -
            Summary [draft] Assertion `field_types == 0 || field_pos < field_count' failed in Protocol_text::store Assertion `field_types == 0 || field_pos < field_count' failed in Protocol_text::store
            alice Alice Sherepa made changes -
            Summary Assertion `field_types == 0 || field_pos < field_count' failed in Protocol_text::store  Assertion `field_pos < field_count' failed in Protocol_text::store
            alice Alice Sherepa made changes -
            alice Alice Sherepa made changes -
            Summary  Assertion `field_pos < field_count' failed in Protocol_text::store  Assertion `field_pos < field_count' failed in Protocol_text::store, Assertion `field_handlers == 0 || field_pos < field_count'
            serg Sergei Golubchik made changes -
            Priority Major [ 3 ] Critical [ 2 ]
            serg Sergei Golubchik made changes -
            Assignee Sergei Petrunia [ psergey ] Varun Gupta [ varun ]
            varun Varun Gupta (Inactive) made changes -
            varun Varun Gupta (Inactive) made changes -
            Status Confirmed [ 10101 ] In Progress [ 3 ]
            varun Varun Gupta (Inactive) made changes -
            Assignee Varun Gupta [ varun ] Sergei Petrunia [ psergey ]
            Status In Progress [ 3 ] In Review [ 10002 ]
            varun Varun Gupta (Inactive) made changes -
            Assignee Sergei Petrunia [ psergey ] Varun Gupta [ varun ]
            varun Varun Gupta (Inactive) made changes -
            Component/s Optimizer [ 10200 ]
            Fix Version/s 10.1.41 [ 23406 ]
            Fix Version/s 10.2.26 [ 23409 ]
            Fix Version/s 10.3.17 [ 23411 ]
            Fix Version/s 10.5.0 [ 23709 ]
            Fix Version/s 10.4.7 [ 23720 ]
            Fix Version/s 10.2 [ 14601 ]
            Fix Version/s 10.1 [ 16100 ]
            Fix Version/s 10.3 [ 22126 ]
            Fix Version/s 10.4 [ 22408 ]
            Resolution Fixed [ 1 ]
            Status In Review [ 10002 ] Closed [ 6 ]
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 91144 ] MariaDB v4 [ 155343 ]

            People

              varun Varun Gupta (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.