1. 26 Oct, 2023 2 commits
    • Yuchen Pei's avatar
      MDEV-15935 Adding global/session system var redirect_url · 5af70dec
      Yuchen Pei authored
      Adding a global/session var `redirect_url' of string type. The initial
      value is empty. Can be supplied in mysqld with --redirect-url or set
      in --init-connect. A valid redirect_url should be of the format
      
      {mysql,mariadb}://host[:port]
      
      where <host> is an arbitrary string not containing colons, and <port>
      is a number between 0 and 65535 inclusive.
      
      The variable will be used by the server to notify clients that they
      should connect to another server, specified by the value of the
      variable, if not empty.
      
      The notification is done by the inclusion of the variable in
      session_track_system_variable.
      5af70dec
    • Yuchen Pei's avatar
      cleanup: string sys_var types · 6151bde4
      Yuchen Pei authored
      Merge sys_var_charptr with sys_var_charptr_base, as well as merge
      Sys_var_session_lexstring into Sys_var_lexstring. Also refactored
      update methods of sys_var_charptr accordingly.
      
      Because the class is more generic, session_update() calls
      sys_var_charptr::session_update() which does not assume a buffer field
      associated with THD, but instead call strdup/free, we get rid of
      THD::default_master_connection_buff accordingly. This also makes THD
      smaller by ~192 bytes, and there can be many thousands of concurrent
      THDs.
      6151bde4
  2. 25 Oct, 2023 1 commit
  3. 23 Oct, 2023 1 commit
    • Brandon Nesterenko's avatar
      MDEV-27247: Add keywords "SQL_BEFORE_GTIDS" and "SQL_AFTER_GTIDS" for START SLAVE UNTIL · 0c1bf5e2
      Brandon Nesterenko authored
      New Feature:
      ============
      This patch extends the START SLAVE UNTIL command with options
      SQL_BEFORE_GTIDS and SQL_AFTER_GTIDS to allow user control of
      whether the replica stops before or after a provided GTID state. Its
      syntax is:
      
      START SLAVE UNTIL (SQL_BEFORE_GTIDS|SQL_AFTER_GTIDS)=”<gtid_list>”
      
      When providing SQL_BEFORE_GTIDS=”<gtid_list>”, for each domain
      specified in the gtid_list, the replica will execute transactions up
      to the GTID found, and immediately stop processing events in that
      domain (without executing the transaction of the specified GTID).
      Once all domains have stopped, the replica will stop. Events
      originating from domains that are not specified in the list are not
      replicated.
      
      START SLAVE UNTIL SQL_AFTER_GTIDS=”<gtid_list>” is an alias to the
      default behavior of START SLAVE UNTIL master_gtid_pos=”<gtid_list>”.
      That is, the replica will only execute transactions originating from
      domain ids provided in the list, and will stop once all transactions
      provided in the UNTIL list have all been executed.
      
      Example:
      =========
      If a primary server has a binary log consisting of the following GTIDs:
      
      0-1-1
      1-1-1
      0-1-2
      1-1-2
      0-1-3
      1-1-3
      
      If a fresh replica (i.e. one with an empty GTID position,
      @@gtid_slave_pos='') is started with SQL_BEFORE_GTIDS, i.e.
      
      START SLAVE UNTIL SQL_BEFORE_GTIDS=”1-1-2”
      
      The resulting gtid_slave_pos of the replica will be “1-1-1”.
      This is because the replica will execute only events from domain 1
      until it sees the transaction with sequence number 2, and
      immediately stop without executing it.
      
      If the replica is started with SQL_AFTER_GTIDS, i.e.
      
      START SLAVE UNTIL SQL_AFTER_GTIDS=”1-1-2”
      
      then the resulting gtid_slave_pos of the replica will be “1-1-2”.
      This is because it will only execute events from domain 1 until it
      has executed the provided GTID.
      
      Reviewed By:
      ============
      Kristian Nielson <knielsen@knielsen-hq.org>
      0c1bf5e2
  4. 19 Oct, 2023 1 commit
    • Daniel Black's avatar
      MDEV-32336 deb default config - use uca1400_ai_ci for utf8mb4 · 0e8dfcfd
      Daniel Black authored
      utf8mb4_general_ci has been outdated for a while and contained loosely
      standardized collations.
      
      UCA-14.0.0 has a more defined collation with multiple benefit that new
      users may not immediately consider, or may assume to be default.
      
      By defining default collation for utf8mb4 to be uc1400_ai_ci newly
      created tables will have a modern standard collation.
      0e8dfcfd
  5. 17 Oct, 2023 2 commits
  6. 12 Oct, 2023 1 commit
  7. 11 Oct, 2023 2 commits
    • Sergei Golubchik's avatar
      MDEV-31684 post-review changes · 6f55cb4b
      Sergei Golubchik authored
      6f55cb4b
    • Rucha Deodhar's avatar
      MDEV-31684 Add timezone information to DATE_FORMAT · 94eb8192
      Rucha Deodhar authored
      Before starting to go over the format string, prepare the current time
      zone information incase '%z' or '%Z' is encountered.
      This information can be obtained as given below:
      
      A) If timezone is not set ( meaning we are working with system timezone):
      Get the MYSQL_TIME representation for current time and GMT time using
      current thread variable for timezone and timezone variable for UTC
      respectively. This MYSQL_TIME variable will be used to calculate time
      difference. Also convert current time in second to tm structure to
      get system timezone information.
      
      B) If timezone is set as offset:
      Get timezone information using current timezone information and store
      in appropriate variable.
      
      C) If timezone is set as some place (example: Europe/Berlin)
      Get timezone information by searching the timezone. During internal
      timezone search, information like timeoffset from UTC and abbrevation
      is stored in another relevant structure. Hence use the same information.
      94eb8192
  8. 04 Oct, 2023 2 commits
  9. 30 Sep, 2023 13 commits
    • Sergei Golubchik's avatar
    • Sergei Golubchik's avatar
      compile-time deprecation reminders · df4bfefb
      Sergei Golubchik authored
      remove old deprecation helpers that were not used anywhere.
      
      create new deprecation helpers and enforce their usage
      
      this also removes inconsistencies in reporting deprecation:
      sometimes it was ER_WARN_DEPRECATED_SYNTAX (1287),
      sometimes ER_WARN_DEPRECATED_SYNTAX_NO_REPLACEMENT (1681),
      sometimes a warning, sometimes a note.
      
      it should always be
      * ER_WARN_DEPRECATED_SYNTAX
      * a warning (because it's something actionable, not purely informational)
      df4bfefb
    • Sergei Golubchik's avatar
      ceb1bd19
    • Sergei Golubchik's avatar
      remove Silence_deprecated_warning · 52a0cd3c
      Sergei Golubchik authored
      it was introduced in ff8651c4 to suppress deprecated
      warnings for CALL under the flawed logic that "It's doesn't
      make sense to print out deprecated syntax warnings when the
      routine is being executed because this kind of warning only
      matters when the routine is being created".
      
      Which is incorrect, a feature might become deprecated after
      the routine was created and a user has to know that to be able
      to update the procedure before it stops working when a
      deprecated feature is removed.
      52a0cd3c
    • Sergei Golubchik's avatar
      MDEV-31811 deprecate old_mode values · 6b9e1220
      Sergei Golubchik authored
      mark non-default values of old_mode as deprecated.
      print a warning when they're set from the command line and in SQL.
      6b9e1220
    • Sergei Golubchik's avatar
      MDEV-32104 remove deprecated features · 82174dae
      Sergei Golubchik authored
      In particular:
      
      * @@debug
        deprecated since 5.5.37
      * sr_YU locale
        deprecated since 10.0.11
      * "engine_condition_pushdown" in the @@optimizer_switch
        deprecated since 10.1.1
      * @@date_format, @@datetime_format, @@time_format, @@max_tmp_tables
        deprecated since  10.1.2
      * @@wsrep_causal_reads
        deprecated since 10.1.3
      * "parser" in mroonga table comment
        deprecated since 10.2.11
      82174dae
    • Sergei Golubchik's avatar
      MDEV-31474 KDF() function · 4f9396b9
      Sergei Golubchik authored
      KDF(key_str, salt [, {info | iterations} [, kdf_name [, width ]]])
      
      kdf_name is "hkdf" or "pbkdf2_hmac" (default).
      
      width (in bits) can be any number divisible by 8,
      by default it's taken from @@block_encryption_mode
      
      iterations must be positive, and is 1000 by default
      
      OpenSSL 1.0 doesn't support HKDF, so it'll return NULL.
      This OpenSSL version is still used in SLES 12 and CentOS 7
      4f9396b9
    • Sergei Golubchik's avatar
      ErrConvStringQ helper · 03c68f40
      Sergei Golubchik authored
      like ErrConvString, but puts the string in 'single quotes'
      03c68f40
    • Sergei Golubchik's avatar
      MDEV-31231 fix windows packaging · 3c9ecf4b
      Sergei Golubchik authored
      followup for 7ba9c7fb
      3c9ecf4b
    • Sergei Golubchik's avatar
      MDEV-31231 fixes for MariaDB-connect-engine* rpms · a8d2e230
      Sergei Golubchik authored
      * don't introduce random four-space-gaps into the middle of description
        (meaning, nicely aligned wrapped string in the code gets ugly
        in the rpm)
      * remove obsolete comment
      * MariaDB-connect-engine is a required package for MariaDB-connect-engine-jdbc
        not "recommended"
      * don't recommend both mariadb-java-client and mysql-connector-java
      * in fact, don't recommend anything, it works badly for old rpm < 4.13,
        installs something that user may not want, and install redundand deps.
        Let's rethink how to do it meaningfully. And not break tests.
      
      followup for 7ba9c7fb
      a8d2e230
    • Sergei Golubchik's avatar
      Revert "MDEV-30610 Update RocksDB to v8.1.1" · 49b5a2b3
      Sergei Golubchik authored
      Not ready yet, it fails its own test suite
      
      This reverts commit 485c9b1f
      49b5a2b3
    • Sergei Golubchik's avatar
      Merge branch '11.2' into 11.3 · 3928c7e2
      Sergei Golubchik authored
      3928c7e2
    • Sergei Golubchik's avatar
      872ed534
  10. 29 Sep, 2023 3 commits
  11. 27 Sep, 2023 1 commit
  12. 25 Sep, 2023 1 commit
  13. 24 Sep, 2023 4 commits
  14. 23 Sep, 2023 2 commits
  15. 21 Sep, 2023 4 commits
    • Nikita Malyavin's avatar
      fix rdb_i_s.cc build · e9573c05
      Nikita Malyavin authored
      e9573c05
    • Nikita Malyavin's avatar
      Merge branch '11.2' into 11.3 · 28b40372
      Nikita Malyavin authored
      28b40372
    • Alexander Barkov's avatar
      MDEV-32220 sql_yacc.yy: unify the drop_routine rule · d75ef02a
      Alexander Barkov authored
      - Removing two copies of the drop_routine.
        Adding a shared and much simplified version.
      
      - Removing LEX metods:
            bool stmt_drop_function(const DDL_options_st &options,
                                    const Lex_ident_sys_st &db,
                                    const Lex_ident_sys_st &name);
      
            bool stmt_drop_function(const DDL_options_st &options,
                                    const Lex_ident_sys_st &name);
      
            bool stmt_drop_procedure(const DDL_options_st &options,
                                     sp_name *name);
      
        The code inside the methods was very similar.
        Adding one method instead:
      
            bool stmt_drop_routine(const Sp_handler *sph,
                                const DDL_options_st &options,
                                const Lex_ident_sys_st &db,
                                const Lex_ident_sys_st &name);
      
      - Adding a new virtual method Sp_handler:sqlcom_drop().
        It helped to unify the code inside the new stmt_drop_routine().
      d75ef02a
    • Alexander Barkov's avatar
      MDEV-32219 Shift/reduce grammar conflict: GRANT .. ON FUNCTION · 19885128
      Alexander Barkov authored
      Resolving the shift/reduce conflict conflict in:
      
      GRANT ..  ON /*ambiguity*/ FUNCTION f1 TO foo@localhost;
      GRANT ... ON /*ambiguity*/ [TABLE] function TO foo@localhost;
      
      and in
      
      REVOKE ..  ON /*ambiguity*/ FUNCTION f1 TO foo@localhost;
      REVOKE ... ON /*ambiguity*/ [TABLE] function TO foo@localhost;
      
      using a new %prec directive.
      19885128