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'

    XMLWordPrintable

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

            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.