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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • 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)

        Attachments

          Activity

            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:

                Git Integration