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

Userstat counts temporary table updates in user/client_statistics, but not in table_statistics

    XMLWordPrintable

Details

    Description

      set @userstat.save= @@userstat;
      set global userstat= 1;
       
      create temporary table t (a int primary key);
       
      flush user_statistics, table_statistics;
      insert into t values (1),(2);
      update t set a = 10 where a = 1;
      select rows_inserted, rows_updated from information_schema.user_statistics where user = 'root';
      select table_name, rows_changed from information_schema.table_statistics where table_schema = 'test';
       
      # Cleanup
      set global userstat= @userstat.save;
      

      10.4 ee59ca7ff1620dd74b9bc1449878c5d1acee0f53

      insert into t values (1),(2);
      update t set a = 10 where a = 1;
      select rows_inserted, rows_updated from information_schema.user_statistics where user = 'root';
      rows_inserted	rows_updated
      2	1
      select table_name, rows_changed from information_schema.table_statistics where table_schema = 'test';
      table_name	rows_changed
      set global userstat= @userstat.save;
      

      Attachments

        Activity

          People

            monty Michael Widenius
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.