From e53e58d4e49cb2d4d9deacdc9f1979dbaffbfdba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Wed, 20 Sep 2017 14:55:14 +0300 Subject: [PATCH] Add a missing const qualifier --- storage/innobase/data/data0data.cc | 11 ++++------- storage/innobase/include/data0data.h | 10 +++++----- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/storage/innobase/data/data0data.cc b/storage/innobase/data/data0data.cc index d819ad50ed9..7fb0eae611c 100644 --- a/storage/innobase/data/data0data.cc +++ b/storage/innobase/data/data0data.cc @@ -803,14 +803,11 @@ big_rec_t::alloc( return(rec); } -/** Create a deep copy of this object -@param[in] heap the memory heap in which the clone will be - created. - -@return the cloned object. */ +/** Create a deep copy of this object. +@param[in,out] heap memory heap in which the clone will be created +@return the cloned object */ dfield_t* -dfield_t::clone( - mem_heap_t* heap) +dfield_t::clone(mem_heap_t* heap) const { const ulint size = len == UNIV_SQL_NULL ? 0 : len; dfield_t* obj = static_cast( diff --git a/storage/innobase/include/data0data.h b/storage/innobase/include/data0data.h index 87a2228ff2d..b6187d46025 100644 --- a/storage/innobase/include/data0data.h +++ b/storage/innobase/include/data0data.h @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -586,11 +587,10 @@ struct dfield_t{ unsigned len; /*!< data length; UNIV_SQL_NULL if SQL null */ dtype_t type; /*!< type of data */ - /** Create a deep copy of this object - @param[in] heap the memory heap in which the clone will be - created. - @return the cloned object. */ - dfield_t* clone(mem_heap_t* heap); + /** Create a deep copy of this object. + @param[in,out] heap memory heap in which the clone will be created + @return the cloned object */ + dfield_t* clone(mem_heap_t* heap) const; }; /** Structure for an SQL data tuple of fields (logical record) */