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

Bytes lost or Assertion `global_status_var.global_memory_used == 0' failed after using trigger on table with blob

    XMLWordPrintable

Details

    Description

      CREATE TABLE t (f BLOB NOT NULL);
      CREATE TRIGGER tr BEFORE INSERT ON t FOR EACH ROW SET @a = 1; 
      INSERT INTO t VALUES ( 'foo' );
       
      --source include/restart_mysqld.inc
       
      # Cleanup
      --connection default
      DROP TABLE t;
      

      10.1 debug 38ca9be4de3

      2017-09-03 23:14:17 139901928381184 [Note] /data/bld/10.1/bin/mysqld: Shutdown complete
       
      Warning:    8 bytes lost at 0x7f3d69c205f0, allocated by T@0 at 0x558b461f70b5, 0x558b4609380b, sql/sql_string.cc:46, sql/field.cc:7961, sql/item.cc:6082, sql/sql_base.cc:8965, sql/sql_base.cc:9013, sql/sql_insert.cc:982
      Memory lost: 8 bytes in 1 chunks
      

      10.1 valgrind 38ca9be4de3

      ==8584== 16 bytes in 1 blocks are definitely lost in loss record 1 of 8
      ==8584==    at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
      ==8584==    by 0xED4D45: my_malloc (my_malloc.c:101)
      ==8584==    by 0x68C1B8: String::real_alloc(unsigned int) (sql_string.cc:46)
      ==8584==    by 0x524582: String::alloc(unsigned int) (sql_string.h:325)
      ==8584==    by 0x809535: Field_blob::store(char const*, unsigned int, charset_info_st const*) (field.cc:7961)
      ==8584==    by 0x838006: Item::save_str_value_in_field(Field*, String*) (item.cc:460)
      ==8584==    by 0x846BCF: Item_string::save_in_field(Field*, bool) (item.cc:6081)
      ==8584==    by 0x58024E: fill_record(THD*, TABLE*, Field**, List<Item>&, bool, bool) (sql_base.cc:8965)
      ==8584==    by 0x5803EF: fill_record_n_invoke_before_triggers(THD*, TABLE*, Field**, List<Item>&, bool, trg_event_type) (sql_base.cc:9013)
      ==8584==    by 0x5BA177: mysql_insert(THD*, TABLE_LIST*, List<Item>&, List<List<Item> >&, List<Item>&, List<Item>&, enum_duplicates, bool) (sql_insert.cc:982)
      ==8584==    by 0x5DF172: mysql_execute_command(THD*) (sql_parse.cc:3921)
      ==8584==    by 0x5E9CB2: mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_parse.cc:7333)
      ==8584==    by 0x5D88B5: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1484)
      ==8584==    by 0x5D7652: do_command(THD*) (sql_parse.cc:1106)
      ==8584==    by 0x715544: do_handle_one_connection(THD*) (sql_connect.cc:1349)
      ==8584==    by 0x7152A8: handle_one_connection (sql_connect.cc:1261)
      ^ Found warnings in /data/bld/10.1-valgrind/mysql-test/var/log/mysqld.1.err
      

      10.2 debug 5660c061faf30

      2017-09-03 23:10:53 140672200853248 [Note] /data/bld/10.2/bin/mysqld: Shutdown complete
       
      mysqld: /data/src/10.2/sql/mysqld.cc:2166: void mysqld_exit(int): Assertion `global_status_var.global_memory_used == 0' failed.
      170903 23:10:53 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007ff0d2669ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x000055ca9e376f48 in mysqld_exit (exit_code=0) at /data/src/10.2/sql/mysqld.cc:2166
      #9  0x000055ca9e37edf5 in mysqld_main (argc=128, argv=0x55caa1dae370) at /data/src/10.2/sql/mysqld.cc:6084
      #10 0x000055ca9e373540 in main (argc=6, argv=0x7fff6203cee8) at /data/src/10.2/sql/main.cc:25
      

      Attachments

        Issue Links

          Activity

            People

              monty Michael Widenius
              elenst Elena Stepanova
              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.