Bug #56484 !table || (!table->read_set || bitmap_is_set(table->read_set, field_index))
Submitted: 2 Sep 2010 8:02 Modified: 13 Dec 2010 5:58
Reporter: Shane Bester (Platinum Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Partitions Severity:S1 (Critical)
Version:5.6.0-m4-debug OS:Any
Assigned to: Mattias Jonsson CPU Architecture:Any

[2 Sep 2010 8:02] Shane Bester
Description:
Version: '5.6.0-m4-debug'  socket: ''  port: 3306  MySQL Community Server - Debug (GPL)
Assertion failed: !table || (!table->read_set || bitmap_is_set(table->read_set, field_index)), file ..\..\mysql-5.6.0-m4\sql\field.cc, line 5204

my_sigabrt_handler()[my_thr_init.c:519]
raise()[winsig.c:597]
abort()[abort.c:78]
_wassert()[assert.c:163]
Field_time::val_str()[field.cc:5204]
Field::val_str()[field.h:159]
Create_field::Create_field()[field.cc:9925]
mysql_prepare_alter_table()[sql_table.cc:6323]
compare_table_with_partition()[sql_partition_admin.cc:178]
Alter_table_exchange_partition_statement::exchange_partition()[sql_partition_admin.cc:555]
Alter_table_exchange_partition_statement::execute()[sql_partition_admin.cc:85]
mysql_execute_command()[sql_parse.cc:4648]
mysql_parse()[sql_parse.cc:5828]
dispatch_command()[sql_parse.cc:1132]
do_command()[sql_parse.cc:801]
do_handle_one_connection()[sql_connect.cc:1191]
handle_one_connection()[sql_connect.cc:1131]
pthread_start()[my_winthread.c:62]
_callthreadstartex()[threadex.c:348]
_threadstartex()[threadex.c:331]
BaseThreadStart()

How to repeat:
#on debug build:

drop table if exists `t1`,`t2`;
create table `t1` (`a` int not null,`b` time not null default '00:00:00') engine=myisam partition by hash (`a`) partitions 2;

create table `t2` (`a` int) engine=myisam;
alter table `t1` exchange partition `p1` with table `t2`;
[2 Sep 2010 20:02] MySQL Verification Team
Thank you for the bug report.

InnoDB: Compressed tables use zlib 1.2.3
100902 16:59:47  InnoDB: highest supported file format is Barracuda.
100902 16:59:47 InnoDB 1.2.0 started; log sequence number 1630682
100902 16:59:47 [ERROR] Native table 'performance_schema'.'THREADS' has the wrong structure
100902 16:59:47 [ERROR] Native table 'performance_schema'.'EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME' has the wrong structure
100902 16:59:47 [Note] Event Scheduler: Loaded 0 events
100902 16:59:47 [Note] /home/miguel/dbs/5.5/bin/mysqld: ready for connections.
Version: '5.6.99-m5-debug-log'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution
mysqld: /home/miguel/bzr/5.5/sql/field.cc:5220: virtual String* Field_time::val_str(String*, String*): Assertion `!table || (!table->read_set || bitmap_is_set(table->read_set, field_index))' failed.
100902 17:00:00 - mysqld got signal 6 ;
[5 Oct 2010 12:13] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/119986

3286 Mattias Jonsson	2010-10-05
      Bug#56484: !table || (!table->read_set ||
                            bitmap_is_set(table->read_set, field_index))
      
      In debug build an ASSERT crashed the server because
      of use of columns which was not marked as used.
      
      Solution was to mark the columns as used.
     @ mysql-test/r/partition_exchange.result
        updated result
     @ mysql-test/t/partition_exchange.test
        Added test
     @ sql/sql_partition_admin.cc
        Marking all columns as used.
[16 Nov 2010 1:25] Mattias Jonsson
pushed to mysql-trunk-bugfixing
[5 Dec 2010 12:43] Bugs System
Pushed into mysql-trunk 5.6.1 (revid:alexander.nozdrin@oracle.com-20101205122447-6x94l4fmslpbttxj) (version source revid:alexander.nozdrin@oracle.com-20101205122447-6x94l4fmslpbttxj) (merge vers: 5.6.1) (pib:23)
[13 Dec 2010 5:58] Jon Stephens
Bug does not appear in any release version; no changelog entry required; closed.