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
1b568fb9
Commit
1b568fb9
authored
Feb 26, 2024
by
Yuchen Pei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-33539 spider: remove some unused code in self reference checks
parent
d37c51b8
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
0 additions
and
143 deletions
+0
-143
storage/spider/spd_db_conn.cc
storage/spider/spd_db_conn.cc
+0
-8
storage/spider/spd_db_include.cc
storage/spider/spd_db_include.cc
+0
-16
storage/spider/spd_db_include.h
storage/spider/spd_db_include.h
+0
-4
storage/spider/spd_db_mysql.cc
storage/spider/spd_db_mysql.cc
+0
-109
storage/spider/spd_db_mysql.h
storage/spider/spd_db_mysql.h
+0
-5
storage/spider/spd_include.h
storage/spider/spd_include.h
+0
-1
No files found.
storage/spider/spd_db_conn.cc
View file @
1b568fb9
...
...
@@ -378,7 +378,6 @@ int spider_db_conn_queue_action(
)
||
(
conn
->
loop_check_queue
.
records
&&
conn
->
db_conn
->
set_loop_check_in_bulk_sql
()
&&
(
error_num
=
spider_dbton
[
conn
->
dbton_id
].
db_util
->
append_loop_check
(
&
sql_str
,
conn
))
)
||
...
...
@@ -477,13 +476,6 @@ int spider_db_conn_queue_action(
)
{
DBUG_RETURN
(
error_num
);
}
if
(
conn
->
loop_check_queue
.
records
&&
!
conn
->
db_conn
->
set_loop_check_in_bulk_sql
()
&&
(
error_num
=
conn
->
db_conn
->
set_loop_check
((
int
*
)
conn
->
need_mon
))
)
{
DBUG_RETURN
(
error_num
);
}
if
(
conn
->
queued_trx_isolation
&&
!
conn
->
queued_semi_trx_isolation
&&
...
...
storage/spider/spd_db_include.cc
View file @
1b568fb9
...
...
@@ -71,22 +71,6 @@ spider_db_conn::spider_db_conn(
DBUG_VOID_RETURN
;
}
bool
spider_db_conn
::
set_loop_check_in_bulk_sql
()
{
DBUG_ENTER
(
"spider_db_conn::set_loop_check_in_bulk_sql"
);
DBUG_PRINT
(
"info"
,(
"spider this=%p"
,
this
));
DBUG_RETURN
(
FALSE
);
}
int
spider_db_conn
::
set_loop_check
(
int
*
need_mon
)
{
DBUG_ENTER
(
"spider_db_conn::set_loop_check"
);
DBUG_PRINT
(
"info"
,(
"spider this=%p"
,
this
));
/* nothing to do */
DBUG_RETURN
(
0
);
}
int
spider_db_conn
::
fin_loop_check
()
{
st_spider_conn_loop_check
*
lcptr
;
...
...
storage/spider/spd_db_include.h
View file @
1b568fb9
...
...
@@ -1170,10 +1170,6 @@ class spider_db_conn
Time_zone
*
time_zone
,
int
*
need_mon
)
=
0
;
virtual
bool
set_loop_check_in_bulk_sql
();
virtual
int
set_loop_check
(
int
*
need_mon
);
virtual
int
fin_loop_check
();
virtual
int
show_master_status
(
SPIDER_TRX
*
trx
,
...
...
storage/spider/spd_db_mysql.cc
View file @
1b568fb9
...
...
@@ -3352,115 +3352,6 @@ int spider_db_mbase::set_time_zone(
DBUG_RETURN
(
0
);
}
bool
spider_db_mbase
::
set_loop_check_in_bulk_sql
()
{
DBUG_ENTER
(
"spider_db_mbase::set_loop_check_in_bulk_sql"
);
DBUG_PRINT
(
"info"
,(
"spider this=%p"
,
this
));
DBUG_RETURN
(
TRUE
);
}
int
spider_db_mbase
::
set_loop_check
(
int
*
need_mon
)
{
SPIDER_CONN_LOOP_CHECK
*
lcptr
;
char
sql_buf
[
MAX_FIELD_WIDTH
];
spider_string
sql_str
(
sql_buf
,
sizeof
(
sql_buf
),
&
my_charset_bin
);
DBUG_ENTER
(
"spider_db_mbase::set_loop_check"
);
DBUG_PRINT
(
"info"
,(
"spider this=%p"
,
this
));
sql_str
.
init_calc_mem
(
SPD_MID_DB_MBASE_SET_LOOP_CHECK_1
);
while
((
lcptr
=
(
SPIDER_CONN_LOOP_CHECK
*
)
my_hash_element
(
&
conn
->
loop_check_queue
,
0
)))
{
sql_str
.
length
(
0
);
if
(
sql_str
.
reserve
(
SPIDER_SQL_SET_USER_VAL_LEN
+
SPIDER_SQL_LOP_CHK_PRM_PRF_LEN
+
lcptr
->
to_name
.
length
+
SPIDER_SQL_NAME_QUOTE_LEN
+
SPIDER_SQL_EQUAL_LEN
+
SPIDER_SQL_VALUE_QUOTE_LEN
+
lcptr
->
merged_value
.
length
+
SPIDER_SQL_VALUE_QUOTE_LEN
))
{
DBUG_RETURN
(
HA_ERR_OUT_OF_MEM
);
}
sql_str
.
q_append
(
SPIDER_SQL_SET_USER_VAL_STR
,
SPIDER_SQL_SET_USER_VAL_LEN
);
sql_str
.
q_append
(
SPIDER_SQL_LOP_CHK_PRM_PRF_STR
,
SPIDER_SQL_LOP_CHK_PRM_PRF_LEN
);
sql_str
.
q_append
(
lcptr
->
to_name
.
str
,
lcptr
->
to_name
.
length
);
sql_str
.
q_append
(
SPIDER_SQL_NAME_QUOTE_STR
,
SPIDER_SQL_NAME_QUOTE_LEN
);
sql_str
.
q_append
(
SPIDER_SQL_EQUAL_STR
,
SPIDER_SQL_EQUAL_LEN
);
sql_str
.
q_append
(
SPIDER_SQL_VALUE_QUOTE_STR
,
SPIDER_SQL_VALUE_QUOTE_LEN
);
sql_str
.
q_append
(
lcptr
->
merged_value
.
str
,
lcptr
->
merged_value
.
length
);
sql_str
.
q_append
(
SPIDER_SQL_VALUE_QUOTE_STR
,
SPIDER_SQL_VALUE_QUOTE_LEN
);
pthread_mutex_assert_not_owner
(
&
conn
->
mta_conn_mutex
);
pthread_mutex_lock
(
&
conn
->
mta_conn_mutex
);
SPIDER_SET_FILE_POS
(
&
conn
->
mta_conn_mutex_file_pos
);
conn
->
need_mon
=
need_mon
;
DBUG_ASSERT
(
!
conn
->
mta_conn_mutex_lock_already
);
DBUG_ASSERT
(
!
conn
->
mta_conn_mutex_unlock_later
);
conn
->
mta_conn_mutex_lock_already
=
TRUE
;
conn
->
mta_conn_mutex_unlock_later
=
TRUE
;
if
(
spider_db_query
(
conn
,
sql_str
.
ptr
(),
sql_str
.
length
(),
-
1
,
need_mon
)
)
{
DBUG_ASSERT
(
conn
->
mta_conn_mutex_lock_already
);
DBUG_ASSERT
(
conn
->
mta_conn_mutex_unlock_later
);
conn
->
mta_conn_mutex_lock_already
=
FALSE
;
conn
->
mta_conn_mutex_unlock_later
=
FALSE
;
DBUG_RETURN
(
spider_db_errorno
(
conn
));
}
DBUG_ASSERT
(
conn
->
mta_conn_mutex_lock_already
);
DBUG_ASSERT
(
conn
->
mta_conn_mutex_unlock_later
);
conn
->
mta_conn_mutex_lock_already
=
FALSE
;
conn
->
mta_conn_mutex_unlock_later
=
FALSE
;
SPIDER_CLEAR_FILE_POS
(
&
conn
->
mta_conn_mutex_file_pos
);
pthread_mutex_unlock
(
&
conn
->
mta_conn_mutex
);
#ifdef HASH_UPDATE_WITH_HASH_VALUE
my_hash_delete_with_hash_value
(
&
conn
->
loop_check_queue
,
lcptr
->
hash_value
,
(
uchar
*
)
lcptr
);
#else
my_hash_delete
(
&
conn
->
loop_check_queue
,
(
uchar
*
)
lcptr
);
#endif
}
DBUG_RETURN
(
0
);
}
int
spider_db_mbase
::
fin_loop_check
()
{
st_spider_conn_loop_check
*
lcptr
;
DBUG_ENTER
(
"spider_db_mbase::fin_loop_check"
);
DBUG_PRINT
(
"info"
,(
"spider this=%p"
,
this
));
if
(
conn
->
loop_check_queue
.
records
)
{
uint
l
=
0
;
while
((
lcptr
=
(
SPIDER_CONN_LOOP_CHECK
*
)
my_hash_element
(
&
conn
->
loop_check_queue
,
l
)))
{
lcptr
->
flag
=
0
;
++
l
;
}
my_hash_reset
(
&
conn
->
loop_check_queue
);
}
lcptr
=
conn
->
loop_check_ignored_first
;
while
(
lcptr
)
{
lcptr
->
flag
=
0
;
lcptr
=
lcptr
->
next
;
}
conn
->
loop_check_ignored_first
=
NULL
;
lcptr
=
conn
->
loop_check_meraged_first
;
while
(
lcptr
)
{
lcptr
->
flag
=
0
;
lcptr
=
lcptr
->
next
;
}
conn
->
loop_check_meraged_first
=
NULL
;
DBUG_RETURN
(
0
);
}
int
spider_db_mbase
::
exec_simple_sql_with_result
(
SPIDER_TRX
*
trx
,
SPIDER_SHARE
*
share
,
...
...
storage/spider/spd_db_mysql.h
View file @
1b568fb9
...
...
@@ -527,11 +527,6 @@ class spider_db_mbase: public spider_db_conn
Time_zone
*
time_zone
,
int
*
need_mon
);
bool
set_loop_check_in_bulk_sql
();
int
set_loop_check
(
int
*
need_mon
);
int
fin_loop_check
();
int
exec_simple_sql_with_result
(
SPIDER_TRX
*
trx
,
SPIDER_SHARE
*
share
,
...
...
storage/spider/spd_include.h
View file @
1b568fb9
...
...
@@ -377,7 +377,6 @@ enum spider_malloc_id {
SPD_MID_DB_MBASE_RESULT_FETCH_ROW_FROM_TMP_TABLE_3
,
SPD_MID_DB_MBASE_ROW_APPEND_ESCAPED_TO_STR_1
,
SPD_MID_DB_MBASE_ROW_CLONE_1
,
SPD_MID_DB_MBASE_SET_LOOP_CHECK_1
,
SPD_MID_DB_MBASE_SET_SQL_MODE_1
,
SPD_MID_DB_MBASE_SET_TIME_ZONE_1
,
SPD_MID_DB_MBASE_SET_WAIT_TIMEOUT_1
,
...
...
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