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
9952c560
Commit
9952c560
authored
Jul 14, 2010
by
Georgi Kodinov
Browse files
Options
Browse Files
Download
Plain Diff
merge
parents
7965b2d0
16a73088
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
7 deletions
+16
-7
sql/sql_class.cc
sql/sql_class.cc
+6
-0
sql/sql_class.h
sql/sql_class.h
+10
-7
No files found.
sql/sql_class.cc
View file @
9952c560
...
...
@@ -1168,6 +1168,9 @@ void add_to_status(STATUS_VAR *to_var, STATUS_VAR *from_var)
while
(
to
!=
end
)
*
(
to
++
)
+=
*
(
from
++
);
to_var
->
bytes_received
+=
from_var
->
bytes_received
;
to_var
->
bytes_sent
+=
from_var
->
bytes_sent
;
}
/*
...
...
@@ -1193,6 +1196,9 @@ void add_diff_to_status(STATUS_VAR *to_var, STATUS_VAR *from_var,
while
(
to
!=
end
)
*
(
to
++
)
+=
*
(
from
++
)
-
*
(
dec
++
);
to_var
->
bytes_received
+=
from_var
->
bytes_received
-
dec_var
->
bytes_received
;;
to_var
->
bytes_sent
+=
from_var
->
bytes_sent
-
dec_var
->
bytes_sent
;
}
...
...
sql/sql_class.h
View file @
9952c560
...
...
@@ -476,12 +476,14 @@ typedef struct system_variables
}
SV
;
/* per thread status variables */
/**
Per thread status variables.
Must be long/ulong up to last_system_status_var so that
add_to_status/add_diff_to_status can work.
*/
typedef
struct
system_status_var
{
ulonglong
bytes_received
;
ulonglong
bytes_sent
;
ulong
com_other
;
ulong
com_stat
[(
uint
)
SQLCOM_END
];
ulong
created_tmp_disk_tables
;
...
...
@@ -537,13 +539,14 @@ typedef struct system_status_var
Number of statements sent from the client
*/
ulong
questions
;
ulonglong
bytes_received
;
ulonglong
bytes_sent
;
/*
IMPORTANT!
SEE last_system_status_var DEFINITION BELOW.
Below 'last_system_status_var' are all variables which doesn't make any
sense to add to the /global/ status variable counter.
Status variables which it does not make sense to add to
global status variable counter
Below 'last_system_status_var' are all variables that cannot be handled
automatically by add_to_status()/add_diff_to_status().
*/
double
last_query_cost
;
}
STATUS_VAR
;
...
...
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