Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-8372

Use helper methods introduced in MDEV-7824 all around the code

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 10.1
    • Fix Version/s: 10.1.8
    • Component/s: OTHER
    • Labels:
      None
    • Sprint:
      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_values
            if (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)

        Gliffy Diagrams

          Attachments

            Activity

            There are no comments yet on this issue.

              People

              • Assignee:
                bar Alexander Barkov
                Reporter:
                bar Alexander Barkov
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 10 minutes
                  10m

                    Agile