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

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

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.2, 10.3, 10.4
    • Fix Version/s: 10.2.24
    • Component/s: Optimizer
    • Labels:
      None

      Description

      Reproducible on MariaDB 10.2-10.4 with MyIsam/Aria, not with InnoDB

      CREATE TABLE t1 ( i1 int, d1 date , i2 int , d2 date)engine=myisam;
      INSERT INTO t1 VALUES (19,'0000-00-00',73,'2008-05-21');
       
      CREATE TABLE t2 (d1 date , i1 int, i2 int , d2 date)engine=myisam;
      INSERT INTO t2 VALUES ('2006-01-12',-102,45,'2023-11-25'),('2034-12-19',-102,45,'2001-11-20');
       
      UPDATE (t1 JOIN (t1 AS a1 JOIN t2 ON t2.d1 <> a1.i1 AND t2.d1 >= a1.i2) ON t2.d1 = a1.d2) SET t1.i1 = -39;
      

      10.2 bb8c82c66abddf796e8d44f8

      /10.2/sql/item_cmpfunc.cc:5059: virtual longlong Item_cond_and::val_int(): Assertion `fixed == 1' failed.
      190315 22:13:04 [ERROR] mysqld got signal 6 ;
       
      stdlib/abort.c:91(__GI_abort)[0x7fa1aa97d02a]
      assert/assert.c:92(__assert_fail_base)[0x7fa1aa973bd7]
      /lib/x86_64-linux-gnu/libc.so.6(+0x2dc82)[0x7fa1aa973c82]
      sql/item_cmpfunc.cc:5060(Item_cond_and::val_int())[0x55e3907c1c9e]
      sql/sql_select.cc:9903(make_join_select(JOIN*, SQL_SELECT*, Item*))[0x55e39020ac45]
      sql/sql_select.cc:1780(JOIN::optimize_inner())[0x55e3901cfe92]
      sql/sql_select.cc:1115(JOIN::optimize())[0x55e3901c9609]
      sql/sql_select.cc:3804(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*))[0x55e3901e2ae9]
      sql/sql_update.cc:1604(mysql_multi_update(THD*, TABLE_LIST*, List<Item>*, List<Item>*, Item*, unsigned long long, enum_duplicates, bool, st_select_lex_unit*, st_select_lex*, multi_update**))[0x55e39037b0d5]
      sql/sql_parse.cc:4395(mysql_execute_command(THD*))[0x55e39013a441]
      sql/sql_parse.cc:8059(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x55e39015174d]
      sql/sql_parse.cc:1831(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x55e39012c9b5]
      sql/sql_parse.cc:1379(do_command(THD*))[0x55e390129b34]
      sql/sql_connect.cc:1335(do_handle_one_connection(CONNECT*))[0x55e3904522dc]
      sql/sql_connect.cc:1242(handle_one_connection)[0x55e390451ce4]
      perfschema/pfs.cc:1864(pfs_spawn_thread)[0x55e391602c58]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba)[0x7fa1ab5b86ba]
      x86_64/clone.S:111(clone)[0x7fa1aaa4d41d]
       
      Query (0x62b000000288): UPDATE (t1 JOIN (t1 AS a1 JOIN t2 ON t2.d1 <> a1.i1 AND t2.d1 >= a1.i2) ON t2.d1 = a1.d2) SET t1.i1 = -39
      
      

        Attachments

          Activity

            People

            • Assignee:
              igor Igor Babaev
              Reporter:
              alice Alice Sherepa
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: