Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
10.1(EOL)
-
None
-
10.1.6-2, 10.1.8-1
Description
The patch for MDEV-7824 is going to add a few useful helper methods.
During review, Sergei suggested to use these new methods in the other code parts:
This is ok, but then, please, see what other places in the code you can
change to use your new helpers. In a separate commit, of course. I
suspect there's a lot of code that's doing, like
/* Get the value from default_values */diff= (my_ptrdiff_t) (orig_field->table->s->default_values-orig_field->table->record[0]);orig_field->move_field_offset(diff); // Points now at default_valuesif (orig_field->is_real_null())field->set_null();else{field->set_notnull();memcpy(field->ptr, orig_field->ptr, field->pack_length());}orig_field->move_field_offset(-diff); // Back to record[0]
(this is from create_tmp_table() in sql_select.cc)