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

LP:460420 - MyISAM segfault in debug binary on ALTER TABLE

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Resolution: Not a Bug
    • None
    • None
    • None

    Description

      branch from maria-5.1-merge (sorry can't verify exact revid but it's from within last week)
      BUILD/compile-pentium-debug-max-no-ndb
      So it's a debug binary. run...

      CREATE TABLE `actors_movies` (
      `actor_id` int(10) unsigned NOT NULL,
      `movie_id` int(10) unsigned NOT NULL,
      UNIQUE KEY `actor_id` (`actor_id`,`movie_id`)
      ) ENGINE=InnoDB DEFAULT CHARSET=latin1

      – table is empty
      ALTER TABLE actors_movies ENGINE=MyISAM;

      segfaults. With gdb attached we find the following:

      Program received signal SIGSEGV, Segmentation fault.
      0x00000000008911bc in ha_myisam::enable_indexes (this=Cannot access memory at address 0x7fd0dce20868
      ) at ha_myisam.cc:1444
      1444 int ha_myisam::enable_indexes(uint mode)
      (gdb) bt
      #0 0x00000000008911bc in ha_myisam::enable_indexes (this=Cannot access memory at address 0x7fd0dce20868
      ) at ha_myisam.cc:1444
      #1 0x000000000088bff8 in ha_myisam::end_bulk_insert (this=0x2a8be90, abort=false) at ha_myisam.cc:1610
      #2 0x000000000071e108 in handler::ha_end_bulk_insert (this=0x2a8be90, abort=false) at handler.h:1242
      #3 0x00000000007c88ac in copy_data_between_tables (from=0x30d9988, to=0x2a8adc8, create=@0x7fd0dce43a38, ignore=false, order_num=0, order=0x0, copied=0x7fd0dce42068, deleted=0x7fd0dce42060,
      keys_onoff=LEAVE_AS_IS, error_if_not_empty=false) at sql_table.cc:7677
      #4 0x00000000007d4d07 in mysql_alter_table (thd=0x7fd0c18b5298, new_db=0x29d05f8 "imdb", new_name=0x29d0280 "actors_movies", create_info=0x7fd0dce43420, table_list=0x29d02c8, alter_info=0x7fd0dce439f0,
      order_num=0, order=0x0, ignore=false) at sql_table.cc:7087
      #5 0x0000000000680aaf in mysql_execute_command (thd=0x7fd0c18b5298) at sql_parse.cc:2900
      #6 0x0000000000687cdc in mysql_parse (thd=0x7fd0c18b5298, inBuf=0x29d01c0 "alter table actors_movies engine=myisam", length=39, found_semicolon=0x7fd0dce44c00) at sql_parse.cc:5979
      #7 0x0000000000688ade in dispatch_command (command=COM_QUERY, thd=0x7fd0c18b5298, packet=0x7fd0c1961859 "alter table actors_movies engine=myisam", packet_length=39) at sql_parse.cc:1223
      #8 0x0000000000689f4e in do_command (thd=0x7fd0c18b5298) at sql_parse.cc:862
      #9 0x0000000000675a1c in handle_one_connection (arg=0x7fd0c18b5298) at sql_connect.cc:1130
      #10 0x00007fd0dc90d3ba in start_thread () from /lib/libpthread.so.0
      #11 0x00007fd0db980fcd in clone () from /lib/libc.so.6
      #12 0x0000000000000000 in ?? ()

      Again, note that this is a debug binary; since DEBUG has different structures, it's quite possible that this only happens in DEBUG binaries and not in regular. Nevertheless, it looks like a bug.

      Attachments

        Activity

          People

            Unassigned Unassigned
            arjenlentz Arjen Lentz (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 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.