diff options
Diffstat (limited to 'storage/innobase/include/data0data.ic')
-rw-r--r-- | storage/innobase/include/data0data.ic | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/storage/innobase/include/data0data.ic b/storage/innobase/include/data0data.ic index 205fa397987..da50e91e98d 100644 --- a/storage/innobase/include/data0data.ic +++ b/storage/innobase/include/data0data.ic @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1994, 2009, Innobase Oy. All Rights Reserved. +Copyright (c) 1994, 2012, Oracle and/or its affiliates. All Rights Reserved. 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 @@ -11,8 +11,8 @@ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 59 Temple -Place, Suite 330, Boston, MA 02111-1307 USA +this program; if not, write to the Free Software Foundation, Inc., +51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA *****************************************************************************/ @@ -138,7 +138,7 @@ dfield_is_ext( { ut_ad(field); - return(UNIV_UNLIKELY(field->ext)); + return(field->ext); } /*********************************************************************//** @@ -228,6 +228,7 @@ dfield_dup( } } +#ifndef UNIV_HOTBACKUP /*********************************************************************//** Tests if two data fields are equal. If len==0, tests the data length and content for equality. @@ -258,6 +259,23 @@ dfield_datas_are_binary_equal( } /*********************************************************************//** +Tests if dfield data length and content is equal to the given. +@return TRUE if equal */ +UNIV_INLINE +ibool +dfield_data_is_binary_equal( +/*========================*/ + const dfield_t* field, /*!< in: field */ + ulint len, /*!< in: data length or UNIV_SQL_NULL */ + const byte* data) /*!< in: data */ +{ + return(len == dfield_get_len(field) + && (len == UNIV_SQL_NULL + || !memcmp(dfield_get_data(field), data, len))); +} +#endif /* !UNIV_HOTBACKUP */ + +/*********************************************************************//** Gets info bits in a data tuple. @return info bits */ UNIV_INLINE |