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
5c6fceec
Commit
5c6fceec
authored
Oct 13, 2023
by
Yuchen Pei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-28998 remove a known reference to a SPIDER_CONN when it is freed
parent
8660e2de
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
62 additions
and
1 deletion
+62
-1
storage/spider/mysql-test/spider/bugfix/r/mdev_28998.result
storage/spider/mysql-test/spider/bugfix/r/mdev_28998.result
+23
-0
storage/spider/mysql-test/spider/bugfix/t/mdev_28998.test
storage/spider/mysql-test/spider/bugfix/t/mdev_28998.test
+35
-0
storage/spider/spd_conn.cc
storage/spider/spd_conn.cc
+2
-0
storage/spider/spd_group_by_handler.cc
storage/spider/spd_group_by_handler.cc
+2
-1
No files found.
storage/spider/mysql-test/spider/bugfix/r/mdev_28998.result
0 → 100644
View file @
5c6fceec
#
# MDEV-28998 ASAN errors in spider_fields::free_conn_holder or spider_create_group_by_handler
#
for master_1
for child2
for child3
CREATE SERVER s FOREIGN DATA WRAPPER MYSQL OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'test',user 'root');
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1),(2);
CREATE TABLE t1_SPIDER (a INT) ENGINE=SPIDER COMMENT = "wrapper 'mysql', srv 's', table 't1'";
CREATE TABLE t2 AS SELECT a FROM t1_SPIDER;
SELECT * FROM t2;
a
1
2
DROP TABLE t2, t1_SPIDER, t1;
drop server s;
for master_1
for child2
for child3
#
# end of test mdev_28998
#
storage/spider/mysql-test/spider/bugfix/t/mdev_28998.test
0 → 100644
View file @
5c6fceec
--
echo
#
--
echo
# MDEV-28998 ASAN errors in spider_fields::free_conn_holder or spider_create_group_by_handler
--
echo
#
if
(
`select not(count(*)) from information_schema.system_variables where variable_name='have_sanitizer' and global_value like "%ASAN%"`
)
{
--
skip
test
needs
to
be
run
with
ASAN
}
--
disable_query_log
--
disable_result_log
--
source
../../
t
/
test_init
.
inc
--
enable_result_log
--
enable_query_log
evalp
CREATE
SERVER
s
FOREIGN
DATA
WRAPPER
MYSQL
OPTIONS
(
SOCKET
"
$MASTER_1_MYSOCK
"
,
DATABASE
'test'
,
user
'root'
);
CREATE
TABLE
t1
(
a
INT
);
INSERT
INTO
t1
VALUES
(
1
),(
2
);
CREATE
TABLE
t1_SPIDER
(
a
INT
)
ENGINE
=
SPIDER
COMMENT
=
"wrapper 'mysql', srv 's', table 't1'"
;
CREATE
TABLE
t2
AS
SELECT
a
FROM
t1_SPIDER
;
SELECT
*
FROM
t2
;
# Cleanup
DROP
TABLE
t2
,
t1_SPIDER
,
t1
;
drop
server
s
;
--
disable_query_log
--
disable_result_log
--
source
../../
t
/
test_deinit
.
inc
--
enable_result_log
--
enable_query_log
--
echo
#
--
echo
# end of test mdev_28998
--
echo
#
storage/spider/spd_conn.cc
View file @
5c6fceec
...
...
@@ -1255,6 +1255,8 @@ int spider_free_conn(
ip_port_conn
->
ip_port_count
--
;
pthread_mutex_unlock
(
&
ip_port_conn
->
mutex
);
}
if
(
conn
->
conn_holder_for_direct_join
)
conn
->
conn_holder_for_direct_join
->
conn
=
NULL
;
spider_free_conn_alloc
(
conn
);
spider_free
(
spider_current_trx
,
conn
,
MYF
(
0
));
DBUG_RETURN
(
0
);
...
...
storage/spider/spd_group_by_handler.cc
View file @
5c6fceec
...
...
@@ -859,7 +859,8 @@ void spider_fields::free_conn_holder(
}
}
}
conn_holder_arg
->
conn
->
conn_holder_for_direct_join
=
NULL
;
if
(
conn_holder_arg
->
conn
)
conn_holder_arg
->
conn
->
conn_holder_for_direct_join
=
NULL
;
DBUG_PRINT
(
"info"
,(
"spider free conn_holder=%p"
,
conn_holder_arg
));
spider_free
(
spider_current_trx
,
conn_holder_arg
,
MYF
(
0
));
DBUG_VOID_RETURN
;
...
...
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