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

old_passwords=1, while dynamic, does not take immediate effect when using replication

    XMLWordPrintable

Details

    Description

      # Requires standard m/s setup, SBR/MBR/RBR all affected
      SET @@old_passwords=1;
      CREATE USER ''@'localhost';
      SELECT (@id:=Id) FROM information_schema.processlist WHERE User='repl_user';  # change to replication user
      KILL QUERY @id;
      

      Leads to:

      11.5.0 929c2e06aae47f2dabf51b843ac84911de95bc7f (Optimized)

      2024-04-20 16:47:16 5 [Note] Slave: received end packet from server, apparent master shutdown:
      2024-04-20 16:47:16 5 [Note] Slave I/O thread: Failed reading log event, reconnecting to retry, log 'binlog.000001' at position 1094; GTID position '0-1-4'
      2024-04-20 16:47:16 5 [ERROR] Slave I/O: error reconnecting to master 'repl_user@127.0.0.1:11539' - retry-time: 60  maximum-retries: 100000  message: Server is running in --secure-auth mode, but 'repl_user'@'localhost' has a password in the old format; please change the password to the new format, Internal MariaDB error code: 1275
      

      If CREATE USER... is removed, the error does now show (while it should). When replacing the user from ''@ to 'a'@ in the CREATE USER the error also does not show.

      In MTR, the slave disconnects also, but does not experience the same error (note the different WHERE clause to adjust for MTR):

      --source include/have_binlog_format_row.inc
      --source include/master-slave.inc
      SET @@old_passwords=1;
      CREATE USER ''@'localhost';
      SELECT (@id:=Id) FROM information_schema.processlist WHERE db IS NULL;
      KILL QUERY @id;
      --connection slave
      SHOW SLAVE STATUS;
      --sync_slave_with_master
      SLEEP 10;
      --source include/rpl_end.inc

      Leads to:

      11.5.0 929c2e06aae47f2dabf51b843ac84911de95bc7f (Optimized)

      mysqltest: At line 9: sync_slave_with_master failed: 'select master_pos_wait('slave-bin.000001', 463, 300, '')' returned NULL indicating slave SQL thread failure
      

      Attachments

        Activity

          People

            Elkin Andrei Elkin
            Roel Roel Van de Paar
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.