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

VARCHAR(0) COMPRESSED crashes the server

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.3(EOL)
    • 10.3.7
    • Server
    • None

    Description

      Test:

      CREATE TABLE t1(a VARCHAR(0) COMPRESSED);
      INSERT INTO t1 VALUES('a');
      DROP TABLE t1;
      

      Stack trace:

      mysqld: sql/field.cc:8023: int Field_longstr::compress(char*, uint*, const char*, uint, CHARSET_INFO*): Assertion `length > 0' failed.
       
      /usr/lib/x86_64-linux-gnu/libasan.so.2(+0x4a077)[0x7efdd0cb3077]
      mysys/stacktrace.c:269(my_print_stacktrace)[0x5598e42ae945]
      sql/signal_handler.cc:168(handle_fatal_signal)[0x5598e31f1f0d]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x11390)[0x7efdcf400390]
      /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x38)[0x7efdce7b9428]
      /lib/x86_64-linux-gnu/libc.so.6(abort+0x16a)[0x7efdce7bb02a]
      /lib/x86_64-linux-gnu/libc.so.6(+0x2dbd7)[0x7efdce7b1bd7]
      /lib/x86_64-linux-gnu/libc.so.6(+0x2dc82)[0x7efdce7b1c82]
      sql/field.cc:8026(Field_longstr::compress(char*, unsigned int*, char const*, unsigned int, charset_info_st const*))[0x5598e31ab848]
      sql/field.cc:8092(Field_varstring_compressed::store(char const*, unsigned long, charset_info_st const*))[0x5598e31ac4be]
      sql/item.cc:500(Item::save_str_value_in_field(Field*, String*))[0x5598e323127e]
      sql/item.cc:7007(Item_string::save_in_field(Field*, bool))[0x5598e32629ef]
      sql/sql_base.cc:8457(fill_record(THD*, TABLE*, Field**, List<Item>&, bool, bool))[0x5598e2a17d5a]
      sql/sql_base.cc:8510(fill_record_n_invoke_before_triggers(THD*, TABLE*, Field**, List<Item>&, bool, trg_event_type))[0x5598e2a181a3]
      sql/sql_insert.cc:1011(mysql_insert(THD*, TABLE_LIST*, List<Item>&, List<List<Item> >&, List<Item>&, List<Item>&, enum_duplicates, bool))[0x5598e2aaff84]
      sql/sql_parse.cc:4724(mysql_execute_command(THD*))[0x5598e2b3fa96]
      sql/sql_parse.cc:8013(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x5598e2b54c5e]
      sql/sql_parse.cc:1844(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x5598e2b2f998]
      sql/sql_parse.cc:1387(do_command(THD*))[0x5598e2b2c9bf]
      sql/sql_connect.cc:1402(do_handle_one_connection(CONNECT*))[0x5598e2e7a5f6]
      sql/sql_connect.cc:1309(handle_one_connection)[0x5598e2e79f5c]
      perfschema/pfs.cc:1864(pfs_spawn_thread)[0x5598e3708ac3]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba)[0x7efdcf3f66ba]
      /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7efdce88b41d]
      

      Attachments

        Issue Links

          Activity

            People

              svoj Sergey Vojtovich
              svoj Sergey Vojtovich
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.