Skip to content

Commit d906e4c

Browse files
author
Marko Mäkelä
committed
Bug#20369370 REMOVE UNUSED FUNCTION INNOBASE_CLOSE_THD
Remove the unused function innobase_close_thd() and elated wrapper functions and function pointers that were added by the InnoDB Memcached plugin. Reviewed-by: Jimmy Yang <jimmy.yang@oracle.com>
1 parent 400e9b4 commit d906e4c

File tree

5 files changed

+4
-67
lines changed

5 files changed

+4
-67
lines changed

plugin/innodb_memcached/innodb_memcache/src/innodb_api.c

+1-13
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/***********************************************************************
22
3-
Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3+
Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
44
55
This program is free software; you can redistribute it and/or modify it
66
under the terms of the GNU General Public License as published by the
@@ -77,7 +77,6 @@ static ib_cb_t* innodb_memcached_api[] = {
7777
(ib_cb_t*) &ib_cb_col_get_name,
7878
(ib_cb_t*) &ib_cb_table_truncate,
7979
(ib_cb_t*) &ib_cb_cursor_open_index_using_name,
80-
(ib_cb_t*) &ib_cb_close_thd,
8180
(ib_cb_t*) &ib_cb_get_cfg,
8281
(ib_cb_t*) &ib_cb_cursor_set_memcached_sync,
8382
(ib_cb_t*) &ib_cb_cursor_set_cluster_access,
@@ -1966,17 +1965,6 @@ innodb_cb_trx_commit(
19661965
return(ib_cb_trx_commit(ib_trx));
19671966
}
19681967

1969-
/*************************************************************//**
1970-
Close table associated to the connection
1971-
@return DB_SUCCESS if successful or error code */
1972-
ib_err_t
1973-
innodb_cb_close_thd(
1974-
/*=================*/
1975-
void* thd) /*!<in: THD */
1976-
{
1977-
return(ib_cb_close_thd(thd));
1978-
}
1979-
19801968
/*****************************************************************//**
19811969
update the cursor with new transactions and also reset the cursor
19821970
@return DB_SUCCESS or err code */

storage/innobase/api/api0api.cc

+1-15
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*****************************************************************************
22
3-
Copyright (c) 2008, 2014, Oracle and/or its affiliates. All Rights Reserved.
3+
Copyright (c) 2008, 2015, Oracle and/or its affiliates. All Rights Reserved.
44
55
This program is free software; you can redistribute it and/or modify it under
66
the terms of the GNU General Public License as published by the Free Software
@@ -3304,20 +3304,6 @@ ib_table_truncate(
33043304
return(trunc_err);
33053305
}
33063306

3307-
/*****************************************************************//**
3308-
Frees a possible InnoDB trx object associated with the current THD.
3309-
@return 0 or error number */
3310-
ib_err_t
3311-
ib_close_thd(
3312-
/*=========*/
3313-
void* thd) /*!< in: handle to the MySQL thread of the user
3314-
whose resources should be free'd */
3315-
{
3316-
innobase_close_thd(static_cast<THD*>(thd));
3317-
3318-
return(DB_SUCCESS);
3319-
}
3320-
33213307
/*****************************************************************//**
33223308
Return isolation configuration set by "innodb_api_trx_level"
33233309
@return trx isolation level*/

storage/innobase/handler/ha_innodb.cc

-19
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,6 @@ ib_cb_t innodb_api_cb[] = {
450450
(ib_cb_t) ib_col_get_name,
451451
(ib_cb_t) ib_table_truncate,
452452
(ib_cb_t) ib_cursor_open_index_using_name,
453-
(ib_cb_t) ib_close_thd,
454453
(ib_cb_t) ib_cfg_get_cfg,
455454
(ib_cb_t) ib_cursor_set_memcached_sync,
456455
(ib_cb_t) ib_cursor_set_cluster_access,
@@ -4103,24 +4102,6 @@ innobase_kill_connection(
41034102
DBUG_VOID_RETURN;
41044103
}
41054104

4106-
/*****************************************************************//**
4107-
Frees a possible InnoDB trx object associated with the current THD.
4108-
@return 0 or error number */
4109-
int
4110-
innobase_close_thd(
4111-
/*===============*/
4112-
THD* thd) /*!< in: handle to the MySQL thread of the user
4113-
whose resources should be free'd */
4114-
{
4115-
trx_t* trx = thd_to_trx(thd);
4116-
4117-
if (trx == NULL) {
4118-
return(0);
4119-
}
4120-
4121-
return(innobase_close_connection(innodb_hton_ptr, thd));
4122-
}
4123-
41244105
/*************************************************************************//**
41254106
** InnoDB database tables
41264107
*****************************************************************************/

storage/innobase/include/api0api.h

+1-11
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*****************************************************************************
22
3-
Copyright (c) 2012, 2014, Oracle and/or its affiliates. All Rights Reserved.
3+
Copyright (c) 2012, 2015, Oracle and/or its affiliates. All Rights Reserved.
44
55
This program is free software; you can redistribute it and/or modify it under
66
the terms of the GNU General Public License as published by the Free Software
@@ -975,16 +975,6 @@ ib_table_truncate(
975975
const char* table_name, /*!< in: table name */
976976
ib_id_u64_t* table_id); /*!< out: new table id */
977977

978-
/*****************************************************************//**
979-
Frees a possible InnoDB trx object associated with the current THD.
980-
@return DB_SUCCESS or error number */
981-
ib_err_t
982-
ib_close_thd(
983-
/*=========*/
984-
void* thd); /*!< in: handle to the MySQL
985-
thread of the user whose resources
986-
should be free'd */
987-
988978
/*****************************************************************//**
989979
Get generic configure status
990980
@return configure status*/

storage/innobase/include/ha_prototypes.h

+1-9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*****************************************************************************
22
3-
Copyright (c) 2006, 2014, Oracle and/or its affiliates. All Rights Reserved.
3+
Copyright (c) 2006, 2015, Oracle and/or its affiliates. All Rights Reserved.
44
55
This program is free software; you can redistribute it and/or modify it under
66
the terms of the GNU General Public License as published by the Free Software
@@ -331,14 +331,6 @@ ulint
331331
innobase_get_lower_case_table_names(void);
332332
/*=====================================*/
333333

334-
/*****************************************************************//**
335-
Frees a possible InnoDB trx object associated with the current THD.
336-
@return 0 or error number */
337-
int
338-
innobase_close_thd(
339-
/*===============*/
340-
THD* thd); /*!< in: MySQL thread handle for
341-
which to close the connection */
342334
/******************************************************************//**
343335
compare two character string case insensitively according to their charset. */
344336
int

0 commit comments

Comments
 (0)