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

mariadb-tzinfo-to-sql binlog, embedded, and performance fixes

Details

    Description

      MDEV-18778 (10.2) broke using the output in embedded server mode (and no-one noticed) because the SQL generated required the delimiter parsing in the client.

      A mtr test mysql_tzinfo_to_sql_symlink.test to work with embedded mode

      --exec $MYSQL_TZINFO_TO_SQL $MYSQLTEST_VARDIR/zoneinfo > $MYSQL_TMP_DIR/tz.sql
      --source $MYSQL_TMP_DIR/tz.sql
      

      MDEV-23326 (10.4) didn't do a LOCK TABLES in the non-skip_write_binlog branch of the code and should have.

      The --skip-write-binlog option from MDEV-18778 that doesn't always skip-write-binlog is just horribly confusing. As bnestere said, what breaks? "explicitly providing --skip-write-binlog, but actually wants mysql-tzinfo-to-sql to be binlogged".

      Lastly, we could make the SQL generated preserve the session SQL_LOG_BIN state.

      There's also a 10.6 case with wsrep_mode=REPLICA_ARIA where there isn't a need to change to InnoDB for replicating, but its a fairly minor case.

      Implementation

      Using user variables and EXECUTE IMMEDIATE prevents the need to use delimiter or a stored procedure.

      draft implementation (against 10.6) (wsrep_mode=REPLICA_ARIA could be removed and the rest is 10.4 friendly (where MDEV-23326 was added).

      Some test cases from a previous MDEV-23326 draft may be useful.

      A 10.3 fix by moving SQL_LOG_BIN=? out of the WSREP_ON=ON condition.

      Attachments

        Issue Links

          Activity

            danblack Daniel Black added a comment -

            https://github.com/MariaDB/server/pull/2099 for the 10.6 side because that's when EXECUTE IMMEDIATE became available to LOCK TABLES.

            I'm still to prepare an earlier similar fix.

            danblack Daniel Black added a comment - https://github.com/MariaDB/server/pull/2099 for the 10.6 side because that's when EXECUTE IMMEDIATE became available to LOCK TABLES. I'm still to prepare an earlier similar fix.

            Reviewed the 10.6 PR

            bnestere Brandon Nesterenko added a comment - Reviewed the 10.6 PR
            danblack Daniel Black added a comment -

            Updated PR according to review.

            One more still to come for the earlier MariaDB versions.

            danblack Daniel Black added a comment - Updated PR according to review. One more still to come for the earlier MariaDB versions.
            danblack Daniel Black added a comment -

            10.2 version on bb-10.2-danielblack-MDEV-28263mysql-tzinfo-to-sql as a very minimal making SQL_LOG_BIN=0 unconditional under -skip-write-binlog.

            danblack Daniel Black added a comment - 10.2 version on bb-10.2-danielblack- MDEV-28263 mysql-tzinfo-to-sql as a very minimal making SQL_LOG_BIN=0 unconditional under -skip-write-binlog .

            The 10.2 patch looks good - I left a question on GH.

            bnestere Brandon Nesterenko added a comment - The 10.2 patch looks good - I left a question on GH.

            People

              danblack Daniel Black
              danblack Daniel Black
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.