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

Changes to temporary tables are no longer logged

    XMLWordPrintable

Details

    Description

      According to the documentation (https://mariadb.com/kb/en/read-only-slaves/) changes to TEMPORARY TABLEs are no longer logged in the binary log:
      CREATE, DROP, ALTER, INSERT and DELETE of temporary tables are not logged to binary log, even in statement or mixed mode. With earlier MariaDB versions, one can avoid the problem with temporary tables by using binlog_format=ROW in which cases temporary tables are never logged.

      I don't think this is correct, imagin this:

      CREATE TEMPORARY TABLE encrypt_the_password AS select id, username, MD5(password) FROM user;
      INSERT INTO user_with_encryped_password SELECT * FROM encrypt_the_password;
      

      The `user_with_encryped_password` table is a real table, and it cannot be filled if the temporary table does not exist in that session. Using SBR or MIXED replication, that is.

      Is the documentation incorrect or is this a bug in the server?

      Attachments

        Issue Links

          Activity

            People

              Elkin Andrei Elkin
              michaeldg Michaël de groot
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

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