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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
14887bb2
Commit
14887bb2
authored
Jul 24, 2008
by
Davi Arnaut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cherry-pick Bug#33362 from mysql-5.1
parent
dd85aa78
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1729 additions
and
1 deletion
+1729
-1
mysql-test/r/query_cache_merge.result
mysql-test/r/query_cache_merge.result
+1672
-0
mysql-test/t/query_cache_merge.test
mysql-test/t/query_cache_merge.test
+56
-0
sql/sql_cache.cc
sql/sql_cache.cc
+1
-1
No files found.
mysql-test/r/query_cache_merge.result
View file @
14887bb2
This diff is collapsed.
Click to expand it.
mysql-test/t/query_cache_merge.test
View file @
14887bb2
...
@@ -38,3 +38,59 @@ drop table t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t2
...
@@ -38,3 +38,59 @@ drop table t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t2
SET
@@
global
.
query_cache_size
=
0
;
SET
@@
global
.
query_cache_size
=
0
;
# End of 4.1 tests
# End of 4.1 tests
#
# Bug#33362: Query cache invalidation (truncate) may hang if cached query uses many tables
#
let
$c
=
255
;
while
(
$c
)
{
eval
CREATE
TABLE
t
$c
(
a
INT
);
eval
INSERT
INTO
t
$c
VALUES
(
$c
);
dec
$c
;
}
let
$c
=
254
;
let
$str
=
t255
;
while
(
$c
)
{
let
$str
=
t
$c
,
$str
;
dec
$c
;
}
eval
CREATE
TABLE
t0
(
a
INT
)
ENGINE
=
MERGE
UNION
(
$str
);
SET
GLOBAL
query_cache_size
=
1048576
;
FLUSH
STATUS
;
SELECT
a
FROM
t0
WHERE
a
=
1
;
SHOW
STATUS
LIKE
"Qcache_queries_in_cache"
;
let
$c
=
255
;
let
$i
=
1
;
FLUSH
TABLES
;
while
(
$c
)
{
eval
TRUNCATE
TABLE
t
$c
;
eval
SELECT
a
FROM
t
$i
;
dec
$c
;
inc
$i
;
}
SELECT
a
FROM
t0
;
DROP
TABLE
t0
;
let
$c
=
255
;
while
(
$c
)
{
eval
DROP
TABLE
t
$c
;
dec
$c
;
}
SET
@@
global
.
query_cache_size
=
0
;
--
echo
End
of
5.1
tests
sql/sql_cache.cc
View file @
14887bb2
...
@@ -2516,7 +2516,7 @@ my_bool Query_cache::register_all_tables(Query_cache_block *block,
...
@@ -2516,7 +2516,7 @@ my_bool Query_cache::register_all_tables(Query_cache_block *block,
tmp
++
)
tmp
++
)
unlink_table
(
tmp
);
unlink_table
(
tmp
);
}
}
return
(
n
);
return
test
(
n
);
}
}
/*
/*
...
...
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