Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
0891c3d9
Commit
0891c3d9
authored
Mar 11, 2004
by
marko@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Plain Diff
Merge marko@build.mysql.com:/home/bk/mysql-4.0
into hundin.mysql.fi:/home/marko/l/mysql-4.0
parents
37817f60
5b5d7492
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
68 additions
and
81 deletions
+68
-81
innobase/dict/dict0dict.c
innobase/dict/dict0dict.c
+2
-2
innobase/dict/dict0mem.c
innobase/dict/dict0mem.c
+4
-2
innobase/ha/hash0hash.c
innobase/ha/hash0hash.c
+6
-32
innobase/include/data0data.h
innobase/include/data0data.h
+4
-2
innobase/include/dict0mem.h
innobase/include/dict0mem.h
+10
-7
innobase/include/hash0hash.h
innobase/include/hash0hash.h
+3
-17
innobase/include/hash0hash.ic
innobase/include/hash0hash.ic
+8
-0
innobase/include/mtr0mtr.h
innobase/include/mtr0mtr.h
+8
-6
innobase/include/row0ins.h
innobase/include/row0ins.h
+3
-2
innobase/include/row0upd.h
innobase/include/row0upd.h
+3
-2
innobase/row/row0ins.c
innobase/row/row0ins.c
+6
-4
innobase/row/row0upd.c
innobase/row/row0upd.c
+5
-1
innobase/thr/thr0loc.c
innobase/thr/thr0loc.c
+6
-4
No files found.
innobase/dict/dict0dict.c
View file @
0891c3d9
...
@@ -3536,9 +3536,9 @@ dict_tree_create(
...
@@ -3536,9 +3536,9 @@ dict_tree_create(
tree
->
id
=
index
->
id
;
tree
->
id
=
index
->
id
;
UT_LIST_INIT
(
tree
->
tree_indexes
);
UT_LIST_INIT
(
tree
->
tree_indexes
);
#ifdef UNIV_DEBUG
tree
->
magic_n
=
DICT_TREE_MAGIC_N
;
tree
->
magic_n
=
DICT_TREE_MAGIC_N
;
#endif
/* UNIV_DEBUG */
rw_lock_create
(
&
(
tree
->
lock
));
rw_lock_create
(
&
(
tree
->
lock
));
rw_lock_set_level
(
&
(
tree
->
lock
),
SYNC_INDEX_TREE
);
rw_lock_set_level
(
&
(
tree
->
lock
),
SYNC_INDEX_TREE
);
...
...
innobase/dict/dict0mem.c
View file @
0891c3d9
...
@@ -90,9 +90,9 @@ dict_mem_table_create(
...
@@ -90,9 +90,9 @@ dict_mem_table_create(
mutex_set_level
(
&
(
table
->
autoinc_mutex
),
SYNC_DICT_AUTOINC_MUTEX
);
mutex_set_level
(
&
(
table
->
autoinc_mutex
),
SYNC_DICT_AUTOINC_MUTEX
);
table
->
autoinc_inited
=
FALSE
;
table
->
autoinc_inited
=
FALSE
;
#ifdef UNIV_DEBUG
table
->
magic_n
=
DICT_TABLE_MAGIC_N
;
table
->
magic_n
=
DICT_TABLE_MAGIC_N
;
#endif
/* UNIV_DEBUG */
return
(
table
);
return
(
table
);
}
}
...
@@ -217,7 +217,9 @@ dict_mem_index_create(
...
@@ -217,7 +217,9 @@ dict_mem_index_create(
index
->
stat_n_diff_key_vals
=
NULL
;
index
->
stat_n_diff_key_vals
=
NULL
;
index
->
cached
=
FALSE
;
index
->
cached
=
FALSE
;
#ifdef UNIV_DEBUG
index
->
magic_n
=
DICT_INDEX_MAGIC_N
;
index
->
magic_n
=
DICT_INDEX_MAGIC_N
;
#endif
/* UNIV_DEBUG */
return
(
index
);
return
(
index
);
}
}
...
...
innobase/ha/hash0hash.c
View file @
0891c3d9
...
@@ -22,6 +22,7 @@ hash_mutex_enter(
...
@@ -22,6 +22,7 @@ hash_mutex_enter(
hash_table_t
*
table
,
/* in: hash table */
hash_table_t
*
table
,
/* in: hash table */
ulint
fold
)
/* in: fold */
ulint
fold
)
/* in: fold */
{
{
ut_ad
(
table
->
magic_n
==
HASH_TABLE_MAGIC_N
);
mutex_enter
(
hash_get_mutex
(
table
,
fold
));
mutex_enter
(
hash_get_mutex
(
table
,
fold
));
}
}
...
@@ -34,41 +35,10 @@ hash_mutex_exit(
...
@@ -34,41 +35,10 @@ hash_mutex_exit(
hash_table_t
*
table
,
/* in: hash table */
hash_table_t
*
table
,
/* in: hash table */
ulint
fold
)
/* in: fold */
ulint
fold
)
/* in: fold */
{
{
ut_ad
(
table
->
magic_n
==
HASH_TABLE_MAGIC_N
);
mutex_exit
(
hash_get_mutex
(
table
,
fold
));
mutex_exit
(
hash_get_mutex
(
table
,
fold
));
}
}
/****************************************************************
Reserves all the mutexes of a hash table, in an ascending order. */
void
hash_mutex_enter_all
(
/*=================*/
hash_table_t
*
table
)
/* in: hash table */
{
ulint
i
;
for
(
i
=
0
;
i
<
table
->
n_mutexes
;
i
++
)
{
mutex_enter
(
table
->
mutexes
+
i
);
}
}
/****************************************************************
Releases all the mutexes of a hash table. */
void
hash_mutex_exit_all
(
/*================*/
hash_table_t
*
table
)
/* in: hash table */
{
ulint
i
;
for
(
i
=
0
;
i
<
table
->
n_mutexes
;
i
++
)
{
mutex_exit
(
table
->
mutexes
+
i
);
}
}
/*****************************************************************
/*****************************************************************
Creates a hash table with >= n array cells. The actual number of cells is
Creates a hash table with >= n array cells. The actual number of cells is
chosen to be a prime number slightly bigger than n. */
chosen to be a prime number slightly bigger than n. */
...
@@ -97,7 +67,9 @@ hash_create(
...
@@ -97,7 +67,9 @@ hash_create(
table
->
mutexes
=
NULL
;
table
->
mutexes
=
NULL
;
table
->
heaps
=
NULL
;
table
->
heaps
=
NULL
;
table
->
heap
=
NULL
;
table
->
heap
=
NULL
;
#ifdef UNIV_DEBUG
table
->
magic_n
=
HASH_TABLE_MAGIC_N
;
table
->
magic_n
=
HASH_TABLE_MAGIC_N
;
#endif
/* UNIV_DEBUG */
/* Initialize the cell array */
/* Initialize the cell array */
...
@@ -118,6 +90,7 @@ hash_table_free(
...
@@ -118,6 +90,7 @@ hash_table_free(
/*============*/
/*============*/
hash_table_t
*
table
)
/* in, own: hash table */
hash_table_t
*
table
)
/* in, own: hash table */
{
{
ut_ad
(
table
->
magic_n
==
HASH_TABLE_MAGIC_N
);
ut_a
(
table
->
mutexes
==
NULL
);
ut_a
(
table
->
mutexes
==
NULL
);
ut_free
(
table
->
array
);
ut_free
(
table
->
array
);
...
@@ -139,6 +112,7 @@ hash_create_mutexes(
...
@@ -139,6 +112,7 @@ hash_create_mutexes(
ulint
i
;
ulint
i
;
ut_a
(
n_mutexes
==
ut_2_power_up
(
n_mutexes
));
ut_a
(
n_mutexes
==
ut_2_power_up
(
n_mutexes
));
ut_ad
(
table
->
magic_n
==
HASH_TABLE_MAGIC_N
);
table
->
mutexes
=
mem_alloc
(
n_mutexes
*
sizeof
(
mutex_t
));
table
->
mutexes
=
mem_alloc
(
n_mutexes
*
sizeof
(
mutex_t
));
...
...
innobase/include/data0data.h
View file @
0891c3d9
...
@@ -402,9 +402,11 @@ struct dtuple_struct {
...
@@ -402,9 +402,11 @@ struct dtuple_struct {
UT_LIST_NODE_T
(
dtuple_t
)
tuple_list
;
UT_LIST_NODE_T
(
dtuple_t
)
tuple_list
;
/* data tuples can be linked into a
/* data tuples can be linked into a
list using this field */
list using this field */
ulint
magic_n
;
#ifdef UNIV_DEBUG
}
;
ulint
magic_n
;
#define DATA_TUPLE_MAGIC_N 65478679
#define DATA_TUPLE_MAGIC_N 65478679
#endif
/* UNIV_DEBUG */
};
/* A slot for a field in a big rec vector */
/* A slot for a field in a big rec vector */
...
...
innobase/include/dict0mem.h
View file @
0891c3d9
...
@@ -198,10 +198,11 @@ struct dict_tree_struct{
...
@@ -198,10 +198,11 @@ struct dict_tree_struct{
the list; if the tree is of the mixed
the list; if the tree is of the mixed
type, the first index in the list is the
type, the first index in the list is the
index of the cluster which owns the tree */
index of the cluster which owns the tree */
#ifdef UNIV_DEBUG
ulint
magic_n
;
/* magic number */
ulint
magic_n
;
/* magic number */
};
#define DICT_TREE_MAGIC_N 7545676
#define DICT_TREE_MAGIC_N 7545676
#endif
/* UNIV_DEBUG */
};
/* Data structure for an index */
/* Data structure for an index */
struct
dict_index_struct
{
struct
dict_index_struct
{
...
@@ -247,7 +248,10 @@ struct dict_index_struct{
...
@@ -247,7 +248,10 @@ struct dict_index_struct{
ulint
stat_n_leaf_pages
;
ulint
stat_n_leaf_pages
;
/* approximate number of leaf pages in the
/* approximate number of leaf pages in the
index tree */
index tree */
#ifdef UNIV_DEBUG
ulint
magic_n
;
/* magic number */
ulint
magic_n
;
/* magic number */
#define DICT_INDEX_MAGIC_N 76789786
#endif
/* UNIV_DEBUG */
};
};
/* Data structure for a foreign key constraint; an example:
/* Data structure for a foreign key constraint; an example:
...
@@ -298,9 +302,6 @@ a foreign key constraint is enforced, therefore RESTRICT just means no flag */
...
@@ -298,9 +302,6 @@ a foreign key constraint is enforced, therefore RESTRICT just means no flag */
#define DICT_FOREIGN_ON_DELETE_NO_ACTION 16
#define DICT_FOREIGN_ON_DELETE_NO_ACTION 16
#define DICT_FOREIGN_ON_UPDATE_NO_ACTION 32
#define DICT_FOREIGN_ON_UPDATE_NO_ACTION 32
#define DICT_INDEX_MAGIC_N 76789786
/* Data structure for a database table */
/* Data structure for a database table */
struct
dict_table_struct
{
struct
dict_table_struct
{
dulint
id
;
/* id of the table or cluster */
dulint
id
;
/* id of the table or cluster */
...
@@ -412,10 +413,12 @@ struct dict_table_struct{
...
@@ -412,10 +413,12 @@ struct dict_table_struct{
inited; MySQL gets the init value by executing
inited; MySQL gets the init value by executing
SELECT MAX(auto inc column) */
SELECT MAX(auto inc column) */
ib_longlong
autoinc
;
/* autoinc counter value to give to the
ib_longlong
autoinc
;
/* autoinc counter value to give to the
next inserted row */
next inserted row */
#ifdef UNIV_DEBUG
ulint
magic_n
;
/* magic number */
ulint
magic_n
;
/* magic number */
};
#define DICT_TABLE_MAGIC_N 76333786
#define DICT_TABLE_MAGIC_N 76333786
#endif
/* UNIV_DEBUG */
};
/* Data structure for a stored procedure */
/* Data structure for a stored procedure */
struct
dict_proc_struct
{
struct
dict_proc_struct
{
...
...
innobase/include/hash0hash.h
View file @
0891c3d9
...
@@ -300,21 +300,6 @@ hash_mutex_exit(
...
@@ -300,21 +300,6 @@ hash_mutex_exit(
/*============*/
/*============*/
hash_table_t
*
table
,
/* in: hash table */
hash_table_t
*
table
,
/* in: hash table */
ulint
fold
);
/* in: fold */
ulint
fold
);
/* in: fold */
/****************************************************************
Reserves all the mutexes of a hash table, in an ascending order. */
void
hash_mutex_enter_all
(
/*=================*/
hash_table_t
*
table
);
/* in: hash table */
/****************************************************************
Releases all the mutexes of a hash table. */
void
hash_mutex_exit_all
(
/*================*/
hash_table_t
*
table
);
/* in: hash table */
struct
hash_cell_struct
{
struct
hash_cell_struct
{
void
*
node
;
/* hash chain node, NULL if none */
void
*
node
;
/* hash chain node, NULL if none */
...
@@ -333,10 +318,11 @@ struct hash_table_struct {
...
@@ -333,10 +318,11 @@ struct hash_table_struct {
memory heaps; there are then n_mutexes many of
memory heaps; there are then n_mutexes many of
these heaps */
these heaps */
mem_heap_t
*
heap
;
mem_heap_t
*
heap
;
#ifdef UNIV_DEBUG
ulint
magic_n
;
ulint
magic_n
;
};
#define HASH_TABLE_MAGIC_N 76561114
#define HASH_TABLE_MAGIC_N 76561114
#endif
/* UNIV_DEBUG */
};
#ifndef UNIV_NONINL
#ifndef UNIV_NONINL
#include "hash0hash.ic"
#include "hash0hash.ic"
...
...
innobase/include/hash0hash.ic
View file @
0891c3d9
...
@@ -18,6 +18,7 @@ hash_get_nth_cell(
...
@@ -18,6 +18,7 @@ hash_get_nth_cell(
hash_table_t* table, /* in: hash table */
hash_table_t* table, /* in: hash table */
ulint n) /* in: cell index */
ulint n) /* in: cell index */
{
{
ut_ad(table->magic_n == HASH_TABLE_MAGIC_N);
ut_ad(n < table->n_cells);
ut_ad(n < table->n_cells);
return(table->array + n);
return(table->array + n);
...
@@ -32,6 +33,7 @@ hash_get_n_cells(
...
@@ -32,6 +33,7 @@ hash_get_n_cells(
/* out: number of cells */
/* out: number of cells */
hash_table_t* table) /* in: table */
hash_table_t* table) /* in: table */
{
{
ut_ad(table->magic_n == HASH_TABLE_MAGIC_N);
return(table->n_cells);
return(table->n_cells);
}
}
...
@@ -45,6 +47,7 @@ hash_calc_hash(
...
@@ -45,6 +47,7 @@ hash_calc_hash(
ulint fold, /* in: folded value */
ulint fold, /* in: folded value */
hash_table_t* table) /* in: hash table */
hash_table_t* table) /* in: hash table */
{
{
ut_ad(table->magic_n == HASH_TABLE_MAGIC_N);
return(ut_hash_ulint(fold, table->n_cells));
return(ut_hash_ulint(fold, table->n_cells));
}
}
...
@@ -58,6 +61,7 @@ hash_get_mutex_no(
...
@@ -58,6 +61,7 @@ hash_get_mutex_no(
hash_table_t* table, /* in: hash table */
hash_table_t* table, /* in: hash table */
ulint fold) /* in: fold */
ulint fold) /* in: fold */
{
{
ut_ad(table->magic_n == HASH_TABLE_MAGIC_N);
return(ut_2pow_remainder(fold, table->n_mutexes));
return(ut_2pow_remainder(fold, table->n_mutexes));
}
}
...
@@ -71,6 +75,7 @@ hash_get_nth_heap(
...
@@ -71,6 +75,7 @@ hash_get_nth_heap(
hash_table_t* table, /* in: hash table */
hash_table_t* table, /* in: hash table */
ulint i) /* in: index of the heap */
ulint i) /* in: index of the heap */
{
{
ut_ad(table->magic_n == HASH_TABLE_MAGIC_N);
ut_ad(i < table->n_mutexes);
ut_ad(i < table->n_mutexes);
return(table->heaps[i]);
return(table->heaps[i]);
...
@@ -88,6 +93,8 @@ hash_get_heap(
...
@@ -88,6 +93,8 @@ hash_get_heap(
{
{
ulint i;
ulint i;
ut_ad(table->magic_n == HASH_TABLE_MAGIC_N);
if (table->heap) {
if (table->heap) {
return(table->heap);
return(table->heap);
}
}
...
@@ -107,6 +114,7 @@ hash_get_nth_mutex(
...
@@ -107,6 +114,7 @@ hash_get_nth_mutex(
hash_table_t* table, /* in: hash table */
hash_table_t* table, /* in: hash table */
ulint i) /* in: index of the mutex */
ulint i) /* in: index of the mutex */
{
{
ut_ad(table->magic_n == HASH_TABLE_MAGIC_N);
ut_ad(i < table->n_mutexes);
ut_ad(i < table->n_mutexes);
return(table->mutexes + i);
return(table->mutexes + i);
...
...
innobase/include/mtr0mtr.h
View file @
0891c3d9
...
@@ -290,7 +290,12 @@ struct mtr_memo_slot_struct{
...
@@ -290,7 +290,12 @@ struct mtr_memo_slot_struct{
/* Mini-transaction handle and buffer */
/* Mini-transaction handle and buffer */
struct
mtr_struct
{
struct
mtr_struct
{
#ifdef UNIV_DEBUG
ulint
state
;
/* MTR_ACTIVE, MTR_COMMITTING, MTR_COMMITTED */
ulint
state
;
/* MTR_ACTIVE, MTR_COMMITTING, MTR_COMMITTED */
#define MTR_ACTIVE 12231
#define MTR_COMMITTING 56456
#define MTR_COMMITTED 34676
#endif
/* UNIV_DEBUG */
dyn_array_t
memo
;
/* memo stack for locks etc. */
dyn_array_t
memo
;
/* memo stack for locks etc. */
dyn_array_t
log
;
/* mini-transaction log */
dyn_array_t
log
;
/* mini-transaction log */
ibool
modifications
;
ibool
modifications
;
...
@@ -305,15 +310,12 @@ struct mtr_struct{
...
@@ -305,15 +310,12 @@ struct mtr_struct{
this mtr */
this mtr */
dulint
end_lsn
;
/* end lsn of the possible log entry for
dulint
end_lsn
;
/* end lsn of the possible log entry for
this mtr */
this mtr */
#ifdef UNIV_DEBUG
ulint
magic_n
;
ulint
magic_n
;
};
#define MTR_MAGIC_N 54551
#define MTR_MAGIC_N 54551
#endif
/* UNIV_DEBUG */
};
#define MTR_ACTIVE 12231
#define MTR_COMMITTING 56456
#define MTR_COMMITTED 34676
#ifndef UNIV_NONINL
#ifndef UNIV_NONINL
#include "mtr0mtr.ic"
#include "mtr0mtr.ic"
#endif
#endif
...
...
innobase/include/row0ins.h
View file @
0891c3d9
...
@@ -145,10 +145,11 @@ struct ins_node_struct{
...
@@ -145,10 +145,11 @@ struct ins_node_struct{
entry_list and sys fields are stored here;
entry_list and sys fields are stored here;
if this is NULL, entry list should be created
if this is NULL, entry list should be created
and buffers for sys fields in row allocated */
and buffers for sys fields in row allocated */
#ifdef UNIV_DEBUG
ulint
magic_n
;
ulint
magic_n
;
};
#define INS_NODE_MAGIC_N 15849075
#define INS_NODE_MAGIC_N 15849075
#endif
/* UNIV_DEBUG */
};
/* Insert node types */
/* Insert node types */
#define INS_SEARCHED 0
/* INSERT INTO ... SELECT ... */
#define INS_SEARCHED 0
/* INSERT INTO ... SELECT ... */
...
...
innobase/include/row0upd.h
View file @
0891c3d9
...
@@ -384,10 +384,11 @@ struct upd_node_struct{
...
@@ -384,10 +384,11 @@ struct upd_node_struct{
sym_node_t
*
table_sym
;
/* table node in symbol table */
sym_node_t
*
table_sym
;
/* table node in symbol table */
que_node_t
*
col_assign_list
;
que_node_t
*
col_assign_list
;
/* column assignment list */
/* column assignment list */
#ifdef UNIV_DEBUG
ulint
magic_n
;
ulint
magic_n
;
};
#define UPD_NODE_MAGIC_N 1579975
#define UPD_NODE_MAGIC_N 1579975
#endif
/* UNIV_DEBUG */
};
/* Node execution states */
/* Node execution states */
#define UPD_NODE_SET_IX_LOCK 1
/* execution came to the node from
#define UPD_NODE_SET_IX_LOCK 1
/* execution came to the node from
...
...
innobase/row/row0ins.c
View file @
0891c3d9
...
@@ -80,9 +80,9 @@ ins_node_create(
...
@@ -80,9 +80,9 @@ ins_node_create(
node
->
trx_id
=
ut_dulint_zero
;
node
->
trx_id
=
ut_dulint_zero
;
node
->
entry_sys_heap
=
mem_heap_create
(
128
);
node
->
entry_sys_heap
=
mem_heap_create
(
128
);
#ifdef UNIV_DEBUG
node
->
magic_n
=
INS_NODE_MAGIC_N
;
node
->
magic_n
=
INS_NODE_MAGIC_N
;
#endif
/* UNIV_DEBUG */
return
(
node
);
return
(
node
);
}
}
...
@@ -194,6 +194,7 @@ ins_node_set_new_row(
...
@@ -194,6 +194,7 @@ ins_node_set_new_row(
ins_node_t
*
node
,
/* in: insert node */
ins_node_t
*
node
,
/* in: insert node */
dtuple_t
*
row
)
/* in: new row (or first row) for the node */
dtuple_t
*
row
)
/* in: new row (or first row) for the node */
{
{
ut_ad
(
node
->
magic_n
==
INS_NODE_MAGIC_N
);
node
->
state
=
INS_NODE_SET_IX_LOCK
;
node
->
state
=
INS_NODE_SET_IX_LOCK
;
node
->
index
=
NULL
;
node
->
index
=
NULL
;
node
->
entry
=
NULL
;
node
->
entry
=
NULL
;
...
@@ -2031,6 +2032,7 @@ row_ins(
...
@@ -2031,6 +2032,7 @@ row_ins(
ulint
err
;
ulint
err
;
ut_ad
(
node
&&
thr
);
ut_ad
(
node
&&
thr
);
ut_ad
(
node
->
magic_n
==
INS_NODE_MAGIC_N
);
if
(
node
->
state
==
INS_NODE_ALLOC_ROW_ID
)
{
if
(
node
->
state
==
INS_NODE_ALLOC_ROW_ID
)
{
...
@@ -2095,7 +2097,7 @@ row_ins_step(
...
@@ -2095,7 +2097,7 @@ row_ins_step(
trx_start_if_not_started
(
trx
);
trx_start_if_not_started
(
trx
);
node
=
thr
->
run_node
;
node
=
thr
->
run_node
;
ut_ad
(
node
->
magic_n
==
INS_NODE_MAGIC_N
);
ut_ad
(
que_node_get_type
(
node
)
==
QUE_NODE_INSERT
);
ut_ad
(
que_node_get_type
(
node
)
==
QUE_NODE_INSERT
);
parent
=
que_node_get_parent
(
node
);
parent
=
que_node_get_parent
(
node
);
...
...
innobase/row/row0upd.c
View file @
0891c3d9
...
@@ -287,7 +287,9 @@ upd_node_create(
...
@@ -287,7 +287,9 @@ upd_node_create(
node
->
select
=
NULL
;
node
->
select
=
NULL
;
node
->
heap
=
mem_heap_create
(
128
);
node
->
heap
=
mem_heap_create
(
128
);
node
->
magic_n
=
UPD_NODE_MAGIC_N
;
#ifdef UNIV_DEBUG
node
->
magic_n
=
UPD_NODE_MAGIC_N
;
#endif
/* UNIV_DEBUG */
node
->
cmpl_info
=
0
;
node
->
cmpl_info
=
0
;
...
@@ -1804,6 +1806,7 @@ row_upd_step(
...
@@ -1804,6 +1806,7 @@ row_upd_step(
trx_start_if_not_started
(
trx
);
trx_start_if_not_started
(
trx
);
node
=
thr
->
run_node
;
node
=
thr
->
run_node
;
ut_ad
(
node
->
magic_n
==
UPD_NODE_MAGIC_N
);
sel_node
=
node
->
select
;
sel_node
=
node
->
select
;
...
@@ -1923,6 +1926,7 @@ row_upd_in_place_in_select(
...
@@ -1923,6 +1926,7 @@ row_upd_in_place_in_select(
node
=
que_node_get_parent
(
sel_node
);
node
=
que_node_get_parent
(
sel_node
);
ut_ad
(
node
->
magic_n
==
UPD_NODE_MAGIC_N
);
ut_ad
(
que_node_get_type
(
node
)
==
QUE_NODE_UPDATE
);
ut_ad
(
que_node_get_type
(
node
)
==
QUE_NODE_UPDATE
);
pcur
=
node
->
pcur
;
pcur
=
node
->
pcur
;
...
...
innobase/thr/thr0loc.c
View file @
0891c3d9
...
@@ -46,10 +46,11 @@ struct thr_local_struct{
...
@@ -46,10 +46,11 @@ struct thr_local_struct{
ibool
in_ibuf
;
/* TRUE if the the thread is doing an ibuf
ibool
in_ibuf
;
/* TRUE if the the thread is doing an ibuf
operation */
operation */
hash_node_t
hash
;
/* hash chain node */
hash_node_t
hash
;
/* hash chain node */
#ifdef UNIV_DEBUG
ulint
magic_n
;
ulint
magic_n
;
};
#define THR_LOCAL_MAGIC_N 1231234
#define THR_LOCAL_MAGIC_N 1231234
#endif
/* UNIV_DEBUG */
};
/***********************************************************************
/***********************************************************************
Returns the local storage struct for a thread. */
Returns the local storage struct for a thread. */
...
@@ -167,8 +168,9 @@ thr_local_create(void)
...
@@ -167,8 +168,9 @@ thr_local_create(void)
local
->
id
=
os_thread_get_curr_id
();
local
->
id
=
os_thread_get_curr_id
();
local
->
handle
=
os_thread_get_curr
();
local
->
handle
=
os_thread_get_curr
();
#ifdef UNIV_DEBUG
local
->
magic_n
=
THR_LOCAL_MAGIC_N
;
local
->
magic_n
=
THR_LOCAL_MAGIC_N
;
#endif
/* UNIV_DEBUG */
local
->
in_ibuf
=
FALSE
;
local
->
in_ibuf
=
FALSE
;
mutex_enter
(
&
thr_local_mutex
);
mutex_enter
(
&
thr_local_mutex
);
...
@@ -207,7 +209,7 @@ thr_local_free(
...
@@ -207,7 +209,7 @@ thr_local_free(
mutex_exit
(
&
thr_local_mutex
);
mutex_exit
(
&
thr_local_mutex
);
ut_a
(
local
->
magic_n
==
THR_LOCAL_MAGIC_N
);
ut_a
d
(
local
->
magic_n
==
THR_LOCAL_MAGIC_N
);
mem_free
(
local
);
mem_free
(
local
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment