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

Assertion `fixed()' failed in virtual double Item_func_hybrid_field_type::val_real()

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.4, 10.5, 10.6, 10.8, 10.9, 10.10, 10.11, 11.0, 11.1
    • 10.4, 10.5, 10.6, 10.11, 11.0, 11.1
    • None
    • None

    Description

      CREATE TABLE t (c INT);
      CREATE TRIGGER ai AFTER INSERT ON t FOR EACH ROW SET @a=1;
      ALTER TABLE t ADD COLUMN b INT DEFAULT RAND();
      INSERT INTO t (c) VALUES (1),(2);
      

      Leads to:

      11.1.0 2b61ff8f2221745f0a96855a0feb0825c426f993 (Debug)

      mariadbd: /test/11.1_dbg/sql/item_func.cc:2862: virtual double Item_func_rand::val_real(): Assertion `fixed()' failed.
      

      11.1.0 2b61ff8f2221745f0a96855a0feb0825c426f993 (Debug)

      Core was generated by `/test/MD040423-mariadb-11.1.0-linux-x86_64-dbg/bin/mariadbd --no-defaults --cor'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      [Current thread is 1 (Thread 0x15542017e700 (LWP 1073951))]
      (gdb) bt
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #1  0x000015544cb45859 in __GI_abort () at abort.c:79
      #2  0x000015544cb45729 in __assert_fail_base (fmt=0x15544ccdb588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x562ec9828287 "fixed()", file=0x562ec99eab28 "/test/11.1_dbg/sql/item_func.cc", line=2862, function=<optimized out>) at assert.c:92
      #3  0x000015544cb56fd6 in __GI___assert_fail (assertion=assertion@entry=0x562ec9828287 "fixed()", file=file@entry=0x562ec99eab28 "/test/11.1_dbg/sql/item_func.cc", line=line@entry=2862, function=function@entry=0x562ec99ec438 "virtual double Item_func_rand::val_real()") at assert.c:101
      #4  0x0000562ec9019b5e in Item_func_rand::val_real (this=0x1553ec03d010) at /test/11.1_dbg/sql/item.h:1072
      #5  0x0000562ec8faf163 in Item::save_real_in_field (this=0x1553ec03d010, field=0x1553ec03ce80, no_conversions=<optimized out>) at /test/11.1_dbg/sql/item.cc:6842
      #6  0x0000562ec8e8ff22 in Type_handler_real_result::Item_save_in_field (this=<optimized out>, item=<optimized out>, field=<optimized out>, no_conversions=<optimized out>) at /test/11.1_dbg/sql/sql_type.cc:4328
      #7  0x0000562ec8f95e65 in Item::save_in_field (this=0x1553ec03d010, field=0x1553ec03ce80, no_conversions=<optimized out>) at /test/11.1_dbg/sql/item.cc:6872
      #8  0x0000562ec8db9b81 in TABLE::update_default_fields (this=this@entry=0x1553ec0269c8, ignore_errors=ignore_errors@entry=false) at /test/11.1_dbg/sql/table.cc:9183
      #9  0x0000562ec8c18d24 in fill_record (thd=thd@entry=0x1553ec000d48, table_arg=table_arg@entry=0x1553ec0269c8, fields=@0x1553ec005ec0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x1553ec013aa8, last = 0x1553ec013aa8, elements = 1}, <No data fields>}, values=@0x1553ec014030: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x1553ec0140d0, last = 0x1553ec0140d0, elements = 1}, <No data fields>}, ignore_errors=ignore_errors@entry=false, update=update@entry=false) at /test/11.1_dbg/sql/sql_base.cc:9042
      #10 0x0000562ec8c18f15 in fill_record_n_invoke_before_triggers (thd=thd@entry=0x1553ec000d48, table=table@entry=0x1553ec0269c8, fields=@0x1553ec005ec0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x1553ec013aa8, last = 0x1553ec013aa8, elements = 1}, <No data fields>}, values=@0x1553ec014030: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x1553ec0140d0, last = 0x1553ec0140d0, elements = 1}, <No data fields>}, ignore_errors=ignore_errors@entry=false, event=event@entry=TRG_EVENT_INSERT) at /test/11.1_dbg/sql/sql_base.cc:9179
      #11 0x0000562ec8c57271 in mysql_insert (thd=thd@entry=0x1553ec000d48, table_list=<optimized out>, fields=@0x1553ec005ec0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x1553ec013aa8, last = 0x1553ec013aa8, elements = 1}, <No data fields>}, values_list=@0x1553ec005f08: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x1553ec014020, last = 0x1553ec0140e0, elements = 2}, <No data fields>}, update_fields=@0x1553ec005ef0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x562eca215300 <end_of_list>, last = 0x1553ec005ef0, elements = 0}, <No data fields>}, update_values=@0x1553ec005ed8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x562eca215300 <end_of_list>, last = 0x1553ec005ed8, elements = 0}, <No data fields>}, duplic=DUP_ERROR, ignore=false, result=0x0) at /test/11.1_dbg/sql/sql_insert.cc:1050
      #12 0x0000562ec8c9942f in mysql_execute_command (thd=thd@entry=0x1553ec000d48, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/11.1_dbg/sql/sql_parse.cc:4449
      #13 0x0000562ec8c8617c in mysql_parse (thd=thd@entry=0x1553ec000d48, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x15542017d2f0) at /test/11.1_dbg/sql/sql_parse.cc:7760
      #14 0x0000562ec8c93718 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x1553ec000d48, packet=packet@entry=0x1553ec00ae39 "INSERT INTO t (c) VALUES (1),(2)", packet_length=packet_length@entry=32, blocking=blocking@entry=true) at /test/11.1_dbg/sql/sql_class.h:1370
      #15 0x0000562ec8c95b54 in do_command (thd=0x1553ec000d48, blocking=blocking@entry=true) at /test/11.1_dbg/sql/sql_parse.cc:1405
      #16 0x0000562ec8df89c1 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x562ecb511218, put_in_cache=put_in_cache@entry=true) at /test/11.1_dbg/sql/sql_connect.cc:1416
      #17 0x0000562ec8df8e90 in handle_one_connection (arg=0x562ecb511218) at /test/11.1_dbg/sql/sql_connect.cc:1318
      #18 0x000015544d056609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #19 0x000015544cc42133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.4.29 (dbg), 10.5.20 (dbg), 10.6.13 (dbg), 10.8.8 (dbg), 10.9.6 (dbg), 10.10.4 (dbg), 10.11.3 (dbg), 11.0.2 (dbg), 11.1.0 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.4.29 (opt), 10.5.20 (opt), 10.6.13 (opt), 10.8.8 (opt), 10.9.6 (opt), 10.10.4 (opt), 10.11.3 (opt), 11.0.2 (opt), 11.1.0 (opt)

      Attachments

        Issue Links

          Activity

            People

              shulga Dmitry Shulga
              ramesh Ramesh Sivaraman
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.