mirror of
https://github.com/MariaDB/server.git
synced 2026-04-22 08:15:31 +02:00
Percona-Server-5.6.14-rel62.0.tar.gz
This commit is contained in:
parent
63efc652b5
commit
52c26f7a1f
360 changed files with 133897 additions and 50005 deletions
|
|
@ -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.,
|
||||
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
|
||||
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
@ -54,7 +54,7 @@ void
|
|||
dfield_set_type(
|
||||
/*============*/
|
||||
dfield_t* field, /*!< in: SQL data field */
|
||||
dtype_t* type) /*!< in: pointer to data type struct */
|
||||
const dtype_t* type) /*!< in: pointer to data type struct */
|
||||
{
|
||||
ut_ad(field && type);
|
||||
|
||||
|
|
@ -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.
|
||||
|
|
@ -257,6 +258,23 @@ dfield_datas_are_binary_equal(
|
|||
|| !memcmp(field1->data, field2->data, len)));
|
||||
}
|
||||
|
||||
/*********************************************************************//**
|
||||
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 */
|
||||
|
|
@ -389,6 +407,8 @@ dtuple_create_from_mem(
|
|||
}
|
||||
}
|
||||
#endif
|
||||
UNIV_MEM_ASSERT_W(tuple->fields, n_fields * sizeof *tuple->fields);
|
||||
UNIV_MEM_INVALID(tuple->fields, n_fields * sizeof *tuple->fields);
|
||||
return(tuple);
|
||||
}
|
||||
|
||||
|
|
@ -416,30 +436,6 @@ dtuple_create(
|
|||
|
||||
tuple = dtuple_create_from_mem(buf, buf_size, n_fields);
|
||||
|
||||
#ifdef UNIV_DEBUG
|
||||
UNIV_MEM_INVALID(tuple->fields, n_fields * sizeof *tuple->fields);
|
||||
#endif
|
||||
|
||||
return(tuple);
|
||||
}
|
||||
|
||||
/**********************************************************//**
|
||||
Wrap data fields in a tuple. The default value for number
|
||||
of fields used in record comparisons for this tuple is n_fields.
|
||||
@return data tuple */
|
||||
UNIV_INLINE
|
||||
const dtuple_t*
|
||||
dtuple_from_fields(
|
||||
/*===============*/
|
||||
dtuple_t* tuple, /*!< in: storage for data tuple */
|
||||
const dfield_t* fields, /*!< in: fields */
|
||||
ulint n_fields) /*!< in: number of fields */
|
||||
{
|
||||
tuple->info_bits = 0;
|
||||
tuple->n_fields = tuple->n_fields_cmp = n_fields;
|
||||
tuple->fields = (dfield_t*) fields;
|
||||
ut_d(tuple->magic_n = DATA_TUPLE_MAGIC_N);
|
||||
|
||||
return(tuple);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue