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
68acf8fd
Commit
68acf8fd
authored
Sep 06, 2005
by
ramil@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix (bug #10303: Misleading Last_query_cost value).
parent
c601bb87
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
43 additions
and
0 deletions
+43
-0
mysql-test/r/query_cache.result
mysql-test/r/query_cache.result
+16
-0
mysql-test/r/status.result
mysql-test/r/status.result
+6
-0
mysql-test/t/query_cache.test
mysql-test/t/query_cache.test
+13
-0
mysql-test/t/status.test
mysql-test/t/status.test
+7
-0
sql/sql_cache.cc
sql/sql_cache.cc
+1
-0
No files found.
mysql-test/r/query_cache.result
View file @
68acf8fd
...
...
@@ -1127,3 +1127,19 @@ Qcache_hits 9
drop procedure f1;
drop table t1;
set GLOBAL query_cache_size=0;
SET GLOBAL query_cache_size=102400;
create table t1(a int);
insert into t1 values(0), (1), (4), (5);
select * from t1 where a > 3;
a
4
5
select * from t1 where a > 3;
a
4
5
show status like 'last_query_cost';
Variable_name Value
Last_query_cost 0.000000
drop table t1;
SET GLOBAL query_cache_size=0;
mysql-test/r/status.result
View file @
68acf8fd
...
...
@@ -17,3 +17,9 @@ Variable_name Value
Table_locks_immediate 3
Table_locks_waited 1
drop table t1;
select 1;
1
1
show status like 'last_query_cost';
Variable_name Value
Last_query_cost 0.000000
mysql-test/t/query_cache.test
View file @
68acf8fd
...
...
@@ -816,3 +816,16 @@ drop table t1;
set
GLOBAL
query_cache_size
=
0
;
# End of 4.1 tests
#
# Bug #10303: problem with last_query_cost
#
SET
GLOBAL
query_cache_size
=
102400
;
create
table
t1
(
a
int
);
insert
into
t1
values
(
0
),
(
1
),
(
4
),
(
5
);
select
*
from
t1
where
a
>
3
;
select
*
from
t1
where
a
>
3
;
show
status
like
'last_query_cost'
;
drop
table
t1
;
SET
GLOBAL
query_cache_size
=
0
;
mysql-test/t/status.test
View file @
68acf8fd
...
...
@@ -37,3 +37,10 @@ show status like 'Table_lock%';
drop
table
t1
;
# End of 4.1 tests
#
# lost_query_cost
#
select
1
;
show
status
like
'last_query_cost'
;
sql/sql_cache.cc
View file @
68acf8fd
...
...
@@ -1178,6 +1178,7 @@ sql mode: 0x%lx, sort len: %lu, conncat len: %lu",
#endif
/*!EMBEDDED_LIBRARY*/
thd
->
limit_found_rows
=
query
->
found_rows
();
thd
->
status_var
.
last_query_cost
=
0.0
;
BLOCK_UNLOCK_RD
(
query_block
);
DBUG_RETURN
(
1
);
// Result sent to client
...
...
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