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

MTR: Write a record when change_user command is executed

Details

    Description

      change_user command should be reflected in the MTR output the same way as connection changes. It can be put under the same enable_connect_log condition, which is ON by default nowadays, or even be made unconditional.

      CREATE USER foo;
      --connect (con1,localhost,root,,)
      SELECT CURRENT_USER();
      --change_user foo
      SELECT CURRENT_USER();
      --disconnect con1
      --connection default
      DROP USER foo;
      

      main ab468e33aff110b44a31ce0350894906ff4bc757

      CREATE USER foo;
      connect  con1,localhost,root,,;
      SELECT CURRENT_USER();
      CURRENT_USER()
      root@localhost
      <-- HERE we should have the extra record-->
      SELECT CURRENT_USER();
      CURRENT_USER()
      foo@%
      disconnect con1;
      connection default;
      DROP USER foo;
      

      So, the record should be at "<-- HERE we should have the extra record-->".

      Attachments

        Activity

          elenst Elena Stepanova created issue -
          elenst Elena Stepanova made changes -
          Field Original Value New Value
          Description {{change_user}} command should be reflected in the MTR output the same way as connection changes. It can be put under the same {{enable_connect_log}} condition, which is ON by default nowadays, or even be made unconditional.

          {code:sql}
          CREATE USER foo;
          --connect (con1,localhost,root,,)
          SELECT CURRENT_USER();
          --change_user foo
          SELECT CURRENT_USER();
          --disconnect con1
          --connection default
          DROP USER foo;
          {code}

          {code:sql|title=ab468e33aff110b44a31ce0350894906ff4bc757}
          CREATE USER foo;
          connect con1,localhost,root,,;
          SELECT CURRENT_USER();
          CURRENT_USER()
          root@localhost
          <-- HERE we should have the extra record-->
          SELECT CURRENT_USER();
          CURRENT_USER()
          foo@%
          disconnect con1;
          connection default;
          DROP USER foo;
          {code}

          So, the record should be at "<-- HERE we should have the extra record-->".
          {{change_user}} command should be reflected in the MTR output the same way as connection changes. It can be put under the same {{enable_connect_log}} condition, which is ON by default nowadays, or even be made unconditional.

          {code:sql}
          CREATE USER foo;
          --connect (con1,localhost,root,,)
          SELECT CURRENT_USER();
          --change_user foo
          SELECT CURRENT_USER();
          --disconnect con1
          --connection default
          DROP USER foo;
          {code}

          {code:sql|title=main ab468e33aff110b44a31ce0350894906ff4bc757}
          CREATE USER foo;
          connect con1,localhost,root,,;
          SELECT CURRENT_USER();
          CURRENT_USER()
          root@localhost
          <-- HERE we should have the extra record-->
          SELECT CURRENT_USER();
          CURRENT_USER()
          foo@%
          disconnect con1;
          connection default;
          DROP USER foo;
          {code}

          So, the record should be at "<-- HERE we should have the extra record-->".
          serg Sergei Golubchik made changes -
          Labels beginner-friendly
          serg Sergei Golubchik made changes -
          Assignee Sergei Golubchik [ serg ]
          farihais Fariha Shaikh added a comment -

          I'm currently working on this!

          farihais Fariha Shaikh added a comment - I'm currently working on this!
          svoj Sergey Vojtovich made changes -
          Labels beginner-friendly beginner-friendly contribution
          svoj Sergey Vojtovich made changes -
          Due Date 2025-06-01
          svoj Sergey Vojtovich made changes -
          Assignee Sergei Golubchik [ serg ] Sergey Vojtovich [ svoj ]
          svoj Sergey Vojtovich made changes -
          Fix Version/s N/A [ 14700 ]
          svoj Sergey Vojtovich made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          svoj Sergey Vojtovich made changes -
          Assignee Sergey Vojtovich [ svoj ] Sergei Golubchik [ serg ]
          Status In Progress [ 3 ] In Review [ 10002 ]
          svoj Sergey Vojtovich added a comment - Pull request: https://github.com/MariaDB/server/pull/4012
          serg Sergei Golubchik made changes -
          Priority Trivial [ 5 ] Critical [ 2 ]
          serg Sergei Golubchik made changes -
          Fix Version/s 10.5 [ 23123 ]
          Fix Version/s N/A [ 14700 ]
          serg Sergei Golubchik made changes -
          Status In Review [ 10002 ] Stalled [ 10000 ]
          serg Sergei Golubchik made changes -
          Status Stalled [ 10000 ] Needs Feedback [ 10501 ]

          People

            serg Sergei Golubchik
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            4 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.