1. 14 Oct, 2019 16 commits
    • Sergei Golubchik's avatar
      bugfix: PS and dependent subqueries · 904dc934
      Sergei Golubchik authored
      when there are nested subqueries, and a field in a subquery is
      resolved as an outer reference to a table few levels up, all subqueries
      the subquery with a reference and all subqueries up to subquery with
      the table must be marked as dependent.
      
      in the text protocol and PS-prepare step it happens in
      Item_field::fix_outer_field in a loop that walks contexts
      using context->outer_context.
      
      in PS-execute step Item_field->cached_table is set and subqueries
      are walked in a PS-only mark_select_range_as_dependent(),
      which inconsistently walks SELECT_LEX'es using select_lex->outer_select().
      
      Fix mark_select_range_as_dependent() to walk contexts, not SELECT_LEX'es,
      to have the same logic both in prepare and execute steps.
      
      This fixes a crash in main.insert_returning in --ps-protocol
      904dc934
    • Rucha Deodhar's avatar
      MDEV-10014 Add RETURNING to INSERT · 837ad9ab
      Rucha Deodhar authored
      Closes #1384
      837ad9ab
    • Sergei Golubchik's avatar
      cleanup st_select_lex_unit::explainable · 57a09a72
      Sergei Golubchik authored
      57a09a72
    • Sergei Golubchik's avatar
      cleanup: formatting · 721a9df7
      Sergei Golubchik authored
      comments, whitespaces
      721a9df7
    • Sergei Golubchik's avatar
      cleanup: reduce code duplication · 828d9ae5
      Sergei Golubchik authored
      828d9ae5
    • Sergei Golubchik's avatar
      cleanup: don't pass wild_num to setup_wild() · a4a025f5
      Sergei Golubchik authored
      because internally setup_wild() adjusts select_lex->with_wild directly
      anyway, so there is no reason to pretend that the number of '*' may be
      anything else but select_lex->with_wild
      
      And don't update select_lex->item_list, because fields can come
      from anywhere and don't necessarily have to be copied into select_lex.
      a4a025f5
    • Sergei Golubchik's avatar
      outer references in subqueries in INSERT · c7320830
      Sergei Golubchik authored
      remove inconsistent limitation
      c7320830
    • Sergei Golubchik's avatar
      MDEV-12684 Show what config file a sysvar got a value from · 173ae631
      Sergei Golubchik authored
      Show the config file in I_S.SYSTEM_VARIABLES
      But only if the user has FILE privilege
      173ae631
    • Sergei Golubchik's avatar
      MDEV-12684 Show what config file a sysvar got a value from · f217612f
      Sergei Golubchik authored
      change get_one_option() prototype to pass the filename and
      not to pass the redundant optid.
      f217612f
    • Sergei Golubchik's avatar
      MDEV-12684 Show what config file a sysvar got a value from · 927521a2
      Sergei Golubchik authored
      make load_defaults() store the file name in the generated option list
      using a special marker ---file-marker--- option.
      
      Pick up this filename in handle_options().
      
      Remove ---args-separator---, use ---file-marker--- with an empty file
      name instead - this simplifies checks on the caller, only one special
      option to recognize.
      927521a2
    • Sergei Golubchik's avatar
      cleanup: don't use my_getopt_is_args_separator() · f7b8d144
      Sergei Golubchik authored
      only my_getopt should use it, because it changes my_getopt's behavior.
      If one simply wants to skip the separator - don't ask it to be added
      in the first place
      f7b8d144
    • Sergei Golubchik's avatar
      cleanup: unify --defaults* option handling · 3e569727
      Sergei Golubchik authored
      process all --defaults* options uniformly,
      get rid of special case for --no-defaults and --print-defaults
      use realpath instead of blindly concatenating pwd and relative path.
      3e569727
    • Sergei Golubchik's avatar
      cleanup: my_getopt, get_one_option isn't optional · 3ea51b51
      Sergei Golubchik authored
      it turns out that practically every single user of handle_options()
      used the get_one_option callback. Simplify the code,
      make it mandatory, adjust unit tests.
      3ea51b51
    • Sergei Golubchik's avatar
      cleanup: my_getopt, consistency · eb3431d5
      Sergei Golubchik authored
      almost all my_getopt settings and callbacks are global variables,
      directly assignable to configure my_getopt. Only getopt_get_addr
      was using a setter function. Get rid of it, make it a global
      directly assignable variable like all other settings.
      
      Also make getopt_compare_strings() static.
      eb3431d5
    • Sergei Golubchik's avatar
      cleanup: my_defaults, remove Process_option_func · 8965ae27
      Sergei Golubchik authored
      This is a remnant of "MySQL Instance Manager", which was removed in
      MySQL-5.5.0 and never existed in MariaDB
      
      Remove callback, simplify and optimize the code accordingly.
      8965ae27
    • Alexander Barkov's avatar
      MDEV-20818 ER_CRASHED_ON_USAGE or Assertion `length <= column->length' failed... · 5392726e
      Alexander Barkov authored
      MDEV-20818 ER_CRASHED_ON_USAGE or Assertion `length <= column->length' failed in write_block_record on temporary table
      
      The patch for `MDEV-20795 CAST(inet6 AS BINARY) returns wrong result`
      unintentionally changed what Item_char_typecast::type_handler()
      returns. This broke UNIONs with the BINARY() function, as the Aria
      engine started to get columns of unexpected data types.
      
      Restoring previous behaviour, to return
        Type_handler::string_type_handler(max_length).
      
      The prototype for Item_handed_func::return_type_handler() has changed
      from:
        const Type_handler *return_type_handler() const
      to:
        const Type_handler *return_type_handler(const Item_handled_func *) const
      5392726e
  2. 13 Oct, 2019 8 commits
  3. 12 Oct, 2019 12 commits
  4. 11 Oct, 2019 4 commits
    • Julius Goryavsky's avatar
      MDEV-20728: /usr/sbin/mysqld: unknown variable 'defaults-group-suffix=mysqld1 · 2ae02c29
      Julius Goryavsky authored
      When the mysqld_multi script passes the --defaults-group-suffix
      option to mysqld, it must remove the initial substring with the
      group name ("mysqld") from option value, because otherwise substring
      "mysqld" will be added to the group name and then the group name
      will contain the word "mysqld" twice, which is wrong, because
      mysqld itself adds the suffix received to the group name.
      2ae02c29
    • Julius Goryavsky's avatar
      MDEV-20728: /usr/sbin/mysqld: unknown variable 'defaults-group-suffix=mysqld1 · 4ca0abe9
      Julius Goryavsky authored
      When the mysqld_multi script passes the --defaults-group-suffix
      option to mysqld, it must remove the initial substring with the
      group name ("mysqld") from option value, because otherwise substring
      "mysqld" will be added to the group name and then the group name
      will contain the word "mysqld" twice, which is wrong, because
      mysqld itself adds the suffix received to the group name.
      4ca0abe9
    • Julius Goryavsky's avatar
      MDEV-20728: /usr/sbin/mysqld: unknown variable 'defaults-group-suffix=mysqld1 · 0ecc85c5
      Julius Goryavsky authored
      When the mysqld_multi script passes the --defaults-group-suffix
      option to mysqld, it must remove the initial substring with the
      group name ("mysqld") from option value, because otherwise substring
      "mysqld" will be added to the group name and then the group name
      will contain the word "mysqld" twice, which is wrong, because
      mysqld itself adds the suffix received to the group name.
      0ecc85c5
    • Julius Goryavsky's avatar
      MDEV-20728: /usr/sbin/mysqld: unknown variable 'defaults-group-suffix=mysqld1 · 36824d2b
      Julius Goryavsky authored
      When the mysqld_multi script passes the --defaults-group-suffix
      option to mysqld, it must remove the initial substring with the
      group name ("mysqld") from option value, because otherwise substring
      "mysqld" will be added to the group name and then the group name
      will contain the word "mysqld" twice, which is wrong, because
      mysqld itself adds the suffix received to the group name.
      36824d2b