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
0455e69b
Commit
0455e69b
authored
Nov 02, 2007
by
cmiller@zippy.cornsilk.net
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix several merge problems. There are many changes in 5.1 from 5.0
that affect profiling.
parent
e82bbb81
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
29 deletions
+27
-29
mysql-test/r/information_schema.result
mysql-test/r/information_schema.result
+0
-7
sql/sql_parse.cc
sql/sql_parse.cc
+3
-0
sql/sql_profile.cc
sql/sql_profile.cc
+20
-19
sql/sql_show.cc
sql/sql_show.cc
+3
-1
sql/sql_yacc.yy
sql/sql_yacc.yy
+1
-2
No files found.
mysql-test/r/information_schema.result
View file @
0455e69b
...
...
@@ -1402,13 +1402,6 @@ TABLE_PRIVILEGES information_schema.TABLE_PRIVILEGES 1
TRIGGERS information_schema.TRIGGERS 1
USER_PRIVILEGES information_schema.USER_PRIVILEGES 1
VIEWS information_schema.VIEWS 1
show global status like "Uptime_%";
Variable_name Value
Uptime_since_flush_status #
flush status;
show global status like "Uptime_%";
Variable_name Value
Uptime_since_flush_status #
create table t1(f1 int);
create view v1 as select f1+1 as a from t1;
create table t2 (f1 int, f2 int);
...
...
sql/sql_parse.cc
View file @
0455e69b
...
...
@@ -265,6 +265,8 @@ void init_update_queries(void)
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_PROFILES
]
=
CF_STATUS_COMMAND
;
sql_command_flags
[
SQLCOM_SHOW_PROFILE
]
=
CF_STATUS_COMMAND
;
sql_command_flags
[
SQLCOM_SHOW_TABLES
]
=
(
CF_STATUS_COMMAND
|
CF_SHOW_TABLE_COMMAND
);
...
...
@@ -1911,6 +1913,7 @@ mysql_execute_command(THD *thd)
case
SQLCOM_SHOW_CHARSETS
:
case
SQLCOM_SHOW_COLLATIONS
:
case
SQLCOM_SHOW_STORAGE_ENGINES
:
case
SQLCOM_SHOW_PROFILE
:
case
SQLCOM_SELECT
:
thd
->
status_var
.
last_query_cost
=
0.0
;
if
(
all_tables
)
...
...
sql/sql_profile.cc
View file @
0455e69b
...
...
@@ -34,6 +34,7 @@ int fill_query_profile_statistics_info(THD *thd, TABLE_LIST *tables,
#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER)
return
(
thd
->
profiling
.
fill_statistics_info
(
thd
,
tables
,
cond
));
#else
my_error
(
ER_FEATURE_DISABLED
,
MYF
(
0
),
"SHOW PROFILE"
,
"enable-profiling"
);
return
(
1
);
#endif
}
...
...
@@ -41,24 +42,24 @@ int fill_query_profile_statistics_info(THD *thd, TABLE_LIST *tables,
ST_FIELD_INFO
query_profile_statistics_info
[]
=
{
/* name, length, type, value, maybe_null, old_name, open_method */
{
"QUERY_ID"
,
20
,
MYSQL_TYPE_LONG
,
0
,
false
,
NULL
,
SKIP_OPEN_TABLE
},
{
"SEQ"
,
20
,
MYSQL_TYPE_LONG
,
0
,
false
,
NULL
,
SKIP_OPEN_TABLE
},
{
"STATE"
,
30
,
MYSQL_TYPE_STRING
,
0
,
false
,
NULL
,
SKIP_OPEN_TABLE
},
{
"DURATION"
,
TIME_FLOAT_DIGITS
,
MYSQL_TYPE_DOUBLE
,
0
,
false
,
NULL
,
SKIP_OPEN_TABLE
},
{
"CPU_USER"
,
TIME_FLOAT_DIGITS
,
MYSQL_TYPE_DOUBLE
,
0
,
true
,
NULL
,
SKIP_OPEN_TABLE
},
{
"CPU_SYSTEM"
,
TIME_FLOAT_DIGITS
,
MYSQL_TYPE_DOUBLE
,
0
,
true
,
NULL
,
SKIP_OPEN_TABLE
},
{
"CONTEXT_VOLUNTARY"
,
20
,
MYSQL_TYPE_LONG
,
0
,
true
,
NULL
,
SKIP_OPEN_TABLE
},
{
"CONTEXT_INVOLUNTARY"
,
20
,
MYSQL_TYPE_LONG
,
0
,
true
,
NULL
,
SKIP_OPEN_TABLE
},
{
"BLOCK_OPS_IN"
,
20
,
MYSQL_TYPE_LONG
,
0
,
true
,
NULL
,
SKIP_OPEN_TABLE
},
{
"BLOCK_OPS_OUT"
,
20
,
MYSQL_TYPE_LONG
,
0
,
true
,
NULL
,
SKIP_OPEN_TABLE
},
{
"MESSAGES_SENT"
,
20
,
MYSQL_TYPE_LONG
,
0
,
true
,
NULL
,
SKIP_OPEN_TABLE
},
{
"MESSAGES_RECEIVED"
,
20
,
MYSQL_TYPE_LONG
,
0
,
true
,
NULL
,
SKIP_OPEN_TABLE
},
{
"PAGE_FAULTS_MAJOR"
,
20
,
MYSQL_TYPE_LONG
,
0
,
true
,
NULL
,
SKIP_OPEN_TABLE
},
{
"PAGE_FAULTS_MINOR"
,
20
,
MYSQL_TYPE_LONG
,
0
,
true
,
NULL
,
SKIP_OPEN_TABLE
},
{
"SWAPS"
,
20
,
MYSQL_TYPE_LONG
,
0
,
true
,
NULL
,
SKIP_OPEN_TABLE
},
{
"SOURCE_FUNCTION"
,
30
,
MYSQL_TYPE_STRING
,
0
,
true
,
NULL
,
SKIP_OPEN_TABLE
},
{
"SOURCE_FILE"
,
20
,
MYSQL_TYPE_STRING
,
0
,
true
,
NULL
,
SKIP_OPEN_TABLE
},
{
"SOURCE_LINE"
,
20
,
MYSQL_TYPE_LONG
,
0
,
true
,
NULL
,
SKIP_OPEN_TABLE
},
{
"QUERY_ID"
,
20
,
MYSQL_TYPE_LONG
,
0
,
false
,
"Query_id"
,
SKIP_OPEN_TABLE
},
{
"SEQ"
,
20
,
MYSQL_TYPE_LONG
,
0
,
false
,
"Seq"
,
SKIP_OPEN_TABLE
},
{
"STATE"
,
30
,
MYSQL_TYPE_STRING
,
0
,
false
,
"Status"
,
SKIP_OPEN_TABLE
},
{
"DURATION"
,
TIME_FLOAT_DIGITS
,
MYSQL_TYPE_DOUBLE
,
0
,
false
,
"Duration"
,
SKIP_OPEN_TABLE
},
{
"CPU_USER"
,
TIME_FLOAT_DIGITS
,
MYSQL_TYPE_DOUBLE
,
0
,
true
,
"CPU_user"
,
SKIP_OPEN_TABLE
},
{
"CPU_SYSTEM"
,
TIME_FLOAT_DIGITS
,
MYSQL_TYPE_DOUBLE
,
0
,
true
,
"CPU_system"
,
SKIP_OPEN_TABLE
},
{
"CONTEXT_VOLUNTARY"
,
20
,
MYSQL_TYPE_LONG
,
0
,
true
,
"Context_voluntary"
,
SKIP_OPEN_TABLE
},
{
"CONTEXT_INVOLUNTARY"
,
20
,
MYSQL_TYPE_LONG
,
0
,
true
,
"Context_involuntary"
,
SKIP_OPEN_TABLE
},
{
"BLOCK_OPS_IN"
,
20
,
MYSQL_TYPE_LONG
,
0
,
true
,
"Block_ops_in"
,
SKIP_OPEN_TABLE
},
{
"BLOCK_OPS_OUT"
,
20
,
MYSQL_TYPE_LONG
,
0
,
true
,
"Block_ops_out"
,
SKIP_OPEN_TABLE
},
{
"MESSAGES_SENT"
,
20
,
MYSQL_TYPE_LONG
,
0
,
true
,
"Messages_sent"
,
SKIP_OPEN_TABLE
},
{
"MESSAGES_RECEIVED"
,
20
,
MYSQL_TYPE_LONG
,
0
,
true
,
"Messages_received"
,
SKIP_OPEN_TABLE
},
{
"PAGE_FAULTS_MAJOR"
,
20
,
MYSQL_TYPE_LONG
,
0
,
true
,
"Page_faults_major"
,
SKIP_OPEN_TABLE
},
{
"PAGE_FAULTS_MINOR"
,
20
,
MYSQL_TYPE_LONG
,
0
,
true
,
"Page_faults_minor"
,
SKIP_OPEN_TABLE
},
{
"SWAPS"
,
20
,
MYSQL_TYPE_LONG
,
0
,
true
,
"Swaps"
,
SKIP_OPEN_TABLE
},
{
"SOURCE_FUNCTION"
,
30
,
MYSQL_TYPE_STRING
,
0
,
true
,
"Source_function"
,
SKIP_OPEN_TABLE
},
{
"SOURCE_FILE"
,
20
,
MYSQL_TYPE_STRING
,
0
,
true
,
"Source_file"
,
SKIP_OPEN_TABLE
},
{
"SOURCE_LINE"
,
20
,
MYSQL_TYPE_LONG
,
0
,
true
,
"Source_line"
,
SKIP_OPEN_TABLE
},
{
NULL
,
0
,
MYSQL_TYPE_STRING
,
0
,
true
,
NULL
,
NULL
}
};
...
...
@@ -513,7 +514,7 @@ int PROFILING::fill_statistics_info(THD *thd, TABLE_LIST *tables, Item *cond)
{
entry
=
query
->
entries
.
iterator_value
(
entry_iterator
);
if
(
thd
->
lex
->
orig_
sql_command
==
SQLCOM_SHOW_PROFILE
)
if
(
thd
->
lex
->
sql_command
==
SQLCOM_SHOW_PROFILE
)
{
/*
We got here via a SHOW command. That means that we stored
...
...
sql/sql_show.cc
View file @
0455e69b
...
...
@@ -6507,6 +6507,7 @@ ST_SCHEMA_TABLE schema_tables[]=
get_all_tables
,
0
,
get_schema_key_column_usage_record
,
4
,
5
,
0
,
OPEN_TABLE_ONLY
},
{
"OPEN_TABLES"
,
open_tables_fields_info
,
create_schema_table
,
fill_open_tables
,
make_old_format
,
0
,
-
1
,
-
1
,
1
,
0
},
{
"PARTITIONS"
,
partitions_fields_info
,
create_schema_table
,
get_all_tables
,
0
,
get_schema_partitions_record
,
1
,
2
,
0
,
OPEN_TABLE_ONLY
},
{
"PLUGINS"
,
plugin_fields_info
,
create_schema_table
,
...
...
@@ -6514,7 +6515,8 @@ ST_SCHEMA_TABLE schema_tables[]=
{
"PROCESSLIST"
,
processlist_fields_info
,
create_schema_table
,
fill_schema_processlist
,
make_old_format
,
0
,
-
1
,
-
1
,
0
,
0
},
{
"PROFILING"
,
query_profile_statistics_info
,
create_schema_table
,
fill_query_profile_statistics_info
,
NULL
,
NULL
,
-
1
,
-
1
,
false
},
fill_query_profile_statistics_info
,
make_profile_table_for_show
,
NULL
,
-
1
,
-
1
,
false
,
0
},
{
"REFERENTIAL_CONSTRAINTS"
,
referential_constraints_fields_info
,
create_schema_table
,
get_all_tables
,
0
,
get_referential_constraints_record
,
1
,
9
,
0
,
OPEN_TABLE_ONLY
},
...
...
sql/sql_yacc.yy
View file @
0455e69b
...
...
@@ -9094,8 +9094,7 @@ show_param:
| PROFILE_SYM opt_profile_defs opt_profile_args opt_limit_clause_init
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_SELECT;
lex->orig_sql_command= SQLCOM_SHOW_PROFILE;
lex->sql_command= SQLCOM_SHOW_PROFILE;
if (prepare_schema_table(YYTHD, lex, NULL, SCH_PROFILES) != 0)
YYABORT;
}
...
...
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