set sql_mode=''; drop table if exists `t1`; create table `t1`(`a` int,`b` timestamp default '0000-00-00 00:00:00' ) engine=innodb partition by linear hash (`a`)partitions 1; set session sql_mode='NO_ZERO_DATE'; optimize table `t1`; 100619 14:53:41 [Note] ./bin/mysqld: ready for connections. Version: '5.5.5-m3-debug' socket: '/tmp/mysql.sock' port: 3306 Source distribution --3522-- REDIR: 0x5d66790 (realloc) redirected to 0x4c22f8b (realloc) ==3522== Thread 17: ==3522== Invalid read of size 8 ==3522== at 0x638180: mysql_admin_table(THD*, TABLE_LIST*, st_ha_check_opt*, char const*, thr_lock_type, bool, bool, unsigned int, int (*)(THD*, TABLE_LIST*, st_ha_check_opt*), int (handler::*)(THD*, st_ha_check_opt*), int (*)(THD*, TABLE_LIST*)) (sql_table.cc:5150) ==3522== by 0x6387D4: mysql_optimize_table(THD*, TABLE_LIST*, st_ha_check_opt*) (sql_table.cc:5224) ==3522== by 0x5B3982: mysql_execute_command(THD*) (sql_parse.cc:3107) ==3522== by 0x5B9070: mysql_parse(THD*, char const*, unsigned int, Parser_state*) (sql_parse.cc:5911) ==3522== by 0x5BA4F2: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1135) ==3522== by 0x5BBA30: do_command(THD*) (sql_parse.cc:807) ==3522== by 0x689222: do_handle_one_connection(THD*) (sql_connect.cc:1196) ==3522== by 0x6892E8: handle_one_connection (sql_connect.cc:1135) ==3522== by 0x4E2E09D: start_thread (in /lib64/libpthread-2.5.so) ==3522== by 0x5DB74CC: clone (in /lib64/libc-2.5.so) ==3522== Address 0x10b77898 is 40 bytes inside a block of size 2,276 free'd ==3522== at 0x4C22B71: free (vg_replace_malloc.c:325) ==3522== by 0x9FD81F: _myfree (safemalloc.c:326) ==3522== by 0x567817: free_cache_entry(TABLE*) (sql_base.cc:888) ==3522== by 0x567FBA: close_thread_table(THD*, TABLE**) (sql_base.cc:1606) ==3522== by 0x568340: close_open_tables(THD*) (sql_base.cc:1308) ==3522== by 0x56870C: close_thread_tables(THD*) (sql_base.cc:1549) ==3522== by 0x637C38: mysql_admin_table(THD*, TABLE_LIST*, st_ha_check_opt*, char const*, thr_lock_type, bool, bool, unsigned int, int (*)(THD*, TABLE_LIST*, st_ha_check_opt*), int (handler::*)(THD*, st_ha_check_opt*), int (*)(THD*, TABLE_LIST*)) (sql_table.cc:5061) ==3522== by 0x6387D4: mysql_optimize_table(THD*, TABLE_LIST*, st_ha_check_opt*) (sql_table.cc:5224) ==3522== by 0x5B3982: mysql_execute_command(THD*) (sql_parse.cc:3107) ==3522== by 0x5B9070: mysql_parse(THD*, char const*, unsigned int, Parser_state*) (sql_parse.cc:5911) ==3522== by 0x5BA4F2: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1135) ==3522== by 0x5BBA30: do_command(THD*) (sql_parse.cc:807) ==3522== by 0x689222: do_handle_one_connection(THD*) (sql_connect.cc:1196) ==3522== by 0x6892E8: handle_one_connection (sql_connect.cc:1135) ==3522== by 0x4E2E09D: start_thread (in /lib64/libpthread-2.5.so) ==3522== by 0x5DB74CC: clone (in /lib64/libc-2.5.so) ==3522==