Fix for BUG#20866 "show table status on innodb raises assertion"

and its duplicate BUG#19057 "Test 'rpl_row_func003' fails on SuSE SLES9 x86".
It was an assertion failure, only in debug builds, not present
in released versions (nothing to document).
It happened when doing SHOW TABLE STATUS on an InnoDB table
having an auto_increment column, right after creating the table.
The test which would have caught this problem was disabled in 
mid-April for another reason (how much I like tests disabled for
months...).
parent 5de6240a
...@@ -34,7 +34,6 @@ rpl_ndb_innodb2ndb : Bug #19710 Cluster replication to partition table fa ...@@ -34,7 +34,6 @@ rpl_ndb_innodb2ndb : Bug #19710 Cluster replication to partition table fa
#rpl_ndb_log : BUG#18947 2006-03-21 tomas CRBR: order in binlog of create table and insert (on different table) not determ #rpl_ndb_log : BUG#18947 2006-03-21 tomas CRBR: order in binlog of create table and insert (on different table) not determ
rpl_ndb_myisam2ndb : Bug #19710 Cluster replication to partition table fails on DELETE FROM statement rpl_ndb_myisam2ndb : Bug #19710 Cluster replication to partition table fails on DELETE FROM statement
rpl_row_blob_innodb : BUG#18980 2006-04-10 kent Test fails randomly rpl_row_blob_innodb : BUG#18980 2006-04-10 kent Test fails randomly
rpl_row_func003 : BUG#19074 2006-13-04 andrei test failed
rpl_sp : BUG#16456 2006-02-16 jmiller rpl_sp : BUG#16456 2006-02-16 jmiller
rpl_sp_effects : BUG#19862 2006-06-15 mkindahl rpl_sp_effects : BUG#19862 2006-06-15 mkindahl
......
...@@ -7067,10 +7067,16 @@ ha_innobase::innobase_read_and_init_auto_inc( ...@@ -7067,10 +7067,16 @@ ha_innobase::innobase_read_and_init_auto_inc(
'found_next_number_field' below because MySQL in SHOW TABLE 'found_next_number_field' below because MySQL in SHOW TABLE
STATUS does not seem to set 'next_number_field'. The comment STATUS does not seem to set 'next_number_field'. The comment
in table.h says that 'next_number_field' is set when it is in table.h says that 'next_number_field' is set when it is
'active'. */ 'active'.
Since 5.1 MySQL enforces that we announce fields which we will
read; as we only do a val_*() call, dbug_tmp_use_all_columns()
with read_set is sufficient. */
my_bitmap_map *old_map;
old_map= dbug_tmp_use_all_columns(table, table->read_set);
auto_inc = (longlong) table->found_next_number_field-> auto_inc = (longlong) table->found_next_number_field->
val_int_offset(table->s->rec_buff_length) + 1; val_int_offset(table->s->rec_buff_length) + 1;
dbug_tmp_restore_column_map(table->read_set, old_map);
} }
dict_table_autoinc_initialize(prebuilt->table, auto_inc); dict_table_autoinc_initialize(prebuilt->table, auto_inc);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment