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
360540e8
Commit
360540e8
authored
Oct 11, 2006
by
tsmith/tim@siva.hindu.god
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert patch for bug #19764, which did not work with prepared statements.
parent
f5c4d75e
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
5 additions
and
42 deletions
+5
-42
mysql-test/r/show_check.result
mysql-test/r/show_check.result
+1
-16
mysql-test/t/show_check-master.opt
mysql-test/t/show_check-master.opt
+0
-1
mysql-test/t/show_check.test
mysql-test/t/show_check.test
+1
-13
sql/sql_lex.cc
sql/sql_lex.cc
+0
-1
sql/sql_lex.h
sql/sql_lex.h
+0
-7
sql/sql_parse.cc
sql/sql_parse.cc
+3
-3
sql/sql_yacc.yy
sql/sql_yacc.yy
+0
-1
No files found.
mysql-test/r/show_check.result
View file @
360540e8
...
...
@@ -630,19 +630,4 @@ SHOW TABLES FROM no_such_database;
ERROR 42000: Unknown database 'no_such_database'
SHOW COLUMNS FROM no_such_table;
ERROR 42S02: Table 'test.no_such_table' doesn't exist
flush status;
show status like 'slow_queries';
Variable_name Value
Slow_queries 0
show tables;
Tables_in_test
show status like 'slow_queries';
Variable_name Value
Slow_queries 0
select 1 from information_schema.tables limit 1;
1
1
show status like 'slow_queries';
Variable_name Value
Slow_queries 1
End of 5.0 tests.
End of 5.0 tests
mysql-test/t/show_check-master.opt
deleted
100644 → 0
View file @
f5c4d75e
--log-slow-queries --log-long-format --log-queries-not-using-indexes
mysql-test/t/show_check.test
View file @
360540e8
...
...
@@ -507,16 +507,4 @@ SHOW TABLES FROM no_such_database;
SHOW
COLUMNS
FROM
no_such_table
;
#
# Bug #19764: SHOW commands end up in the slow log as table scans
#
flush
status
;
show
status
like
'slow_queries'
;
show
tables
;
show
status
like
'slow_queries'
;
# Table scan query, to ensure that slow_queries does still get incremented
# (mysqld is started with --log-queries-not-using-indexes)
select
1
from
information_schema
.
tables
limit
1
;
show
status
like
'slow_queries'
;
--
echo
End
of
5.0
tests
.
--
echo
End
of
5.0
tests
sql/sql_lex.cc
View file @
360540e8
...
...
@@ -173,7 +173,6 @@ void lex_start(THD *thd, uchar *buf,uint length)
lex
->
spcont
=
NULL
;
lex
->
proc_list
.
first
=
0
;
lex
->
escape_used
=
FALSE
;
lex
->
is_show_command
=
FALSE
;
lex
->
reset_query_tables_list
(
FALSE
);
lex
->
nest_level
=
0
;
...
...
sql/sql_lex.h
View file @
360540e8
...
...
@@ -1016,13 +1016,6 @@ typedef struct st_lex : public Query_tables_list
bool
escape_used
;
/*
Prevent SHOW commands from being written to the slow queries log.
This is fixed properly in MySQL 5.1, but a quick hack is used in 5.0
to achieve the same result.
*/
bool
is_show_command
;
st_lex
();
virtual
~
st_lex
()
...
...
sql/sql_parse.cc
View file @
360540e8
...
...
@@ -2150,10 +2150,10 @@ void log_slow_statement(THD *thd)
thd
->
end_time
();
// Set start time
/*
Do not log administrative
or SHOW statements unless the appropriate
option is
set; do not log into slow log if reading from backup.
Do not log administrative
statements unless the appropriate option is
set; do not log into slow log if reading from backup.
*/
if
(
thd
->
enable_slow_log
&&
!
thd
->
user_time
&&
!
thd
->
lex
->
is_show_command
)
if
(
thd
->
enable_slow_log
&&
!
thd
->
user_time
)
{
thd
->
proc_info
=
"logging slow query"
;
...
...
sql/sql_yacc.yy
View file @
360540e8
...
...
@@ -6412,7 +6412,6 @@ opt_table_sym:
show: SHOW
{
LEX *lex=Lex;
lex->is_show_command= TRUE;
lex->wild=0;
lex->lock_option= TL_READ;
mysql_init_select(lex);
...
...
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