diff options
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r-- | sql/sql_show.cc | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 8c17a86d4ce..00a06a6e404 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -3375,16 +3375,6 @@ static my_bool processlist_callback(THD *tmp, processlist_callback_arg *arg) arg->table->field[11]->store((double) tmp->progress.counter / (double) max_counter*100.0); } - else - { - /* - This is a DECIMAL column without DEFAULT. - restore_record() fills its Field::ptr to zero bytes, - according to pack_length(). But an array of zero bytes - is not a valid decimal. Set it explicitly to 0. - */ - arg->table->field[11]->store((longlong) 0, true); - } mysql_mutex_unlock(&tmp->LOCK_thd_data); } @@ -8859,6 +8849,7 @@ bool optimize_schema_tables_memory_usage(List<TABLE_LIST> &tables) if (bitmap_is_set(table->read_set, i)) { field->move_field(cur); + field->reset(); *to_recinfo++= *from_recinfo; cur+= from_recinfo->length; } @@ -8880,6 +8871,7 @@ bool optimize_schema_tables_memory_usage(List<TABLE_LIST> &tables) to_recinfo->type= FIELD_NORMAL; to_recinfo++; } + store_record(table, s->default_values); p->recinfo= to_recinfo; // TODO switch from Aria to Memory if all blobs were optimized away? |