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
c40dabb6
Commit
c40dabb6
authored
Jul 27, 2007
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.1-opt
into magare.gmz:/home/kgeorge/mysql/autopush/B30000-5.1-opt
parents
d4776340
82c87c0a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
161 additions
and
11 deletions
+161
-11
mysql-test/r/show_check.result
mysql-test/r/show_check.result
+65
-5
mysql-test/t/show_check.test
mysql-test/t/show_check.test
+64
-0
sql/sql_parse.cc
sql/sql_parse.cc
+32
-6
No files found.
mysql-test/r/show_check.result
View file @
c40dabb6
...
...
@@ -790,13 +790,73 @@ show tables;
Tables_in_test
show status like 'slow_queries';
Variable_name Value
Slow_queries
1
Slow_queries
0
select 1 from information_schema.tables limit 1;
1
1
show status like 'slow_queries';
Variable_name Value
Slow_queries 2
Slow_queries 1
create table t1 (a int);
create trigger tr1 before insert on t1 for each row
begin
end;
create view v1 as select a from t1;
create procedure p1()
begin
end;
create function f1()
returns int
return 0;
create event e1 on schedule every 1 year starts now()
ends date_add(now(), interval 5 hour) do
begin
end;
flush status;
show databases;
show tables;
show events;
show table status;
show open tables;
show plugins;
show columns in t1;
show slave hosts;
show keys in t1;
show column types;
show table types;
show storage engines;
show authors;
show contributors;
show privileges;
show count(*) warnings;
show count(*) errors;
show warnings;
show status;
show processlist;
show variables;
show charset;
show collation;
show grants;
show create database test;
show create table t1;
show create view v1;
show master status;
show slave status;
show create procedure p1;
show create function f1;
show create trigger tr1;
show procedure status;
show procedure code p1;
show function code f1;
show create event e1;
show status like 'slow_queries';
Variable_name Value
Slow_queries 0
drop view v1;
drop table t1;
drop procedure p1;
drop function f1;
drop event e1;
DROP DATABASE IF EXISTS mysqltest1;
DROP TABLE IF EXISTS t1;
DROP VIEW IF EXISTS v1;
...
...
@@ -1157,7 +1217,7 @@ select 1 from information_schema.tables limit 1;
1
show status like 'slow_queries';
Variable_name Value
Slow_queries
2
Slow_queries
1
set global log_queries_not_using_indexes=OFF;
show variables like "log_queries_not_using_indexes";
Variable_name Value
...
...
@@ -1167,7 +1227,7 @@ select 1 from information_schema.tables limit 1;
1
show status like 'slow_queries';
Variable_name Value
Slow_queries
2
Slow_queries
1
set global log_queries_not_using_indexes=ON;
show variables like "log_queries_not_using_indexes";
Variable_name Value
...
...
@@ -1177,7 +1237,7 @@ select 1 from information_schema.tables limit 1;
1
show status like 'slow_queries';
Variable_name Value
Slow_queries
4
Slow_queries
2
End of 5.0 tests
SHOW AUTHORS;
create database mysqltest;
...
...
mysql-test/t/show_check.test
View file @
c40dabb6
...
...
@@ -549,6 +549,70 @@ show status like 'slow_queries';
# (mysqld is started with --log-queries-not-using-indexes)
select
1
from
information_schema
.
tables
limit
1
;
show
status
like
'slow_queries'
;
create
table
t1
(
a
int
);
create
trigger
tr1
before
insert
on
t1
for
each
row
begin
end
;
create
view
v1
as
select
a
from
t1
;
create
procedure
p1
()
begin
end
;
create
function
f1
()
returns
int
return
0
;
create
event
e1
on
schedule
every
1
year
starts
now
()
ends
date_add
(
now
(),
interval
5
hour
)
do
begin
end
;
--
disable_result_log
flush
status
;
show
databases
;
show
tables
;
show
events
;
show
table
status
;
show
open
tables
;
show
plugins
;
show
columns
in
t1
;
show
slave
hosts
;
show
keys
in
t1
;
show
column
types
;
show
table
types
;
show
storage
engines
;
show
authors
;
show
contributors
;
show
privileges
;
show
count
(
*
)
warnings
;
show
count
(
*
)
errors
;
show
warnings
;
show
status
;
show
processlist
;
show
variables
;
show
charset
;
show
collation
;
show
grants
;
show
create
database
test
;
show
create
table
t1
;
show
create
view
v1
;
show
master
status
;
show
slave
status
;
show
create
procedure
p1
;
show
create
function
f1
;
show
create
trigger
tr1
;
show
procedure
status
;
show
procedure
code
p1
;
show
function
code
f1
;
show
create
event
e1
;
--
enable_result_log
show
status
like
'slow_queries'
;
drop
view
v1
;
drop
table
t1
;
drop
procedure
p1
;
drop
function
f1
;
drop
event
e1
;
#
# BUG#10491: Server returns data as charset binary SHOW CREATE TABLE or SELECT
# FROM I_S.
...
...
sql/sql_parse.cc
View file @
c40dabb6
...
...
@@ -223,7 +223,6 @@ void init_update_queries(void)
sql_command_flags
[
SQLCOM_REPLACE_SELECT
]
=
CF_CHANGES_DATA
|
CF_HAS_ROW_COUNT
;
sql_command_flags
[
SQLCOM_SHOW_STATUS_PROC
]
=
CF_STATUS_COMMAND
;
sql_command_flags
[
SQLCOM_SHOW_STATUS_FUNC
]
=
CF_STATUS_COMMAND
;
sql_command_flags
[
SQLCOM_SHOW_STATUS
]
=
CF_STATUS_COMMAND
;
sql_command_flags
[
SQLCOM_SHOW_DATABASES
]
=
CF_STATUS_COMMAND
;
sql_command_flags
[
SQLCOM_SHOW_TRIGGERS
]
=
CF_STATUS_COMMAND
;
...
...
@@ -235,10 +234,36 @@ void init_update_queries(void)
sql_command_flags
[
SQLCOM_SHOW_VARIABLES
]
=
CF_STATUS_COMMAND
;
sql_command_flags
[
SQLCOM_SHOW_CHARSETS
]
=
CF_STATUS_COMMAND
;
sql_command_flags
[
SQLCOM_SHOW_COLLATIONS
]
=
CF_STATUS_COMMAND
;
sql_command_flags
[
SQLCOM_SHOW_STATUS_PROC
]
=
CF_STATUS_COMMAND
;
sql_command_flags
[
SQLCOM_SHOW_TABLES
]
=
(
CF_STATUS_COMMAND
|
CF_SHOW_TABLE_COMMAND
);
sql_command_flags
[
SQLCOM_SHOW_NEW_MASTER
]
=
CF_STATUS_COMMAND
;
sql_command_flags
[
SQLCOM_SHOW_BINLOGS
]
=
CF_STATUS_COMMAND
;
sql_command_flags
[
SQLCOM_SHOW_SLAVE_HOSTS
]
=
CF_STATUS_COMMAND
;
sql_command_flags
[
SQLCOM_SHOW_BINLOG_EVENTS
]
=
CF_STATUS_COMMAND
;
sql_command_flags
[
SQLCOM_SHOW_COLUMN_TYPES
]
=
CF_STATUS_COMMAND
;
sql_command_flags
[
SQLCOM_SHOW_STORAGE_ENGINES
]
=
CF_STATUS_COMMAND
;
sql_command_flags
[
SQLCOM_SHOW_AUTHORS
]
=
CF_STATUS_COMMAND
;
sql_command_flags
[
SQLCOM_SHOW_CONTRIBUTORS
]
=
CF_STATUS_COMMAND
;
sql_command_flags
[
SQLCOM_SHOW_PRIVILEGES
]
=
CF_STATUS_COMMAND
;
sql_command_flags
[
SQLCOM_SHOW_WARNS
]
=
CF_STATUS_COMMAND
;
sql_command_flags
[
SQLCOM_SHOW_ERRORS
]
=
CF_STATUS_COMMAND
;
sql_command_flags
[
SQLCOM_SHOW_ENGINE_STATUS
]
=
CF_STATUS_COMMAND
;
sql_command_flags
[
SQLCOM_SHOW_ENGINE_MUTEX
]
=
CF_STATUS_COMMAND
;
sql_command_flags
[
SQLCOM_SHOW_ENGINE_LOGS
]
=
CF_STATUS_COMMAND
;
sql_command_flags
[
SQLCOM_SHOW_PROCESSLIST
]
=
CF_STATUS_COMMAND
;
sql_command_flags
[
SQLCOM_SHOW_GRANTS
]
=
CF_STATUS_COMMAND
;
sql_command_flags
[
SQLCOM_SHOW_CREATE_DB
]
=
CF_STATUS_COMMAND
;
sql_command_flags
[
SQLCOM_SHOW_CREATE
]
=
CF_STATUS_COMMAND
;
sql_command_flags
[
SQLCOM_SHOW_MASTER_STAT
]
=
CF_STATUS_COMMAND
;
sql_command_flags
[
SQLCOM_SHOW_SLAVE_STAT
]
=
CF_STATUS_COMMAND
;
sql_command_flags
[
SQLCOM_SHOW_CREATE_PROC
]
=
CF_STATUS_COMMAND
;
sql_command_flags
[
SQLCOM_SHOW_CREATE_FUNC
]
=
CF_STATUS_COMMAND
;
sql_command_flags
[
SQLCOM_SHOW_CREATE_TRIGGER
]
=
CF_STATUS_COMMAND
;
sql_command_flags
[
SQLCOM_SHOW_STATUS_FUNC
]
=
CF_STATUS_COMMAND
;
sql_command_flags
[
SQLCOM_SHOW_PROC_CODE
]
=
CF_STATUS_COMMAND
;
sql_command_flags
[
SQLCOM_SHOW_FUNC_CODE
]
=
CF_STATUS_COMMAND
;
sql_command_flags
[
SQLCOM_SHOW_CREATE_EVENT
]
=
CF_STATUS_COMMAND
;
sql_command_flags
[
SQLCOM_SHOW_TABLES
]
=
(
CF_STATUS_COMMAND
|
CF_SHOW_TABLE_COMMAND
);
sql_command_flags
[
SQLCOM_SHOW_TABLE_STATUS
]
=
(
CF_STATUS_COMMAND
|
CF_SHOW_TABLE_COMMAND
);
...
...
@@ -1323,7 +1348,8 @@ void log_slow_statement(THD *thd)
thd
->
variables
.
long_query_time
||
((
thd
->
server_status
&
(
SERVER_QUERY_NO_INDEX_USED
|
SERVER_QUERY_NO_GOOD_INDEX_USED
))
&&
opt_log_queries_not_using_indexes
))
opt_log_queries_not_using_indexes
&&
!
(
sql_command_flags
[
thd
->
lex
->
sql_command
]
&
CF_STATUS_COMMAND
)))
{
thd
->
status_var
.
long_query_count
++
;
slow_log_print
(
thd
,
thd
->
query
,
thd
->
query_length
,
start_of_query
);
...
...
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