Skip to content

Commit

Permalink
MDEV-31609 mtr: only print session tracking from the last statement
Browse files Browse the repository at this point in the history
We do this by checking server status. By doing this we avoid printing
session tracking info from previous (but not the last) statement.

The change is from Sergei Golubchik
  • Loading branch information
mariadb-YuchenPei committed Apr 10, 2024
1 parent 7bec41d commit e32736e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 2 additions & 0 deletions client/mysqltest.cc
Expand Up @@ -7948,6 +7948,8 @@ static const char *trking_info_desc[SESSION_TRACK_END + 1]=

static void append_session_track_info(DYNAMIC_STRING *ds, MYSQL *mysql)
{
if (!(mysql->server_status & SERVER_SESSION_STATE_CHANGED))
return;
#ifndef EMBEDDED_LIBRARY
for (unsigned int type= SESSION_TRACK_BEGIN; type <= SESSION_TRACK_END; type++)
{
Expand Down
8 changes: 0 additions & 8 deletions mysql-test/main/session_tracker_last_gtid.result
Expand Up @@ -11,10 +11,6 @@ create table t1 (a int) engine=innodb;
select @@last_gtid;
@@last_gtid
0-1-1000
-- Tracker : SESSION_TRACK_SYSTEM_VARIABLES
-- last_gtid
-- 0-1-1000

insert into t1 values (1);
-- Tracker : SESSION_TRACK_SYSTEM_VARIABLES
-- last_gtid
Expand All @@ -23,10 +19,6 @@ insert into t1 values (1);
select @@last_gtid;
@@last_gtid
0-1-1001
-- Tracker : SESSION_TRACK_SYSTEM_VARIABLES
-- last_gtid
-- 0-1-1001

drop table t1;
-- Tracker : SESSION_TRACK_SYSTEM_VARIABLES
-- last_gtid
Expand Down

0 comments on commit e32736e

Please sign in to comment.