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

Assertion `fixed == 1' failed in Item_cond_or::val_int

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.4
    • 10.4.4
    • Optimizer
    • None

    Description

      Reproducible on 10.4 with Innodb, not with MyIsam.

      --source include/have_innodb.inc
      CREATE TABLE t1 ( pk int NOT NULL PRIMARY KEY, v1 varchar(1)) ENGINE=InnoDB;
      CREATE TABLE t2 ( pk int NOT NULL PRIMARY KEY, v1 varchar(1)) ENGINE=InnoDB;
       
      SELECT t2.v1 FROM t2 JOIN t1 ON (t1.pk = t2.pk)
      WHERE t2.v1 = 'n'
      GROUP BY t2.v1 
      HAVING (t2.v1 = 'd' OR t2.v1 > 's');
      

      10.4 9bd47835d0fcdcf2f041da39

      /10.4/sql/item_cmpfunc.cc:5291: virtual longlong Item_cond_or::val_int(): Assertion `fixed == 1' failed.
       
      assert/assert.c:92(__assert_fail_base)[0x7f3044fd7bd7]
      /lib/x86_64-linux-gnu/libc.so.6(+0x2dc82)[0x7f3044fd7c82]
      /10.4/sql/mysqld(_ZN12Item_cond_or7val_intEv+0x13c)[0x559a76703634]
      sql/item_cmpfunc.cc:5292(Item_cond_or::val_int())[0x559a75c6d390]
      /10.4/sql/mysqld(_ZN14Item_cache_int11cache_valueEv+0x11b)[0x559a766b89e3]
      /10.4/sql/mysqld(_ZN10Item_cache9has_valueEv+0xaa)[0x559a763970ee]
      sql/item.h:1499(Item::val_int_result())[0x559a766b8d2e]
      sql/item.cc:9700(Item_cache_int::cache_value())[0x559a75fb43cb]
      sql/item.h:6520(Item_cache::has_value())[0x559a75f745bd]
      sql/item.cc:9733(Item_cache_int::val_int())[0x559a75f71cd0]
      sql/sql_select.cc:11030(make_join_select(JOIN*, SQL_SELECT*, Item*))[0x559a75f6bc2f]
      sql/sql_select.cc:2441(JOIN::optimize_stage2())[0x559a75f88ca1]
      sql/sql_select.cc:2193(JOIN::optimize_inner())[0x559a75f5fdc0]
      sql/sql_select.cc:1551(JOIN::optimize())[0x559a75ee485d]
      sql/sql_select.cc:4564(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*))[0x559a75ed160f]
      sql/sql_select.cc:424(handle_select(THD*, LEX*, select_result*, unsigned long))[0x559a75eecd3b]
      sql/sql_parse.cc:6604(execute_sqlcom_select(THD*, TABLE_LIST*))[0x559a75ec57e8]
      sql/sql_parse.cc:3841(mysql_execute_command(THD*))[0x559a75ec26e3]
      sql/sql_parse.cc:8157(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x559a76236abe]
      sql/sql_parse.cc:1831(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x559a76236488]
      sql/sql_parse.cc:1358(do_command(THD*))[0x559a775f3151]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba)[0x7f3045e206ba]
      x86_64/clone.S:111(clone)[0x7f30450b141d]
       
      Query (0x62b00007e288): SELECT t2.v1 FROM t2 JOIN t1 ON (t1.pk = t2.pk) WHERE t2.v1 = 'n' GROUP BY t2.v1  HAVING (t2.v1 = 'd' OR t2.v1 > 's')
      

      Attachments

        Issue Links

          Activity

            People

              shagalla Galina Shalygina
              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.