mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 02:05:57 +01:00
Merge 10.2 into 10.3
This commit is contained in:
commit
c6b8b05be4
25 changed files with 78 additions and 170 deletions
|
@ -85,6 +85,8 @@ SET(CPACK_RPM_SPEC_MORE_DEFINE "
|
|||
%define restart_flag %{restart_flag_dir}/need-restart
|
||||
|
||||
%{?filter_setup:
|
||||
%filter_provides_in \\\\.\\\\(test\\\\|result\\\\|h\\\\|cc\\\\|c\\\\|inc\\\\|opt\\\\|ic\\\\|cnf\\\\|rdiff\\\\|cpp\\\\)$
|
||||
%filter_requires_in \\\\.\\\\(test\\\\|result\\\\|h\\\\|cc\\\\|c\\\\|inc\\\\|opt\\\\|ic\\\\|cnf\\\\|rdiff\\\\|cpp\\\\)$
|
||||
%filter_from_provides /perl(\\\\(mtr\\\\|My::\\\\)/d
|
||||
%filter_from_requires /\\\\(lib\\\\(ft\\\\|lzma\\\\|tokuportability\\\\)\\\\)\\\\|\\\\(perl(\\\\(.*mtr\\\\|My::\\\\|.*HandlerSocket\\\\|Mysql\\\\)\\\\)/d
|
||||
%filter_setup
|
||||
|
|
|
@ -11,3 +11,30 @@ flush privileges;
|
|||
drop role dwr_foo;
|
||||
drop role dwr_bar;
|
||||
drop role dwr_qux_dev;
|
||||
use test;
|
||||
create table db_copy as select * from mysql.db;
|
||||
delete from mysql.db;
|
||||
flush privileges;
|
||||
create user u1@localhost;
|
||||
create role r1;
|
||||
create role r2;
|
||||
grant r1 to u1@localhost;
|
||||
grant select on test.* to r2;
|
||||
grant select on m_.* to r2;
|
||||
grant r2 to r1;
|
||||
show grants for u1@localhost;
|
||||
Grants for u1@localhost
|
||||
GRANT r1 TO 'u1'@'localhost'
|
||||
GRANT USAGE ON *.* TO 'u1'@'localhost'
|
||||
show grants for r1;
|
||||
Grants for r1
|
||||
GRANT r2 TO 'r1'
|
||||
GRANT USAGE ON *.* TO 'r1'
|
||||
GRANT USAGE ON *.* TO 'r2'
|
||||
GRANT SELECT ON `test`.* TO 'r2'
|
||||
GRANT SELECT ON `m_`.* TO 'r2'
|
||||
drop user u1@localhost;
|
||||
drop role r1, r2;
|
||||
insert mysql.db select * from db_copy;
|
||||
flush privileges;
|
||||
drop table db_copy;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
source include/not_embedded.inc;
|
||||
#
|
||||
# MDEV-17898 FLUSH PRIVILEGES crashes server with segfault
|
||||
#
|
||||
|
@ -9,3 +10,27 @@ flush privileges;
|
|||
drop role dwr_foo;
|
||||
drop role dwr_bar;
|
||||
drop role dwr_qux_dev;
|
||||
use test;
|
||||
|
||||
#
|
||||
# MDEV-18298 Crashes server with segfault during role grants
|
||||
#
|
||||
create table db_copy as select * from mysql.db;
|
||||
delete from mysql.db;
|
||||
flush privileges;
|
||||
|
||||
create user u1@localhost;
|
||||
create role r1;
|
||||
create role r2;
|
||||
grant r1 to u1@localhost;
|
||||
grant select on test.* to r2;
|
||||
grant select on m_.* to r2;
|
||||
grant r2 to r1;
|
||||
show grants for u1@localhost;
|
||||
show grants for r1;
|
||||
drop user u1@localhost;
|
||||
drop role r1, r2;
|
||||
|
||||
insert mysql.db select * from db_copy;
|
||||
flush privileges;
|
||||
drop table db_copy;
|
||||
|
|
|
@ -40,7 +40,7 @@ if(GSSAPI_LIBS AND GSSAPI_FLAVOR)
|
|||
else(GSSAPI_LIBS AND GSSAPI_FLAVOR)
|
||||
|
||||
find_program(KRB5_CONFIG NAMES krb5-config heimdal-krb5-config PATHS
|
||||
/opt/local/bin
|
||||
/opt/local/bin /usr/lib/mit/bin
|
||||
ONLY_CMAKE_FIND_ROOT_PATH # this is required when cross compiling with cmake 2.6 and ignored with cmake 2.4, Alex
|
||||
)
|
||||
mark_as_advanced(KRB5_CONFIG)
|
||||
|
|
|
@ -5879,7 +5879,7 @@ static bool merge_role_db_privileges(ACL_ROLE *grantee, const char *dbname,
|
|||
ulong access= 0, update_flags= 0;
|
||||
for (int *p= dbs.front(); p <= dbs.back(); p++)
|
||||
{
|
||||
if (first<0 || (!dbname && strcmp(acl_dbs.at(*p).db, acl_dbs.at(*p-1).db)))
|
||||
if (first<0 || (!dbname && strcmp(acl_dbs.at(p[0]).db, acl_dbs.at(p[-1]).db)))
|
||||
{ // new db name series
|
||||
update_flags|= update_role_db(merged, first, access, grantee->user.str);
|
||||
merged= -1;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 2006, 2016, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2018, MariaDB Corporation.
|
||||
Copyright (c) 2018, 2019, 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
|
||||
|
@ -493,7 +493,6 @@ buf_buddy_alloc_low(
|
|||
{
|
||||
buf_block_t* block;
|
||||
|
||||
ut_ad(lru);
|
||||
ut_ad(buf_pool_mutex_own(buf_pool));
|
||||
ut_ad(!mutex_own(&buf_pool->zip_mutex));
|
||||
ut_ad(i >= buf_buddy_get_slot(UNIV_ZIP_SIZE_MIN));
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2017, 2018, MariaDB Corporation.
|
||||
Copyright (c) 2017, 2019, 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
|
||||
|
@ -117,8 +117,6 @@ dtuple_set_n_fields(
|
|||
dtuple_t* tuple, /*!< in: tuple */
|
||||
ulint n_fields) /*!< in: number of fields */
|
||||
{
|
||||
ut_ad(tuple);
|
||||
|
||||
tuple->n_fields = n_fields;
|
||||
tuple->n_fields_cmp = n_fields;
|
||||
}
|
||||
|
|
|
@ -946,7 +946,6 @@ dict_index_get_nth_field_pos(
|
|||
ulint n_fields;
|
||||
ulint pos;
|
||||
|
||||
ut_ad(index);
|
||||
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
|
||||
|
||||
field2 = dict_index_get_nth_field(index2, n);
|
||||
|
@ -1055,8 +1054,6 @@ dict_table_col_in_clustered_key(
|
|||
ulint pos;
|
||||
ulint n_fields;
|
||||
|
||||
ut_ad(table);
|
||||
|
||||
col = dict_table_get_nth_col(table, n);
|
||||
|
||||
index = dict_table_get_first_index(table);
|
||||
|
@ -1226,8 +1223,7 @@ dict_table_add_system_columns(
|
|||
dict_table_t* table, /*!< in/out: table */
|
||||
mem_heap_t* heap) /*!< in: temporary heap */
|
||||
{
|
||||
ut_ad(table);
|
||||
ut_ad(table->n_def == (table->n_cols - DATA_N_SYS_COLS));
|
||||
ut_ad(table->n_def == table->n_cols - DATA_N_SYS_COLS);
|
||||
ut_ad(table->magic_n == DICT_TABLE_MAGIC_N);
|
||||
ut_ad(!table->cached);
|
||||
|
||||
|
@ -1952,7 +1948,6 @@ dict_table_change_id_in_cache(
|
|||
dict_table_t* table, /*!< in/out: table object already in cache */
|
||||
table_id_t new_id) /*!< in: new id to set */
|
||||
{
|
||||
ut_ad(table);
|
||||
ut_ad(mutex_own(&dict_sys->mutex));
|
||||
ut_ad(table->magic_n == DICT_TABLE_MAGIC_N);
|
||||
|
||||
|
@ -1979,7 +1974,6 @@ dict_table_remove_from_cache_low(
|
|||
dict_foreign_t* foreign;
|
||||
dict_index_t* index;
|
||||
|
||||
ut_ad(table);
|
||||
ut_ad(dict_lru_validate());
|
||||
ut_a(table->get_ref_count() == 0);
|
||||
ut_a(table->n_rec_locks == 0);
|
||||
|
@ -2334,7 +2328,6 @@ dict_index_add_to_cache(
|
|||
ulint n_ord;
|
||||
ulint i;
|
||||
|
||||
ut_ad(index);
|
||||
ut_ad(mutex_own(&dict_sys->mutex));
|
||||
ut_ad(index->n_def == index->n_fields);
|
||||
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
|
||||
|
@ -2973,7 +2966,6 @@ dict_index_build_internal_clust(
|
|||
/* Add to new_index non-system columns of table not yet included
|
||||
there */
|
||||
for (i = 0; i + DATA_N_SYS_COLS < ulint(table->n_cols); i++) {
|
||||
|
||||
dict_col_t* col = dict_table_get_nth_col(table, i);
|
||||
ut_ad(col->mtype != DATA_SYS);
|
||||
|
||||
|
@ -5197,7 +5189,6 @@ dict_foreign_parse_drop_constraints(
|
|||
const char* id;
|
||||
CHARSET_INFO* cs;
|
||||
|
||||
ut_a(trx);
|
||||
ut_a(trx->mysql_thd);
|
||||
|
||||
cs = innobase_get_charset(trx->mysql_thd);
|
||||
|
@ -5363,9 +5354,8 @@ dict_index_check_search_tuple(
|
|||
const dict_index_t* index, /*!< in: index tree */
|
||||
const dtuple_t* tuple) /*!< in: tuple used in a search */
|
||||
{
|
||||
ut_a(index);
|
||||
ut_a(dtuple_get_n_fields_cmp(tuple)
|
||||
<= dict_index_get_n_unique_in_tree(index));
|
||||
ut_ad(dtuple_get_n_fields_cmp(tuple)
|
||||
<= dict_index_get_n_unique_in_tree(index));
|
||||
return(TRUE);
|
||||
}
|
||||
#endif /* UNIV_DEBUG */
|
||||
|
@ -6900,8 +6890,6 @@ dict_index_zip_success(
|
|||
/*===================*/
|
||||
dict_index_t* index) /*!< in/out: index to be updated. */
|
||||
{
|
||||
ut_ad(index);
|
||||
|
||||
ulint zip_threshold = zip_failure_threshold_pct;
|
||||
if (!zip_threshold) {
|
||||
/* Disabled by user. */
|
||||
|
@ -6922,8 +6910,6 @@ dict_index_zip_failure(
|
|||
/*===================*/
|
||||
dict_index_t* index) /*!< in/out: index to be updated. */
|
||||
{
|
||||
ut_ad(index);
|
||||
|
||||
ulint zip_threshold = zip_failure_threshold_pct;
|
||||
if (!zip_threshold) {
|
||||
/* Disabled by user. */
|
||||
|
@ -6949,8 +6935,6 @@ dict_index_zip_pad_optimal_page_size(
|
|||
ulint min_sz;
|
||||
ulint sz;
|
||||
|
||||
ut_ad(index);
|
||||
|
||||
if (!zip_failure_threshold_pct) {
|
||||
/* Disabled by user. */
|
||||
return(srv_page_size);
|
||||
|
|
|
@ -305,7 +305,6 @@ dict_mem_table_add_col(
|
|||
dict_col_t* col;
|
||||
ulint i;
|
||||
|
||||
ut_ad(table);
|
||||
ut_ad(table->magic_n == DICT_TABLE_MAGIC_N);
|
||||
ut_ad(!heap == !name);
|
||||
|
||||
|
|
|
@ -2439,8 +2439,8 @@ name_ok:
|
|||
index
|
||||
@param[in] altered_table MySQL table that is being altered
|
||||
@param[in] key_part MySQL key definition
|
||||
@param[out] index_field index field defition for key_part */
|
||||
static MY_ATTRIBUTE((nonnull(2,3)))
|
||||
@param[out] index_field index field definition for key_part */
|
||||
static MY_ATTRIBUTE((nonnull))
|
||||
void
|
||||
innobase_create_index_field_def(
|
||||
bool new_clustered,
|
||||
|
@ -2455,10 +2455,6 @@ innobase_create_index_field_def(
|
|||
|
||||
DBUG_ENTER("innobase_create_index_field_def");
|
||||
|
||||
ut_ad(key_part);
|
||||
ut_ad(index_field);
|
||||
ut_ad(altered_table);
|
||||
|
||||
field = new_clustered
|
||||
? altered_table->field[key_part->fieldnr]
|
||||
: key_part->field;
|
||||
|
@ -2520,8 +2516,6 @@ innobase_create_index_def(
|
|||
DBUG_ENTER("innobase_create_index_def");
|
||||
DBUG_ASSERT(!key_clustered || new_clustered);
|
||||
|
||||
ut_ad(altered_table);
|
||||
|
||||
index->fields = static_cast<index_field_t*>(
|
||||
mem_heap_alloc(heap, n_fields * sizeof *index->fields));
|
||||
|
||||
|
@ -7665,7 +7659,6 @@ innobase_rename_columns_try(
|
|||
uint i = 0;
|
||||
ulint num_v = 0;
|
||||
|
||||
DBUG_ASSERT(ctx);
|
||||
DBUG_ASSERT(ha_alter_info->handler_flags
|
||||
& ALTER_COLUMN_NAME);
|
||||
|
||||
|
@ -8060,7 +8053,6 @@ innobase_update_foreign_try(
|
|||
ulint i;
|
||||
|
||||
DBUG_ENTER("innobase_update_foreign_try");
|
||||
DBUG_ASSERT(ctx);
|
||||
|
||||
foreign_id = dict_table_get_highest_foreign_id(ctx->new_table);
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 1994, 2015, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2017, MariaDB Corporation.
|
||||
Copyright (c) 2017, 2019, 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
|
||||
|
@ -43,8 +43,6 @@ dfield_get_type(
|
|||
/*============*/
|
||||
const dfield_t* field) /*!< in: SQL data field */
|
||||
{
|
||||
ut_ad(field);
|
||||
|
||||
return((dtype_t*) &(field->type));
|
||||
}
|
||||
#endif /* UNIV_DEBUG */
|
||||
|
@ -74,7 +72,6 @@ dfield_get_data(
|
|||
/*============*/
|
||||
const dfield_t* field) /*!< in: field */
|
||||
{
|
||||
ut_ad(field);
|
||||
ut_ad((field->len == UNIV_SQL_NULL)
|
||||
|| (field->data != &data_error));
|
||||
|
||||
|
@ -91,7 +88,6 @@ dfield_get_len(
|
|||
/*===========*/
|
||||
const dfield_t* field) /*!< in: field */
|
||||
{
|
||||
ut_ad(field);
|
||||
ut_ad((field->len == UNIV_SQL_NULL)
|
||||
|| (field->data != &data_error));
|
||||
ut_ad(field->len != UNIV_SQL_DEFAULT);
|
||||
|
@ -108,7 +104,6 @@ dfield_set_len(
|
|||
dfield_t* field, /*!< in: field */
|
||||
ulint len) /*!< in: length or UNIV_SQL_NULL */
|
||||
{
|
||||
ut_ad(field);
|
||||
ut_ad(len != UNIV_SQL_DEFAULT);
|
||||
#ifdef UNIV_VALGRIND_DEBUG
|
||||
if (len != UNIV_SQL_NULL) UNIV_MEM_ASSERT_RW(field->data, len);
|
||||
|
@ -127,8 +122,6 @@ dfield_is_null(
|
|||
/*===========*/
|
||||
const dfield_t* field) /*!< in: field */
|
||||
{
|
||||
ut_ad(field);
|
||||
|
||||
return(field->len == UNIV_SQL_NULL);
|
||||
}
|
||||
|
||||
|
@ -141,9 +134,7 @@ dfield_is_ext(
|
|||
/*==========*/
|
||||
const dfield_t* field) /*!< in: field */
|
||||
{
|
||||
ut_ad(field);
|
||||
ut_ad(!field->ext || field->len >= BTR_EXTERN_FIELD_REF_SIZE);
|
||||
|
||||
return(field->ext);
|
||||
}
|
||||
|
||||
|
@ -155,8 +146,6 @@ dfield_set_ext(
|
|||
/*===========*/
|
||||
dfield_t* field) /*!< in/out: field */
|
||||
{
|
||||
ut_ad(field);
|
||||
|
||||
field->ext = 1;
|
||||
}
|
||||
|
||||
|
@ -198,8 +187,6 @@ dfield_set_data(
|
|||
const void* data, /*!< in: data */
|
||||
ulint len) /*!< in: length or UNIV_SQL_NULL */
|
||||
{
|
||||
ut_ad(field);
|
||||
|
||||
#ifdef UNIV_VALGRIND_DEBUG
|
||||
if (len != UNIV_SQL_NULL) UNIV_MEM_ASSERT_RW(data, len);
|
||||
#endif /* UNIV_VALGRIND_DEBUG */
|
||||
|
@ -217,8 +204,6 @@ dfield_write_mbr(
|
|||
dfield_t* field, /*!< in: field */
|
||||
const double* mbr) /*!< in: data */
|
||||
{
|
||||
ut_ad(field);
|
||||
|
||||
#ifdef UNIV_VALGRIND_DEBUG
|
||||
if (len != UNIV_SQL_NULL) UNIV_MEM_ASSERT_RW(data, len);
|
||||
#endif /* UNIV_VALGRIND_DEBUG */
|
||||
|
@ -343,8 +328,6 @@ dtuple_get_info_bits(
|
|||
/*=================*/
|
||||
const dtuple_t* tuple) /*!< in: tuple */
|
||||
{
|
||||
ut_ad(tuple);
|
||||
|
||||
return(tuple->info_bits);
|
||||
}
|
||||
|
||||
|
@ -357,8 +340,6 @@ dtuple_set_info_bits(
|
|||
dtuple_t* tuple, /*!< in: tuple */
|
||||
ulint info_bits) /*!< in: info bits */
|
||||
{
|
||||
ut_ad(tuple);
|
||||
|
||||
tuple->info_bits = info_bits;
|
||||
}
|
||||
|
||||
|
@ -371,8 +352,6 @@ dtuple_get_n_fields_cmp(
|
|||
/*====================*/
|
||||
const dtuple_t* tuple) /*!< in: tuple */
|
||||
{
|
||||
ut_ad(tuple);
|
||||
|
||||
return(tuple->n_fields_cmp);
|
||||
}
|
||||
|
||||
|
@ -386,9 +365,7 @@ dtuple_set_n_fields_cmp(
|
|||
ulint n_fields_cmp) /*!< in: number of fields used in
|
||||
comparisons in rem0cmp.* */
|
||||
{
|
||||
ut_ad(tuple);
|
||||
ut_ad(n_fields_cmp <= tuple->n_fields);
|
||||
|
||||
tuple->n_fields_cmp = n_fields_cmp;
|
||||
}
|
||||
|
||||
|
@ -401,8 +378,6 @@ dtuple_get_n_fields(
|
|||
/*================*/
|
||||
const dtuple_t* tuple) /*!< in: tuple */
|
||||
{
|
||||
ut_ad(tuple);
|
||||
|
||||
return(tuple->n_fields);
|
||||
}
|
||||
|
||||
|
@ -652,7 +627,6 @@ dtuple_get_data_size(
|
|||
ulint i;
|
||||
ulint sum = 0;
|
||||
|
||||
ut_ad(tuple);
|
||||
ut_ad(dtuple_check_typed(tuple));
|
||||
ut_ad(tuple->magic_n == DATA_TUPLE_MAGIC_N);
|
||||
|
||||
|
@ -686,7 +660,6 @@ dtuple_get_n_ext(
|
|||
ulint n_fields = tuple->n_fields;
|
||||
ulint i;
|
||||
|
||||
ut_ad(tuple);
|
||||
ut_ad(dtuple_check_typed(tuple));
|
||||
ut_ad(tuple->magic_n == DATA_TUPLE_MAGIC_N);
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2017, 2018, MariaDB Corporation.
|
||||
Copyright (c) 2017, 2019, 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
|
||||
|
|
|
@ -860,12 +860,11 @@ dict_table_get_sys_col(
|
|||
ulint sys) /*!< in: DATA_ROW_ID, ... */
|
||||
MY_ATTRIBUTE((nonnull, warn_unused_result));
|
||||
#else /* UNIV_DEBUG */
|
||||
#define dict_table_get_nth_col(table, pos) \
|
||||
(&(table)->cols[pos])
|
||||
#define dict_table_get_sys_col(table, sys) \
|
||||
(&(table)->cols[(table)->n_cols + (sys) - DATA_N_SYS_COLS])
|
||||
#define dict_table_get_nth_col(table, pos) &(table)->cols[pos]
|
||||
#define dict_table_get_sys_col(table, sys) \
|
||||
&(table)->cols[(table)->n_cols + (sys) - DATA_N_SYS_COLS]
|
||||
/* Get nth virtual columns */
|
||||
#define dict_table_get_nth_v_col(table, pos) (&(table)->v_cols[pos])
|
||||
#define dict_table_get_nth_v_col(table, pos) &(table)->v_cols[pos]
|
||||
#endif /* UNIV_DEBUG */
|
||||
/** Wrapper function.
|
||||
@see dict_col_t::name()
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 1996, 2017, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2013, 2018, MariaDB Corporation.
|
||||
Copyright (c) 2013, 2019, 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
|
||||
|
@ -78,9 +78,6 @@ dict_col_type_assert_equal(
|
|||
const dict_col_t* col, /*!< in: column */
|
||||
const dtype_t* type) /*!< in: data type */
|
||||
{
|
||||
ut_ad(col);
|
||||
ut_ad(type);
|
||||
|
||||
ut_ad(col->mtype == type->mtype);
|
||||
ut_ad(col->prtype == type->prtype);
|
||||
//ut_ad(col->len == type->len);
|
||||
|
@ -150,8 +147,6 @@ dict_col_get_no(
|
|||
/*============*/
|
||||
const dict_col_t* col) /*!< in: column */
|
||||
{
|
||||
ut_ad(col);
|
||||
|
||||
return(col->ind);
|
||||
}
|
||||
|
||||
|
@ -166,8 +161,6 @@ dict_col_get_clust_pos(
|
|||
{
|
||||
ulint i;
|
||||
|
||||
ut_ad(col);
|
||||
ut_ad(clust_index);
|
||||
ut_ad(dict_index_is_clust(clust_index));
|
||||
|
||||
for (i = 0; i < clust_index->n_def; i++) {
|
||||
|
@ -193,8 +186,6 @@ dict_col_get_index_pos(
|
|||
{
|
||||
ulint i;
|
||||
|
||||
ut_ad(col);
|
||||
|
||||
for (i = 0; i < index->n_def; i++) {
|
||||
const dict_field_t* field = &index->fields[i];
|
||||
|
||||
|
@ -216,7 +207,6 @@ dict_table_get_first_index(
|
|||
/*=======================*/
|
||||
const dict_table_t* table) /*!< in: table */
|
||||
{
|
||||
ut_ad(table);
|
||||
ut_ad(table->magic_n == DICT_TABLE_MAGIC_N);
|
||||
|
||||
return(UT_LIST_GET_FIRST(((dict_table_t*) table)->indexes));
|
||||
|
@ -231,9 +221,7 @@ dict_table_get_last_index(
|
|||
/*=======================*/
|
||||
const dict_table_t* table) /*!< in: table */
|
||||
{
|
||||
ut_ad(table);
|
||||
ut_ad(table->magic_n == DICT_TABLE_MAGIC_N);
|
||||
|
||||
return(UT_LIST_GET_LAST((const_cast<dict_table_t*>(table))
|
||||
->indexes));
|
||||
}
|
||||
|
@ -247,9 +235,7 @@ dict_table_get_next_index(
|
|||
/*======================*/
|
||||
const dict_index_t* index) /*!< in: index */
|
||||
{
|
||||
ut_ad(index);
|
||||
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
|
||||
|
||||
return(UT_LIST_GET_NEXT(indexes, (dict_index_t*) index));
|
||||
}
|
||||
#endif /* UNIV_DEBUG */
|
||||
|
@ -289,7 +275,6 @@ dict_index_is_unique(
|
|||
const dict_index_t* index) /*!< in: index */
|
||||
{
|
||||
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
|
||||
|
||||
return(index->type & DICT_UNIQUE);
|
||||
}
|
||||
|
||||
|
@ -302,9 +287,7 @@ dict_index_is_spatial(
|
|||
/*==================*/
|
||||
const dict_index_t* index) /*!< in: index */
|
||||
{
|
||||
ut_ad(index);
|
||||
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
|
||||
|
||||
return ulint(UNIV_EXPECT(index->type & DICT_SPATIAL, 0));
|
||||
}
|
||||
|
||||
|
@ -317,9 +300,7 @@ dict_index_is_ibuf(
|
|||
/*===============*/
|
||||
const dict_index_t* index) /*!< in: index */
|
||||
{
|
||||
ut_ad(index);
|
||||
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
|
||||
|
||||
return(index->type & DICT_IBUF);
|
||||
}
|
||||
|
||||
|
@ -333,7 +314,6 @@ dict_index_is_sec_or_ibuf(
|
|||
const dict_index_t* index) /*!< in: index */
|
||||
{
|
||||
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
|
||||
|
||||
return((index->type & (DICT_CLUSTERED | DICT_IBUF)) != DICT_CLUSTERED);
|
||||
}
|
||||
|
||||
|
@ -366,7 +346,6 @@ dict_table_get_n_cols(
|
|||
const dict_table_t* table) /*!< in: table */
|
||||
{
|
||||
ut_ad(table->magic_n == DICT_TABLE_MAGIC_N);
|
||||
|
||||
return(table->n_cols);
|
||||
}
|
||||
|
||||
|
@ -464,7 +443,6 @@ dict_table_get_nth_col(
|
|||
const dict_table_t* table, /*!< in: table */
|
||||
ulint pos) /*!< in: position of column */
|
||||
{
|
||||
ut_ad(table);
|
||||
ut_ad(pos < table->n_def);
|
||||
ut_ad(table->magic_n == DICT_TABLE_MAGIC_N);
|
||||
|
||||
|
@ -518,10 +496,8 @@ dict_table_get_sys_col_no(
|
|||
const dict_table_t* table, /*!< in: table */
|
||||
ulint sys) /*!< in: DATA_ROW_ID, ... */
|
||||
{
|
||||
ut_ad(table);
|
||||
ut_ad(sys < DATA_N_SYS_COLS);
|
||||
ut_ad(table->magic_n == DICT_TABLE_MAGIC_N);
|
||||
|
||||
return unsigned(table->n_cols) + (sys - DATA_N_SYS_COLS);
|
||||
}
|
||||
|
||||
|
@ -547,8 +523,6 @@ dict_table_has_fts_index(
|
|||
/* out: TRUE if table has an FTS index */
|
||||
dict_table_t* table) /* in: table */
|
||||
{
|
||||
ut_ad(table);
|
||||
|
||||
return(DICT_TF2_FLAG_IS_SET(table, DICT_TF2_FTS));
|
||||
}
|
||||
|
||||
|
@ -839,7 +813,6 @@ dict_table_x_lock_indexes(
|
|||
{
|
||||
dict_index_t* index;
|
||||
|
||||
ut_a(table);
|
||||
ut_ad(mutex_own(&dict_sys->mutex));
|
||||
|
||||
/* Loop through each index of the table and lock them */
|
||||
|
@ -881,7 +854,6 @@ dict_table_x_unlock_indexes(
|
|||
{
|
||||
dict_index_t* index;
|
||||
|
||||
ut_a(table);
|
||||
ut_ad(mutex_own(&dict_sys->mutex));
|
||||
|
||||
for (index = dict_table_get_first_index(table);
|
||||
|
@ -903,9 +875,7 @@ dict_index_get_n_fields(
|
|||
representation of index (in
|
||||
the dictionary cache) */
|
||||
{
|
||||
ut_ad(index);
|
||||
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
|
||||
|
||||
return(index->n_fields);
|
||||
}
|
||||
|
||||
|
@ -922,10 +892,8 @@ dict_index_get_n_unique(
|
|||
const dict_index_t* index) /*!< in: an internal representation
|
||||
of index (in the dictionary cache) */
|
||||
{
|
||||
ut_ad(index);
|
||||
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
|
||||
ut_ad(index->cached);
|
||||
|
||||
return(index->n_uniq);
|
||||
}
|
||||
|
||||
|
@ -941,7 +909,6 @@ dict_index_get_n_unique_in_tree(
|
|||
const dict_index_t* index) /*!< in: an internal representation
|
||||
of index (in the dictionary cache) */
|
||||
{
|
||||
ut_ad(index);
|
||||
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
|
||||
ut_ad(index->cached);
|
||||
|
||||
|
@ -1005,7 +972,6 @@ dict_index_get_nth_field(
|
|||
const dict_index_t* index, /*!< in: index */
|
||||
ulint pos) /*!< in: position of field */
|
||||
{
|
||||
ut_ad(index);
|
||||
ut_ad(pos < index->n_def);
|
||||
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
|
||||
|
||||
|
@ -1023,7 +989,6 @@ dict_index_get_sys_col_pos(
|
|||
const dict_index_t* index, /*!< in: index */
|
||||
ulint type) /*!< in: DATA_ROW_ID, ... */
|
||||
{
|
||||
ut_ad(index);
|
||||
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
|
||||
ut_ad(!dict_index_is_ibuf(index));
|
||||
|
||||
|
@ -1047,8 +1012,6 @@ dict_field_get_col(
|
|||
/*===============*/
|
||||
const dict_field_t* field) /*!< in: index field */
|
||||
{
|
||||
ut_ad(field);
|
||||
|
||||
return(field->col);
|
||||
}
|
||||
|
||||
|
@ -1123,7 +1086,6 @@ dict_index_get_page(
|
|||
/*================*/
|
||||
const dict_index_t* index) /*!< in: index */
|
||||
{
|
||||
ut_ad(index);
|
||||
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
|
||||
|
||||
return(index->page);
|
||||
|
@ -1138,7 +1100,6 @@ dict_index_get_lock(
|
|||
/*================*/
|
||||
dict_index_t* index) /*!< in: index */
|
||||
{
|
||||
ut_ad(index);
|
||||
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
|
||||
|
||||
return(&(index->lock));
|
||||
|
@ -1363,9 +1324,7 @@ dict_table_is_corrupted(
|
|||
/*====================*/
|
||||
const dict_table_t* table) /*!< in: table */
|
||||
{
|
||||
ut_ad(table);
|
||||
ut_ad(table->magic_n == DICT_TABLE_MAGIC_N);
|
||||
|
||||
return(table->corrupted);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 1994, 2015, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2017, 2018, MariaDB Corporation.
|
||||
Copyright (c) 2017, 2019, 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
|
||||
|
@ -355,7 +355,6 @@ rec_set_next_offs_old(
|
|||
rec_t* rec, /*!< in: old-style physical record */
|
||||
ulint next) /*!< in: offset of the next record */
|
||||
{
|
||||
ut_ad(rec);
|
||||
ut_ad(srv_page_size > next);
|
||||
compile_time_assert(REC_NEXT_MASK == 0xFFFFUL);
|
||||
compile_time_assert(REC_NEXT_SHIFT == 0);
|
||||
|
@ -374,7 +373,6 @@ rec_set_next_offs_new(
|
|||
{
|
||||
ulint field_value;
|
||||
|
||||
ut_ad(rec);
|
||||
ut_ad(srv_page_size > next);
|
||||
|
||||
if (!next) {
|
||||
|
@ -874,7 +872,6 @@ rec_offs_set_n_alloc(
|
|||
must be allocated */
|
||||
ulint n_alloc) /*!< in: number of elements */
|
||||
{
|
||||
ut_ad(offsets);
|
||||
ut_ad(n_alloc > REC_OFFS_HEADER_SIZE);
|
||||
UNIV_MEM_ALLOC(offsets, n_alloc * sizeof *offsets);
|
||||
offsets[0] = n_alloc;
|
||||
|
@ -896,7 +893,6 @@ rec_get_nth_field_offs(
|
|||
ulint offs;
|
||||
ulint length;
|
||||
ut_ad(n < rec_offs_n_fields(offsets));
|
||||
ut_ad(len);
|
||||
|
||||
if (n == 0) {
|
||||
offs = 0;
|
||||
|
@ -1188,7 +1184,6 @@ rec_set_nth_field(
|
|||
byte* data2;
|
||||
ulint len2;
|
||||
|
||||
ut_ad(rec);
|
||||
ut_ad(rec_offs_validate(rec, NULL, offsets));
|
||||
ut_ad(!rec_offs_nth_default(offsets, n));
|
||||
|
||||
|
@ -1392,8 +1387,6 @@ rec_get_converted_size(
|
|||
ulint data_size;
|
||||
ulint extra_size;
|
||||
|
||||
ut_ad(index);
|
||||
ut_ad(dtuple);
|
||||
ut_ad(dtuple_check_typed(dtuple));
|
||||
#ifdef UNIV_DEBUG
|
||||
if (dict_index_is_ibuf(index)) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2017, 2018, MariaDB Corporation.
|
||||
Copyright (c) 2017, 2019, 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
|
||||
|
@ -781,10 +781,6 @@ rec_get_offsets_func(
|
|||
ulint n;
|
||||
ulint size;
|
||||
|
||||
ut_ad(rec);
|
||||
ut_ad(index);
|
||||
ut_ad(heap);
|
||||
|
||||
if (dict_table_is_comp(index->table)) {
|
||||
switch (UNIV_EXPECT(rec_get_status(rec),
|
||||
REC_STATUS_ORDINARY)) {
|
||||
|
@ -895,9 +891,6 @@ rec_get_offsets_reverse(
|
|||
ulint null_mask;
|
||||
ulint n_node_ptr_field;
|
||||
|
||||
ut_ad(extra);
|
||||
ut_ad(index);
|
||||
ut_ad(offsets);
|
||||
ut_ad(dict_table_is_comp(index->table));
|
||||
ut_ad(!index->is_instant());
|
||||
|
||||
|
@ -1006,8 +999,6 @@ rec_get_nth_field_offs_old(
|
|||
ulint os;
|
||||
ulint next_os;
|
||||
|
||||
ut_ad(len);
|
||||
ut_a(rec);
|
||||
ut_a(n < rec_get_n_fields_old(rec));
|
||||
|
||||
if (rec_get_1byte_offs_flag(rec)) {
|
||||
|
@ -2060,7 +2051,6 @@ rec_validate(
|
|||
ulint len_sum = 0;
|
||||
ulint i;
|
||||
|
||||
ut_a(rec);
|
||||
n_fields = rec_offs_n_fields(offsets);
|
||||
|
||||
if ((n_fields == 0) || (n_fields > REC_MAX_N_FIELDS)) {
|
||||
|
@ -2118,8 +2108,6 @@ rec_print_old(
|
|||
ulint n;
|
||||
ulint i;
|
||||
|
||||
ut_ad(rec);
|
||||
|
||||
n = rec_get_n_fields_old(rec);
|
||||
|
||||
fprintf(file, "PHYSICAL RECORD: n_fields " ULINTPF ";"
|
||||
|
@ -2293,8 +2281,6 @@ rec_print_mbr_rec(
|
|||
const rec_t* rec, /*!< in: physical record */
|
||||
const ulint* offsets)/*!< in: array returned by rec_get_offsets() */
|
||||
{
|
||||
ut_ad(rec);
|
||||
ut_ad(offsets);
|
||||
ut_ad(rec_offs_validate(rec, NULL, offsets));
|
||||
ut_ad(!rec_offs_any_default(offsets));
|
||||
|
||||
|
@ -2363,8 +2349,6 @@ rec_print_new(
|
|||
const rec_t* rec, /*!< in: physical record */
|
||||
const ulint* offsets)/*!< in: array returned by rec_get_offsets() */
|
||||
{
|
||||
ut_ad(rec);
|
||||
ut_ad(offsets);
|
||||
ut_ad(rec_offs_validate(rec, NULL, offsets));
|
||||
|
||||
#ifdef UNIV_DEBUG
|
||||
|
@ -2398,8 +2382,6 @@ rec_print(
|
|||
const rec_t* rec, /*!< in: physical record */
|
||||
const dict_index_t* index) /*!< in: record descriptor */
|
||||
{
|
||||
ut_ad(index);
|
||||
|
||||
if (!dict_table_is_comp(index->table)) {
|
||||
rec_print_old(file, rec);
|
||||
return;
|
||||
|
|
|
@ -1574,9 +1574,6 @@ row_fts_merge_insert(
|
|||
dict_index_t* aux_index;
|
||||
trx_t* trx;
|
||||
|
||||
ut_ad(index);
|
||||
ut_ad(table);
|
||||
|
||||
/* We use the insert query graph as the dummy graph
|
||||
needed in the row module call */
|
||||
|
||||
|
|
|
@ -494,8 +494,6 @@ row_ins_cascade_calc_update_vec(
|
|||
doc_id_t new_doc_id = FTS_NULL_DOC_ID;
|
||||
ulint prefix_col;
|
||||
|
||||
ut_a(node);
|
||||
ut_a(foreign);
|
||||
ut_a(cascade);
|
||||
ut_a(table);
|
||||
ut_a(index);
|
||||
|
@ -1092,10 +1090,6 @@ row_ins_foreign_check_on_constraint(
|
|||
doc_id_t doc_id = FTS_NULL_DOC_ID;
|
||||
|
||||
DBUG_ENTER("row_ins_foreign_check_on_constraint");
|
||||
ut_a(thr);
|
||||
ut_a(foreign);
|
||||
ut_a(pcur);
|
||||
ut_a(mtr);
|
||||
|
||||
trx = thr_get_trx(thr);
|
||||
|
||||
|
|
|
@ -4208,7 +4208,6 @@ row_merge_rename_index_to_add(
|
|||
"WHERE TABLE_ID = :tableid AND ID = :indexid;\n"
|
||||
"END;\n";
|
||||
|
||||
ut_ad(trx);
|
||||
ut_a(trx->dict_operation_lock_mode == RW_X_LATCH);
|
||||
ut_ad(trx_get_dict_operation(trx) == TRX_DICT_OP_INDEX);
|
||||
|
||||
|
@ -4262,7 +4261,6 @@ row_merge_rename_index_to_drop(
|
|||
"WHERE TABLE_ID = :tableid AND ID = :indexid;\n"
|
||||
"END;\n";
|
||||
|
||||
ut_ad(trx);
|
||||
ut_a(trx->dict_operation_lock_mode == RW_X_LATCH);
|
||||
ut_ad(trx_get_dict_operation(trx) == TRX_DICT_OP_INDEX);
|
||||
|
||||
|
|
|
@ -3164,7 +3164,6 @@ row_mysql_lock_table(
|
|||
dberr_t err;
|
||||
sel_node_t* node;
|
||||
|
||||
ut_ad(trx);
|
||||
ut_ad(mode == LOCK_X || mode == LOCK_S);
|
||||
|
||||
heap = mem_heap_create(512);
|
||||
|
|
|
@ -1294,8 +1294,6 @@ row_purge_step(
|
|||
{
|
||||
purge_node_t* node;
|
||||
|
||||
ut_ad(thr);
|
||||
|
||||
node = static_cast<purge_node_t*>(thr->run_node);
|
||||
|
||||
node->start();
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 1996, 2018, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2018, MariaDB Corporation.
|
||||
Copyright (c) 2018, 2019, 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
|
||||
|
@ -944,9 +944,6 @@ row_build_row_ref_in_tuple(
|
|||
ulint offsets_[REC_OFFS_NORMAL_SIZE];
|
||||
rec_offs_init(offsets_);
|
||||
|
||||
ut_a(ref);
|
||||
ut_a(index);
|
||||
ut_a(rec);
|
||||
ut_ad(!dict_index_is_clust(index));
|
||||
ut_a(index->table);
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 1996, 2017, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2015, 2018, MariaDB Corporation.
|
||||
Copyright (c) 2015, 2019, 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
|
||||
|
@ -2688,7 +2688,6 @@ row_upd_clust_rec_by_insert(
|
|||
rec_t* rec;
|
||||
ulint* offsets = NULL;
|
||||
|
||||
ut_ad(node);
|
||||
ut_ad(dict_index_is_clust(index));
|
||||
|
||||
trx = thr_get_trx(thr);
|
||||
|
@ -2839,7 +2838,6 @@ row_upd_clust_rec(
|
|||
dberr_t err;
|
||||
const dtuple_t* rebuilt_old_pk = NULL;
|
||||
|
||||
ut_ad(node);
|
||||
ut_ad(dict_index_is_clust(index));
|
||||
ut_ad(!thr_get_trx(thr)->in_rollback);
|
||||
ut_ad(!node->table->skip_alter_undo);
|
||||
|
@ -2975,7 +2973,6 @@ row_upd_del_mark_clust_rec(
|
|||
rec_t* rec;
|
||||
trx_t* trx = thr_get_trx(thr);
|
||||
|
||||
ut_ad(node);
|
||||
ut_ad(dict_index_is_clust(index));
|
||||
ut_ad(node->is_delete == PLAIN_DELETE);
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2017, 2018, MariaDB Corporation.
|
||||
Copyright (c) 2017, 2019, 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
|
||||
|
@ -1676,11 +1676,7 @@ trx_undo_rec_get_partial_row(
|
|||
bool first_v_col = true;
|
||||
bool is_undo_log = true;
|
||||
|
||||
ut_ad(index);
|
||||
ut_ad(ptr);
|
||||
ut_ad(row);
|
||||
ut_ad(heap);
|
||||
ut_ad(dict_index_is_clust(index));
|
||||
ut_ad(index->is_primary());
|
||||
|
||||
*row = dtuple_create_with_vcol(
|
||||
heap, dict_table_get_n_cols(index->table),
|
||||
|
|
|
@ -2,9 +2,9 @@ include_directories(..)
|
|||
include_directories(../../src)
|
||||
include_directories(../../src/tests)
|
||||
|
||||
find_library(JEMALLOC_STATIC_LIBRARY libjemalloc.a)
|
||||
|
||||
if (BUILD_TESTING)
|
||||
find_library(JEMALLOC_STATIC_LIBRARY libjemalloc.a)
|
||||
|
||||
## reference implementation with simple size-doubling buffer without
|
||||
## jemalloc size tricks
|
||||
add_library(doubling_buffer_ftcxx STATIC
|
||||
|
|
Loading…
Add table
Reference in a new issue