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
12c23641
Commit
12c23641
authored
Aug 31, 2022
by
sawasa
Committed by
GitHub
Aug 31, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-28890 Spider: remove #ifdef SPIDER_XID_USES_xid_cache_iterate
Reviewed by: Nayuta Yanagisawa
parent
cf6c5176
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
90 deletions
+0
-90
storage/spider/spd_include.h
storage/spider/spd_include.h
+0
-1
storage/spider/spd_table.cc
storage/spider/spd_table.cc
+0
-19
storage/spider/spd_trx.cc
storage/spider/spd_trx.cc
+0
-70
No files found.
storage/spider/spd_include.h
View file @
12c23641
...
...
@@ -87,7 +87,6 @@
#define SPIDER_FIELD_FIELDPTR_REQUIRES_THDPTR
#define SPIDER_ENGINE_CONDITION_PUSHDOWN_IS_ALWAYS_ON
#define SPIDER_XID_USES_xid_cache_iterate
#define SPIDER_Item_args_arg_count_IS_PROTECTED
...
...
storage/spider/spd_table.cc
View file @
12c23641
...
...
@@ -110,14 +110,6 @@ inline void spider_destroy_thd(MYSQL_THD thd)
delete
thd
;
}
#ifdef SPIDER_XID_USES_xid_cache_iterate
#else
#ifdef XID_CACHE_IS_SPLITTED
uint
*
spd_db_att_xid_cache_split_num
;
#endif
pthread_mutex_t
*
spd_db_att_LOCK_xid_cache
;
HASH
*
spd_db_att_xid_cache
;
#endif
struct
charset_info_st
*
spd_charset_utf8mb3_bin
;
const
char
**
spd_defaults_extra_file
;
const
char
**
spd_defaults_file
;
...
...
@@ -6593,17 +6585,6 @@ int spider_db_init(
#ifndef SPIDER_HAS_NEXT_THREAD_ID
spd_db_att_thread_id
=
&
thread_id
;
#endif
#ifdef SPIDER_XID_USES_xid_cache_iterate
#else
#ifdef XID_CACHE_IS_SPLITTED
spd_db_att_xid_cache_split_num
=
&
opt_xid_cache_split_num
;
spd_db_att_LOCK_xid_cache
=
LOCK_xid_cache
;
spd_db_att_xid_cache
=
xid_cache
;
#else
spd_db_att_LOCK_xid_cache
=
&
LOCK_xid_cache
;
spd_db_att_xid_cache
=
&
xid_cache
;
#endif
#endif
spd_charset_utf8mb3_bin
=
&
my_charset_utf8mb3_bin
;
spd_defaults_extra_file
=
&
my_defaults_extra_file
;
...
...
storage/spider/spd_trx.cc
View file @
12c23641
...
...
@@ -36,14 +36,6 @@
#include "spd_ping_table.h"
#include "spd_malloc.h"
#ifdef SPIDER_XID_USES_xid_cache_iterate
#else
#ifdef XID_CACHE_IS_SPLITTED
extern
uint
*
spd_db_att_xid_cache_split_num
;
#endif
extern
pthread_mutex_t
*
spd_db_att_LOCK_xid_cache
;
extern
HASH
*
spd_db_att_xid_cache
;
#endif
extern
struct
charset_info_st
*
spd_charset_utf8mb3_bin
;
extern
handlerton
*
spider_hton_ptr
;
...
...
@@ -1600,62 +1592,17 @@ static int spider_xa_lock(
int
error_num
;
const
char
*
old_proc_info
;
DBUG_ENTER
(
"spider_xa_lock"
);
#ifdef SPIDER_XID_USES_xid_cache_iterate
#else
my_hash_value_type
hash_value
=
my_calc_hash
(
spd_db_att_xid_cache
,
(
uchar
*
)
xid_state
->
xid
.
key
(),
xid_state
->
xid
.
key_length
());
#ifdef XID_CACHE_IS_SPLITTED
uint
idx
=
hash_value
%
*
spd_db_att_xid_cache_split_num
;
#endif
#endif
old_proc_info
=
thd_proc_info
(
thd
,
"Locking xid by Spider"
);
#ifdef SPIDER_XID_USES_xid_cache_iterate
if
(
xid_cache_insert
(
thd
,
xid_state
,
xid
))
{
error_num
=
(
spider_stmt_da_sql_errno
(
thd
)
==
ER_XAER_DUPID
?
ER_SPIDER_XA_LOCKED_NUM
:
HA_ERR_OUT_OF_MEM
);
goto
error
;
}
#else
#ifdef XID_CACHE_IS_SPLITTED
pthread_mutex_lock
(
&
spd_db_att_LOCK_xid_cache
[
idx
]);
#else
pthread_mutex_lock
(
spd_db_att_LOCK_xid_cache
);
#endif
#ifdef XID_CACHE_IS_SPLITTED
if
(
my_hash_search_using_hash_value
(
&
spd_db_att_xid_cache
[
idx
],
hash_value
,
xid_state
->
xid
.
key
(),
xid_state
->
xid
.
key_length
()))
#else
if
(
my_hash_search_using_hash_value
(
spd_db_att_xid_cache
,
hash_value
,
xid_state
->
xid
.
key
(),
xid_state
->
xid
.
key_length
()))
#endif
{
error_num
=
ER_SPIDER_XA_LOCKED_NUM
;
goto
error
;
}
if
(
my_hash_insert
(
spd_db_att_xid_cache
,
(
uchar
*
)
xid_state
))
{
error_num
=
HA_ERR_OUT_OF_MEM
;
goto
error
;
}
#ifdef XID_CACHE_IS_SPLITTED
pthread_mutex_unlock
(
&
spd_db_att_LOCK_xid_cache
[
idx
]);
#else
pthread_mutex_unlock
(
spd_db_att_LOCK_xid_cache
);
#endif
#endif
thd_proc_info
(
thd
,
old_proc_info
);
DBUG_RETURN
(
0
);
error:
#ifdef SPIDER_XID_USES_xid_cache_iterate
#else
#ifdef XID_CACHE_IS_SPLITTED
pthread_mutex_unlock
(
&
spd_db_att_LOCK_xid_cache
[
idx
]);
#else
pthread_mutex_unlock
(
spd_db_att_LOCK_xid_cache
);
#endif
#endif
thd_proc_info
(
thd
,
old_proc_info
);
DBUG_RETURN
(
error_num
);
}
...
...
@@ -1666,25 +1613,8 @@ static int spider_xa_unlock(
THD
*
thd
=
current_thd
;
const
char
*
old_proc_info
;
DBUG_ENTER
(
"spider_xa_unlock"
);
#ifdef SPIDER_XID_USES_xid_cache_iterate
#else
#endif
old_proc_info
=
thd_proc_info
(
thd
,
"Unlocking xid by Spider"
);
#ifdef SPIDER_XID_USES_xid_cache_iterate
xid_cache_delete
(
thd
,
xid_state
);
#else
#ifdef XID_CACHE_IS_SPLITTED
pthread_mutex_lock
(
&
spd_db_att_LOCK_xid_cache
[
idx
]);
#else
pthread_mutex_lock
(
spd_db_att_LOCK_xid_cache
);
#endif
my_hash_delete
(
spd_db_att_xid_cache
,
(
uchar
*
)
xid_state
);
#ifdef XID_CACHE_IS_SPLITTED
pthread_mutex_unlock
(
&
spd_db_att_LOCK_xid_cache
[
idx
]);
#else
pthread_mutex_unlock
(
spd_db_att_LOCK_xid_cache
);
#endif
#endif
thd_proc_info
(
thd
,
old_proc_info
);
DBUG_RETURN
(
0
);
}
...
...
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