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

Item_func_eq::val_int(): Assertion `fixed == 1' failed

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.4
    • N/A
    • N/A
    • None

    Description

      Reproducible with MyIsam, not with Innodb

      CREATE TABLE `t1` (
        `v3` varchar(10) ,
        `v2` varchar(10) CHARACTER SET utf8 ,
        `v1` varchar(1024) CHARACTER SET utf8 
      );
       
      CREATE TABLE `t2` (
        `v2` varchar(10) CHARACTER SET utf8 ,
        `v3` varchar(10) ,
        `v1` varchar(1024) CHARACTER SET utf8 ,
        KEY `v2` (`v2`)
      );
       
      CREATE TABLE `t3` (
        `v1` varchar(1024) CHARACTER SET utf8 ,
        `v3` varchar(10) ,
        `v2` varchar(10) CHARACTER SET utf8 
      );
       
      INSERT INTO `t1` VALUES ('a','i','q'), ('bt1f','aim','rtr');
      INSERT INTO `t2` VALUES ('xfvihcvywh','joint','evolsbve'),('gsh','q','hcvywhcmxldkfmnjug');
       
      SELECT 1 FROM t1,t3
      WHERE (t3.v1 IN (SELECT MAX(v2) FROM t2))
        AND t1.v2 < 'm' AND t1.v3 LIKE 'b%';
       

      mysqld: /home/alice/git/10.4/sql/item_cmpfunc.cc:1704: virtual longlong Item_func_eq::val_int(): Assertion `fixed == 1' failed.
      180710 12:16:31 [ERROR] mysqld got signal 6 ;
       
      Thread pointer: 0x62b000046270
      stack_bottom = 0x7f4f9debedf0 thread_stack 0x49000
      /usr/lib/x86_64-linux-gnu/libasan.so.2(+0x4a077)[0x7f4fa99bc077]
      mysys/stacktrace.c:269(my_print_stacktrace)[0x563e0b2d12ce]
      sql/signal_handler.cc:168(handle_fatal_signal)[0x563e0a212913]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x11390)[0x7f4fa8828390]
      linux/raise.c:54(__GI_raise)[0x7f4fa7be1428]
      stdlib/abort.c:91(__GI_abort)[0x7f4fa7be302a]
      assert/assert.c:92(__assert_fail_base)[0x7f4fa7bd9bd7]
      /lib/x86_64-linux-gnu/libc.so.6(+0x2dc82)[0x7f4fa7bd9c82]
      sql/item_cmpfunc.cc:1705(Item_func_eq::val_int())[0x563e0a2c8d8a]
      sql/item_func.cc:81(eval_const_cond(Item*))[0x563e0a33a974]
      sql/sql_select.cc:16318(Item_bool_func2::remove_eq_conds(THD*, Item::cond_result*, bool))[0x563e09c502d6]
      sql/sql_select.cc:16127(Item_cond::remove_eq_conds(THD*, Item::cond_result*, bool))[0x563e09c4efa5]
      sql/sql_select.cc:4823(make_join_statistics(JOIN*, List<TABLE_LIST>&, st_dynamic_array*))[0x563e09c08c31]
      sql/sql_select.cc:1926(JOIN::optimize_inner())[0x563e09bedc46]
      sql/sql_select.cc:1448(JOIN::optimize())[0x563e09be95a6]
      sql/sql_select.cc:4261(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*))[0x563e09c040de]
      sql/sql_select.cc:382(handle_select(THD*, LEX*, select_result*, unsigned long))[0x563e09bde9fb]
      sql/sql_parse.cc:6545(execute_sqlcom_select(THD*, TABLE_LIST*))[0x563e09b645e1]
      sql/sql_parse.cc:3768(mysql_execute_command(THD*))[0x563e09b52df4]
      sql/sql_parse.cc:8063(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x563e09b6ca25]
      sql/sql_parse.cc:1849(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x563e09b47b4b]
      sql/sql_parse.cc:1392(do_command(THD*))[0x563e09b44ce3]
      sql/sql_connect.cc:1402(do_handle_one_connection(CONNECT*))[0x563e09e95aa6]
      sql/sql_connect.cc:1309(handle_one_connection)[0x563e09e95483]
      perfschema/pfs.cc:1864(pfs_spawn_thread)[0x563e0b1b22eb]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba)[0x7f4fa881e6ba]
      x86_64/clone.S:111(clone)[0x7f4fa7cb341d]
       
      Trying to get some variables.
      Some pointers may be invalid and cause the dump to abort.
      Query (0x62b000062288): SELECT 1 FROM t1,t3 WHERE (t3.v1 IN (SELECT MAX(v2) FROM t2)) AND t1.v2 < 'm' AND t1.v3 LIKE 'b%'
      Connection ID (thread ID): 4
      Status: NOT_KILLED
      

      10.4 29da7a1a9ab5033f17e8550237

      Thread 1 (Thread 0x7fde393bc700 (LWP 31726)):
      #0  __pthread_kill (threadid=<optimized out>, signo=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:62
      #1  0x000055b9dd170761 in my_write_core (sig=6) at /home/alice/git/10.4/mysys/stacktrace.c:481
      #2  0x000055b9dc9b30d1 in handle_fatal_signal (sig=6) at /home/alice/git/10.4/sql/signal_handler.cc:305
      #3  <signal handler called>
      #4  0x00007fde3f21e428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
      #5  0x00007fde3f22002a in __GI_abort () at abort.c:89
      #6  0x00007fde3f216bd7 in __assert_fail_base (fmt=<optimized out>, assertion=assertion@entry=0x55b9dd3a95d4 "fixed == 1", file=file@entry=0x55b9dd3a95a0 "/home/alice/git/10.4/sql/item_cmpfunc.cc", line=line@entry=1704, function=function@entry=0x55b9dd3aabc0 <Item_func_eq::val_int()::__PRETTY_FUNCTION__> "virtual longlong Item_func_eq::val_int()") at assert.c:92
      #7  0x00007fde3f216c82 in __GI___assert_fail (assertion=0x55b9dd3a95d4 "fixed == 1", file=0x55b9dd3a95a0 "/home/alice/git/10.4/sql/item_cmpfunc.cc", line=1704, function=0x55b9dd3aabc0 <Item_func_eq::val_int()::__PRETTY_FUNCTION__> "virtual longlong Item_func_eq::val_int()") at assert.c:101
      #8  0x000055b9dc9f9d9b in Item_func_eq::val_int (this=0x7fde2801ac98) at /home/alice/git/10.4/sql/item_cmpfunc.cc:1704
      #9  0x000055b9dca34226 in eval_const_cond (cond=0x7fde2801ac98) at /home/alice/git/10.4/sql/item_func.cc:81
      #10 0x000055b9dc72fa9c in Item_bool_func2::remove_eq_conds (this=0x7fde2801ac98, thd=0x7fde28000b00, cond_value=0x7fde393ba264, top_level_arg=false) at /home/alice/git/10.4/sql/sql_select.cc:16318
      #11 0x000055b9dc72f169 in Item_cond::remove_eq_conds (this=0x7fde28017d38, thd=0x7fde28000b00, cond_value=0x7fde28018df8, top_level_arg=true) at /home/alice/git/10.4/sql/sql_select.cc:16127
      #12 0x000055b9dc712dc2 in make_join_statistics (join=0x7fde28018ae8, tables_list=..., keyuse_array=0x7fde28018dd8) at /home/alice/git/10.4/sql/sql_select.cc:4823
      #13 0x000055b9dc708ad3 in JOIN::optimize_inner (this=0x7fde28018ae8) at /home/alice/git/10.4/sql/sql_select.cc:1926
      #14 0x000055b9dc706f33 in JOIN::optimize (this=0x7fde28018ae8) at /home/alice/git/10.4/sql/sql_select.cc:1448
      #15 0x000055b9dc710e43 in mysql_select (thd=0x7fde28000b00, tables=0x7fde280154c0, wild_num=0, fields=..., conds=0x7fde28017d38, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7fde28018ac8, unit=0x7fde280049a8, select_lex=0x7fde28014fb0) at /home/alice/git/10.4/sql/sql_select.cc:4261
      #16 0x000055b9dc7029d6 in handle_select (thd=0x7fde28000b00, lex=0x7fde280048e0, result=0x7fde28018ac8, setup_tables_done_option=0) at /home/alice/git/10.4/sql/sql_select.cc:382
      #17 0x000055b9dc6cd315 in execute_sqlcom_select (thd=0x7fde28000b00, all_tables=0x7fde280154c0) at /home/alice/git/10.4/sql/sql_parse.cc:6545
      #18 0x000055b9dc6c376e in mysql_execute_command (thd=0x7fde28000b00) at /home/alice/git/10.4/sql/sql_parse.cc:3768
      #19 0x000055b9dc6d104d in mysql_parse (thd=0x7fde28000b00, rawbuf=0x7fde28014e88 "SELECT 1 FROM t1,t3\nWHERE (t3.v1 IN (SELECT MAX(v2) FROM t2))\nAND t1.v2 < 'm' AND t1.v3 LIKE 'b%'", length=97, parser_state=0x7fde393bb5f0, is_com_multi=false, is_next_command=false) at /home/alice/git/10.4/sql/sql_parse.cc:8063
      #20 0x000055b9dc6be1d0 in dispatch_command (command=COM_QUERY, thd=0x7fde28000b00, packet=0x7fde2800b441 "SELECT 1 FROM t1,t3\nWHERE (t3.v1 IN (SELECT MAX(v2) FROM t2))\nAND t1.v2 < 'm' AND t1.v3 LIKE 'b%'", packet_length=97, is_com_multi=false, is_next_command=false) at /home/alice/git/10.4/sql/sql_parse.cc:1847
      #21 0x000055b9dc6bcbed in do_command (thd=0x7fde28000b00) at /home/alice/git/10.4/sql/sql_parse.cc:1392
      #22 0x000055b9dc823613 in do_handle_one_connection (connect=0x55b9df624b20) at /home/alice/git/10.4/sql/sql_connect.cc:1402
      #23 0x000055b9dc823364 in handle_one_connection (arg=0x55b9df624b20) at /home/alice/git/10.4/sql/sql_connect.cc:1308
      #24 0x000055b9dd100baa in pfs_spawn_thread (arg=0x55b9df62cc10) at /home/alice/git/10.4/storage/perfschema/pfs.cc:1862
      #25 0x00007fde3fe5b6ba in start_thread (arg=0x7fde393bc700) at pthread_create.c:333
      #26 0x00007fde3f2f041d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
      

      Attachments

        Issue Links

          Activity

            People

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