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

Assertion `field_types == 0 || field_types[field_pos] == MYSQL_TYPE_LONGLONG' failed in Protocol_text::store_longlong

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Won't Fix
    • 10.2
    • N/A
    • Data types
    • None

    Description

      Setting it to Minor as it appears to be a debug-only problem only affecting 10.2, and the test case is rather artificial.

      CREATE TABLE t1 (f INT);
      INSERT INTO t1 VALUES (1),(2);
      SET SESSION sql_buffer_result= 1;
      SELECT @x := 1 FROM t1 ORDER BY VAR_SAMP(0) = f;
       
      # Cleanup
      DROP TABLE t1;
      

      10.2 3c3f172f

      mysqld: /data/src/10.2/sql/protocol.cc:1190: virtual bool Protocol_text::store_longlong(longlong, bool): Assertion `field_types == 0 || field_types[field_pos] == MYSQL_TYPE_LONGLONG' failed.
      200729 21:12:30 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f1ed0886f12 in __GI___assert_fail (assertion=0x5636ada93830 "field_types == 0 || field_types[field_pos] == MYSQL_TYPE_LONGLONG", file=0x5636ada93140 "/data/src/10.2/sql/protocol.cc", line=1190, function=0x5636ada93f80 <Protocol_text::store_longlong(long long, bool)::__PRETTY_FUNCTION__> "virtual bool Protocol_text::store_longlong(longlong, bool)") at assert.c:101
      #8  0x00005636acf569d3 in Protocol_text::store_longlong (this=0x7f1eb80010a8, from=1, unsigned_flag=false) at /data/src/10.2/sql/protocol.cc:1189
      #9  0x00005636ad2d1915 in Item::send (this=0x7f1eb8015b28, protocol=0x7f1eb80010a8, buffer=0x7f1ecabb8cc0) at /data/src/10.2/sql/item.cc:6942
      #10 0x00005636acf55f75 in Protocol::send_result_set_row (this=0x7f1eb80010a8, row_items=0x7f1eb8013710) at /data/src/10.2/sql/protocol.cc:990
      #11 0x00005636acfea1d0 in select_send::send_data (this=0x7f1eb8013340, items=...) at /data/src/10.2/sql/sql_class.cc:2731
      #12 0x00005636ad0a45a7 in end_send_group (join=0x7f1eb8013360, join_tab=0x7f1eb8014ec0, end_of_records=true) at /data/src/10.2/sql/sql_select.cc:20193
      #13 0x00005636ad0a0f62 in sub_select (join=0x7f1eb8013360, join_tab=0x7f1eb8014b10, end_of_records=true) at /data/src/10.2/sql/sql_select.cc:18824
      #14 0x00005636ad0a0c54 in sub_select_postjoin_aggr (join=0x7f1eb8013360, join_tab=0x7f1eb8014b10, end_of_records=true) at /data/src/10.2/sql/sql_select.cc:18590
      #15 0x00005636ad0a0f62 in sub_select (join=0x7f1eb8013360, join_tab=0x7f1eb8014760, end_of_records=true) at /data/src/10.2/sql/sql_select.cc:18824
      #16 0x00005636ad0a076b in do_select (join=0x7f1eb8013360, procedure=0x0) at /data/src/10.2/sql/sql_select.cc:18419
      #17 0x00005636ad07a1d7 in JOIN::exec_inner (this=0x7f1eb8013360) at /data/src/10.2/sql/sql_select.cc:3638
      #18 0x00005636ad079692 in JOIN::exec (this=0x7f1eb8013360) at /data/src/10.2/sql/sql_select.cc:3433
      #19 0x00005636ad07a848 in mysql_select (thd=0x7f1eb8000af0, tables=0x7f1eb80127a0, wild_num=0, fields=..., conds=0x0, og_num=1, order=0x7f1eb8013220, group=0x0, having=0x0, proc_param=0x0, select_options=2147879680, result=0x7f1eb8013340, unit=0x7f1eb80046e8, select_lex=0x7f1eb8004e28) at /data/src/10.2/sql/sql_select.cc:3833
      #20 0x00005636ad06ea06 in handle_select (thd=0x7f1eb8000af0, lex=0x7f1eb8004628, result=0x7f1eb8013340, setup_tables_done_option=0) at /data/src/10.2/sql/sql_select.cc:361
      #21 0x00005636ad03a472 in execute_sqlcom_select (thd=0x7f1eb8000af0, all_tables=0x7f1eb80127a0) at /data/src/10.2/sql/sql_parse.cc:6218
      #22 0x00005636ad030cf3 in mysql_execute_command (thd=0x7f1eb8000af0) at /data/src/10.2/sql/sql_parse.cc:3524
      #23 0x00005636ad03e1a9 in mysql_parse (thd=0x7f1eb8000af0, rawbuf=0x7f1eb8012458 "SELECT @x := 1 FROM t1 ORDER BY VAR_SAMP(0) = f", length=47, parser_state=0x7f1ecabba610, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:7733
      #24 0x00005636ad02c4d5 in dispatch_command (command=COM_QUERY, thd=0x7f1eb8000af0, packet=0x7f1eb808d041 "", packet_length=47, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1824
      #25 0x00005636ad02af50 in do_command (thd=0x7f1eb8000af0) at /data/src/10.2/sql/sql_parse.cc:1377
      #26 0x00005636ad180fb1 in do_handle_one_connection (connect=0x5636b0a7dd00) at /data/src/10.2/sql/sql_connect.cc:1336
      #27 0x00005636ad180d1c in handle_one_connection (arg=0x5636b0a7dd00) at /data/src/10.2/sql/sql_connect.cc:1241
      #28 0x00005636ad997396 in pfs_spawn_thread (arg=0x5636b0a88af0) at /data/src/10.2/storage/perfschema/pfs.cc:1869
      #29 0x00007f1ed280f4a4 in start_thread (arg=0x7f1ecabbb700) at pthread_create.c:456
      #30 0x00007f1ed0943d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      Reproducible with at least InnoDB, MyISAM, Aria.
      Couldn't reproduce on 10.3+ or on 10.1.
      No obvious problem on a non-debug build.

      Attachments

        Activity

          People

            bar Alexander Barkov
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.