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

Assertion `marked_for_read()' failed in Field_varstring::val_str on CHECKSUM TABLE

    XMLWordPrintable

    Details

      Description

      USE test;
      SET SQL_MODE='';
      CREATE TABLE t (v1 VARCHAR (255) AS (c1) PERSISTENT, c1 VARCHAR(50)) COLLATE=latin1_general_ci ENGINE=MyISAM;
      INSERT INTO t VALUES(1,0xff00fef0);
      CHECKSUM TABLE t EXTENDED;
      

      Ref simplified testcase below in comments.

      Leads to:

      10.5.4 4080e3acefd7e58d88c2f3539fb6a0fb359cf057

      mysqld: /test/10.5_dbg/sql/field.cc:7681: virtual String* Field_varstring::val_str(String*, String*): Assertion `marked_for_read()' failed.
      

      10.5.4 4080e3acefd7e58d88c2f3539fb6a0fb359cf057

      Core was generated by `/test/MD150620-mariadb-10.5.4-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
          at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      [Current thread is 1 (Thread 0x147aba8a2700 (LWP 1634674))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      #1  0x0000555a824834c6 in my_write_core (sig=sig@entry=6) at /test/10.5_dbg/mysys/stacktrace.c:518
      #2  0x0000555a81c25d60 in handle_fatal_signal (sig=6) at /test/10.5_dbg/sql/signal_handler.cc:330
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
      #5  0x0000147abb716801 in __GI_abort () at abort.c:79
      #6  0x0000147abb70639a in __assert_fail_base (fmt=0x147abb88d7d8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x555a8278a644 "marked_for_read()", file=file@entry=0x555a8278a473 "/test/10.5_dbg/sql/field.cc", line=line@entry=7681, function=function@entry=0x555a8278d140 <Field_varstring::val_str(String*, String*)::__PRETTY_FUNCTION__> "virtual String* Field_varstring::val_str(String*, String*)") at assert.c:92
      #7  0x0000147abb706412 in __GI___assert_fail (assertion=assertion@entry=0x555a8278a644 "marked_for_read()", file=file@entry=0x555a8278a473 "/test/10.5_dbg/sql/field.cc", line=line@entry=7681, function=function@entry=0x555a8278d140 <Field_varstring::val_str(String*, String*)::__PRETTY_FUNCTION__> "virtual String* Field_varstring::val_str(String*, String*)") at assert.c:101
      #8  0x0000555a81bff837 in Field_varstring::val_str (this=0x147a99852d30, val_buffer=<optimized out>, val_ptr=0x147aba8a0850) at /test/10.5_dbg/sql/field.cc:7681
      #9  0x0000555a81c2e0d4 in Field::val_str (str=0x147aba8a0850, this=0x147a99852d30) at /test/10.5_dbg/sql/field.h:1025
      #10 handler::calculate_checksum (this=0x147a998376a0) at /test/10.5_dbg/sql/handler.cc:5465
      #11 0x0000555a81a46e4b in mysql_checksum_table (thd=thd@entry=0x147a99815088, tables=tables@entry=0x147a99874170, check_opt=check_opt@entry=0x147a9981a338) at /test/10.5_dbg/sql/sql_table.cc:11617
      #12 0x0000555a8197c43d in mysql_execute_command (thd=thd@entry=0x147a99815088) at /test/10.5_dbg/sql/sql_parse.cc:4376
      #13 0x0000555a8198815c in mysql_parse (thd=thd@entry=0x147a99815088, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x147aba8a1350, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:7993
      #14 0x0000555a81974c60 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x147a99815088, packet=packet@entry=0x147a99867089 "", packet_length=packet_length@entry=25, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:1874
      #15 0x0000555a8197343a in do_command (thd=0x147a99815088) at /test/10.5_dbg/sql/sql_parse.cc:1355
      #16 0x0000555a81acec47 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x147a9cd7a808, put_in_cache=put_in_cache@entry=true) at /test/10.5_dbg/sql/sql_connect.cc:1411
      #17 0x0000555a81acf363 in handle_one_connection (arg=arg@entry=0x147a9cd7a808) at /test/10.5_dbg/sql/sql_connect.cc:1313
      #18 0x0000555a81f30902 in pfs_spawn_thread (arg=0x147aba046c88) at /test/10.5_dbg/storage/perfschema/pfs.cc:2201
      #19 0x0000147abc3f96db in start_thread (arg=0x147aba8a2700) at pthread_create.c:463
      #20 0x0000147abb7f788f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.4.14 (dbg), 10.5.4 (dbg)

      Bug confirmed not present in:
      MariaDB: 10.1.46 (dbg), 10.1.46 (opt), 10.2.33 (dbg), 10.2.33 (opt), 10.3.24 (dbg), 10.3.24 (opt), 10.4.14 (opt), 10.5.4 (opt)
      MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.47 (dbg), 5.6.47 (opt), 5.7.29 (dbg), 5.7.29 (opt), 8.0.19 (dbg), 8.0.19 (opt)

        Attachments

          Activity

            People

            Assignee:
            sanja Oleksandr Byelkin
            Reporter:
            Roel Roel Van de Paar
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: