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
2ca4141a
Commit
2ca4141a
authored
Oct 09, 2015
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'merge-perfschema-5.6' into 10.0
parents
01be663c
1b41eed5
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
75 additions
and
3 deletions
+75
-3
mysql-test/suite/perfschema/r/misc.result
mysql-test/suite/perfschema/r/misc.result
+15
-0
mysql-test/suite/perfschema/t/misc.test
mysql-test/suite/perfschema/t/misc.test
+20
-0
storage/perfschema/ha_perfschema.cc
storage/perfschema/ha_perfschema.cc
+1
-1
storage/perfschema/pfs.cc
storage/perfschema/pfs.cc
+1
-0
storage/perfschema/pfs_timer.cc
storage/perfschema/pfs_timer.cc
+38
-2
No files found.
mysql-test/suite/perfschema/r/misc.result
View file @
2ca4141a
...
@@ -92,3 +92,18 @@ object_schema object_name index_name count_fetch count_insert count_update count
...
@@ -92,3 +92,18 @@ object_schema object_name index_name count_fetch count_insert count_update count
test t_60905 i 2 0 0 1
test t_60905 i 2 0 0 1
test t_60905 NULL 5 5 0 1
test t_60905 NULL 5 5 0 1
DROP TABLE t_60905;
DROP TABLE t_60905;
use test;
truncate performance_schema.events_statements_history;
truncate performance_schema.events_statements_history_long;
select * from t1;
ERROR 42S02: Table 'test.t1' doesn't exist
select mysql_errno, returned_sqlstate, message_text, errors, warnings
from performance_schema.events_statements_history where errors > 0;
mysql_errno returned_sqlstate message_text errors warnings
1146 42S02 Table 'test.t1' doesn't exist 1 0
select mysql_errno, returned_sqlstate, message_text, errors, warnings from
performance_schema.events_statements_history_long where errors > 0;
mysql_errno returned_sqlstate message_text errors warnings
1146 42S02 Table 'test.t1' doesn't exist 1 0
mysql-test/suite/perfschema/t/misc.test
View file @
2ca4141a
...
@@ -169,3 +169,23 @@ SELECT object_schema,
...
@@ -169,3 +169,23 @@ SELECT object_schema,
DROP
TABLE
t_60905
;
DROP
TABLE
t_60905
;
#
# Bug#11929832 - EVENTS_STATEMENTS_HISTORY HAS ERRORS=0 WHEN THERE ARE ERRORS
#
# Verify that SQL errors are properly counted.
use
test
;
truncate
performance_schema
.
events_statements_history
;
truncate
performance_schema
.
events_statements_history_long
;
--
error
ER_NO_SUCH_TABLE
select
*
from
t1
;
--
echo
select
mysql_errno
,
returned_sqlstate
,
message_text
,
errors
,
warnings
from
performance_schema
.
events_statements_history
where
errors
>
0
;
--
echo
select
mysql_errno
,
returned_sqlstate
,
message_text
,
errors
,
warnings
from
performance_schema
.
events_statements_history_long
where
errors
>
0
;
storage/perfschema/ha_perfschema.cc
View file @
2ca4141a
...
@@ -205,7 +205,7 @@ maria_declare_plugin(perfschema)
...
@@ -205,7 +205,7 @@ maria_declare_plugin(perfschema)
0x0001
,
0x0001
,
pfs_status_vars
,
pfs_status_vars
,
NULL
,
NULL
,
"5.6.2
6
"
,
"5.6.2
7
"
,
MariaDB_PLUGIN_MATURITY_STABLE
MariaDB_PLUGIN_MATURITY_STABLE
}
}
maria_declare_plugin_end
;
maria_declare_plugin_end
;
...
...
storage/perfschema/pfs.cc
View file @
2ca4141a
...
@@ -4832,6 +4832,7 @@ static void end_statement_v1(PSI_statement_locker *locker, void *stmt_da)
...
@@ -4832,6 +4832,7 @@ static void end_statement_v1(PSI_statement_locker *locker, void *stmt_da)
memcpy
(
pfs
->
m_message_text
,
da
->
message
(),
MYSQL_ERRMSG_SIZE
);
memcpy
(
pfs
->
m_message_text
,
da
->
message
(),
MYSQL_ERRMSG_SIZE
);
pfs
->
m_message_text
[
MYSQL_ERRMSG_SIZE
]
=
0
;
pfs
->
m_message_text
[
MYSQL_ERRMSG_SIZE
]
=
0
;
pfs
->
m_sql_errno
=
da
->
sql_errno
();
pfs
->
m_sql_errno
=
da
->
sql_errno
();
pfs
->
m_error_count
++
;
memcpy
(
pfs
->
m_sqlstate
,
da
->
get_sqlstate
(),
SQLSTATE_LENGTH
);
memcpy
(
pfs
->
m_sqlstate
,
da
->
get_sqlstate
(),
SQLSTATE_LENGTH
);
break
;
break
;
case
Diagnostics_area
:
:
DA_DISABLED
:
case
Diagnostics_area
:
:
DA_DISABLED
:
...
...
storage/perfschema/pfs_timer.cc
View file @
2ca4141a
/* Copyright (c) 2008, 201
2
, Oracle and/or its affiliates. All rights reserved.
/* Copyright (c) 2008, 201
5
, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
it under the terms of the GNU General Public License as published by
...
@@ -124,6 +124,42 @@ void init_timers(void)
...
@@ -124,6 +124,42 @@ void init_timers(void)
Pick best replacements.
Pick best replacements.
*/
*/
/*
For WAIT, the cycle timer is used by default. However, it is not available
on all architectures. Fall back to the nanosecond timer in this case. It is
unlikely that neither cycle nor nanosecond are available, but we continue
probing less resolution timers anyway for consistency with other events.
*/
if
(
cycle_to_pico
!=
0
)
{
/* Normal case. */
wait_timer
=
TIMER_NAME_CYCLE
;
}
else
if
(
nanosec_to_pico
!=
0
)
{
/* Robustness, no known cases. */
wait_timer
=
TIMER_NAME_NANOSEC
;
}
else
if
(
microsec_to_pico
!=
0
)
{
/* Robustness, no known cases. */
wait_timer
=
TIMER_NAME_MICROSEC
;
}
else
if
(
millisec_to_pico
!=
0
)
{
/* Robustness, no known cases. */
wait_timer
=
TIMER_NAME_MILLISEC
;
}
else
{
/*
Will never be reached on any architecture, but must provide a default if
no other timers are available.
*/
wait_timer
=
TIMER_NAME_TICK
;
}
/*
/*
For STAGE and STATEMENT, a timer with a fixed frequency is better.
For STAGE and STATEMENT, a timer with a fixed frequency is better.
The prefered timer is nanosecond, or lower resolutions.
The prefered timer is nanosecond, or lower resolutions.
...
@@ -174,7 +210,7 @@ void init_timers(void)
...
@@ -174,7 +210,7 @@ void init_timers(void)
else
if
(
millisec_to_pico
!=
0
)
else
if
(
millisec_to_pico
!=
0
)
{
{
/* Robustness, no known cases. */
/* Robustness, no known cases. */
idle
_timer
=
TIMER_NAME_MILLISEC
;
wait
_timer
=
TIMER_NAME_MILLISEC
;
}
}
else
if
(
tick_to_pico
!=
0
)
else
if
(
tick_to_pico
!=
0
)
{
{
...
...
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