Skip to content

Commit 27ea296

Browse files
committed
Dead code removal: sess_t
The session object is not really needed for anything. We can directly create and free the dummy purge_sys->query->trx.
1 parent 7baea2e commit 27ea296

23 files changed

+20
-219
lines changed

storage/innobase/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ SET(INNOBASE_SOURCES
137137
trx/trx0sys.cc
138138
trx/trx0trx.cc
139139
trx/trx0undo.cc
140-
usr/usr0sess.cc
141140
ut/ut0crc32.cc
142141
ut/ut0dbg.cc
143142
ut/ut0list.cc

storage/innobase/dict/dict0crea.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*****************************************************************************
22
33
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
4-
Copyright (c) 2017, MariaDB Corporation.
4+
Copyright (c) 2017, 2018, MariaDB Corporation.
55
66
This program is free software; you can redistribute it and/or modify it under
77
the terms of the GNU General Public License as published by the Free Software
@@ -38,7 +38,6 @@ Created 1/8/1996 Heikki Tuuri
3838
#include "row0mysql.h"
3939
#include "pars0pars.h"
4040
#include "trx0roll.h"
41-
#include "usr0sess.h"
4241
#include "ut0vec.h"
4342
#include "dict0priv.h"
4443
#include "fts0priv.h"

storage/innobase/include/pars0opt.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*****************************************************************************
22
33
Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved.
4-
Copyright (c) 2017, MariaDB Corporation.
4+
Copyright (c) 2017, 2018, MariaDB Corporation.
55
66
This program is free software; you can redistribute it and/or modify it under
77
the terms of the GNU General Public License as published by the Free Software
@@ -29,7 +29,6 @@ Created 12/21/1997 Heikki Tuuri
2929

3030
#include "univ.i"
3131
#include "que0types.h"
32-
#include "usr0types.h"
3332
#include "pars0sym.h"
3433
#include "dict0types.h"
3534
#include "row0sel.h"

storage/innobase/include/pars0pars.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*****************************************************************************
22
33
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
4-
Copyright (c) 2017, MariaDB Corporation.
4+
Copyright (c) 2017, 2018, MariaDB Corporation.
55
66
This program is free software; you can redistribute it and/or modify it under
77
the terms of the GNU General Public License as published by the Free Software
@@ -29,7 +29,6 @@ Created 11/19/1996 Heikki Tuuri
2929

3030
#include "univ.i"
3131
#include "que0types.h"
32-
#include "usr0types.h"
3332
#include "pars0types.h"
3433
#include "row0types.h"
3534
#include "trx0types.h"

storage/innobase/include/pars0sym.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*****************************************************************************
22
33
Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved.
4-
Copyright (c) 2017, MariaDB Corporation.
4+
Copyright (c) 2017, 2018, MariaDB Corporation.
55
66
This program is free software; you can redistribute it and/or modify it under
77
the terms of the GNU General Public License as published by the Free Software
@@ -29,7 +29,6 @@ Created 12/15/1997 Heikki Tuuri
2929

3030
#include "univ.i"
3131
#include "que0types.h"
32-
#include "usr0types.h"
3332
#include "dict0types.h"
3433
#include "pars0types.h"
3534
#include "row0types.h"

storage/innobase/include/que0que.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*****************************************************************************
22
33
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
4-
Copyright (c) 2017, MariaDB Corporation.
4+
Copyright (c) 2017, 2018, MariaDB Corporation.
55
66
This program is free software; you can redistribute it and/or modify it under
77
the terms of the GNU General Public License as published by the Free Software
@@ -33,7 +33,6 @@ Created 5/27/1996 Heikki Tuuri
3333
#include "trx0trx.h"
3434
#include "trx0roll.h"
3535
#include "srv0srv.h"
36-
#include "usr0types.h"
3736
#include "que0types.h"
3837
#include "row0types.h"
3938
#include "pars0types.h"

storage/innobase/include/que0que.ic

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ Query graph
2323
Created 5/27/1996 Heikki Tuuri
2424
*******************************************************/
2525

26-
#include "usr0sess.h"
27-
2826
/***********************************************************************//**
2927
Gets the trx of a query thread. */
3028
UNIV_INLINE

storage/innobase/include/trx0purge.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*****************************************************************************
22
33
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
4-
Copyright (c) 2017, MariaDB Corporation. All Rights Reserved.
4+
Copyright (c) 2017, 2018, MariaDB Corporation.
55
66
This program is free software; you can redistribute it and/or modify it under
77
the terms of the GNU General Public License as published by the Free Software
@@ -33,7 +33,6 @@ Created 3/26/1996 Heikki Tuuri
3333
#include "trx0sys.h"
3434
#include "que0types.h"
3535
#include "page0page.h"
36-
#include "usr0sess.h"
3736
#include "fil0fil.h"
3837
#include "read0types.h"
3938

@@ -494,8 +493,6 @@ class purge_sys_t
494493
/** Destruct the purge system. */
495494
~purge_sys_t();
496495

497-
sess_t* sess; /*!< System session running the purge
498-
query */
499496
rw_lock_t latch; /*!< The latch protecting the purge
500497
view. A purge operation must acquire an
501498
x-latch here for the instant at which

storage/innobase/include/trx0trx.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*****************************************************************************
22
33
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
4-
Copyright (c) 2015, 2017, MariaDB Corporation.
4+
Copyright (c) 2015, 2018, MariaDB Corporation.
55
66
This program is free software; you can redistribute it and/or modify it under
77
the terms of the GNU General Public License as published by the Free Software
@@ -38,7 +38,6 @@ Created 3/26/1996 Heikki Tuuri
3838

3939
#include "lock0types.h"
4040
#include "log0log.h"
41-
#include "usr0types.h"
4241
#include "que0types.h"
4342
#include "mem0mem.h"
4443
#include "trx0xa.h"
@@ -55,9 +54,6 @@ class ReadView;
5554
// Forward declaration
5655
class FlushObserver;
5756

58-
/** Dummy session used currently in MySQL interface */
59-
extern sess_t* trx_dummy_sess;
60-
6157
/** Set flush observer for the transaction
6258
@param[in/out] trx transaction struct
6359
@param[in] observer flush observer */
@@ -1139,7 +1135,6 @@ struct trx_t {
11391135
ulint error_key_num; /*!< if the index creation fails to a
11401136
duplicate key error, a mysql key
11411137
number of that index is stored here */
1142-
sess_t* sess; /*!< session of the trx, NULL if none */
11431138
que_t* graph; /*!< query currently run in the session,
11441139
or NULL if none; NOTE that the query
11451140
belongs to the session, and it can

storage/innobase/include/usr0sess.h

Lines changed: 0 additions & 69 deletions
This file was deleted.

0 commit comments

Comments
 (0)