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
707d8653
Commit
707d8653
authored
Mar 24, 2021
by
Alexey Botchkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-25228 JSON_TABLE: Server crashes in Query_cache::unlink_table.
JSON_TABLE shojldn't be counted in the query_cache.
parent
7075955f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
2 deletions
+18
-2
mysql-test/main/query_cache.result
mysql-test/main/query_cache.result
+7
-0
mysql-test/main/query_cache.test
mysql-test/main/query_cache.test
+7
-0
sql/sql_cache.cc
sql/sql_cache.cc
+4
-2
No files found.
mysql-test/main/query_cache.result
View file @
707d8653
...
...
@@ -2227,6 +2227,13 @@ SHOW STATUS LIKE 'Qcache_inserts';
Variable_name Value
Qcache_inserts 0
drop table t1;
#
# MDEV-25228 JSON_TABLE: Server crashes in Query_cache::unlink_table.
#
CREATE TABLE t (a INT);
SELECT * FROM t JOIN JSON_TABLE('{}' , '$' COLUMNS(b FOR ORDINALITY)) AS jt;
a b
DROP TABLE t;
restore defaults
SET GLOBAL query_cache_type= default;
SET GLOBAL query_cache_size=@save_query_cache_size;
mysql-test/main/query_cache.test
View file @
707d8653
...
...
@@ -1818,6 +1818,13 @@ select * from t1, json_table(t1.a, '$' columns (f varchar(20) path '$.a')) as jt
SHOW
STATUS
LIKE
'Qcache_inserts'
;
drop
table
t1
;
--
echo
#
--
echo
# MDEV-25228 JSON_TABLE: Server crashes in Query_cache::unlink_table.
--
echo
#
CREATE
TABLE
t
(
a
INT
);
SELECT
*
FROM
t
JOIN
JSON_TABLE
(
'{}'
,
'$'
COLUMNS
(
b
FOR
ORDINALITY
))
AS
jt
;
DROP
TABLE
t
;
--
echo
restore
defaults
SET
GLOBAL
query_cache_type
=
default
;
SET
GLOBAL
query_cache_size
=@
save_query_cache_size
;
sql/sql_cache.cc
View file @
707d8653
...
...
@@ -4094,11 +4094,13 @@ Query_cache::process_and_count_tables(THD *thd, TABLE_LIST *tables_used,
*
tables_type
|=
HA_CACHE_TBL_NONTRANSACT
;
continue
;
}
if
(
tables_used
->
derived
)
if
(
tables_used
->
derived
||
tables_used
->
table_function
)
{
DBUG_PRINT
(
"qcache"
,
(
"table: %s"
,
tables_used
->
alias
.
str
));
table_count
--
;
DBUG_PRINT
(
"qcache"
,
(
"derived table skipped"
));
DBUG_PRINT
(
"qcache"
,
(
tables_used
->
table_function
?
"table function skipped"
:
"derived table skipped"
));
continue
;
}
...
...
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