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
5a049ba8
Commit
5a049ba8
authored
Oct 30, 2006
by
msvensson@shellback.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge shellback.(none):/home/msvensson/mysql/mysql-5.0-maint
into shellback.(none):/home/msvensson/mysql/mysql-5.1-maint
parents
f11aa15c
e8c7f191
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
160 additions
and
140 deletions
+160
-140
mysql-test/include/mix1.inc
mysql-test/include/mix1.inc
+7
-2
mysql-test/r/innodb_mysql.result
mysql-test/r/innodb_mysql.result
+2
-4
sql/mysqld.cc
sql/mysqld.cc
+9
-1
sql/set_var.cc
sql/set_var.cc
+1
-1
sql/sql_class.cc
sql/sql_class.cc
+2
-3
sql/sql_class.h
sql/sql_class.h
+7
-2
storage/myisam/sort.c
storage/myisam/sort.c
+132
-127
No files found.
mysql-test/include/mix1.inc
View file @
5a049ba8
...
...
@@ -149,7 +149,8 @@ DROP TABLE t1, t2;
#
# Bug #22728 - Handler_rollback value is growing
#
flush
status
;
let
$before
=
`show /*!50002 GLOBAL */ status like 'Handler_rollback'`
;
create
table
t1
(
c1
int
)
engine
=
innodb
;
connect
(
con1
,
localhost
,
root
,,);
connect
(
con2
,
localhost
,
root
,,);
...
...
@@ -158,7 +159,11 @@ handler t1 open;
handler
t1
read
first
;
disconnect
con2
;
connection
con1
;
show
/*!50002 GLOBAL */
status
like
'Handler_rollback'
;
let
$after
=
`show /*!50002 GLOBAL */ status like 'Handler_rollback'`
;
# Compare the before and after value, it should be equal
--
disable_query_log
eval
select
STRCMP
(
"
$before
"
,
"
$after
"
)
as
"Before and after comparison"
;
--
enable_query_log
connection
default
;
drop
table
t1
;
disconnect
con1
;
...
...
mysql-test/r/innodb_mysql.result
View file @
5a049ba8
...
...
@@ -105,14 +105,12 @@ SELECT `id1` FROM `t1` WHERE `id1` NOT IN (SELECT `id1` FROM `t2` WHERE `id2` =
id1
2
DROP TABLE t1, t2;
flush status;
create table t1 (c1 int) engine=innodb;
handler t1 open;
handler t1 read first;
c1
show /*!50002 GLOBAL */ status like 'Handler_rollback';
Variable_name Value
Handler_rollback 0
Before and after comparison
0
drop table t1;
End of 4.1 tests
create table t1m (a int) engine = MEMORY;
...
...
sql/mysqld.cc
View file @
5a049ba8
...
...
@@ -6581,6 +6581,10 @@ static int show_ssl_get_cipher_list(THD *thd, SHOW_VAR *var, char *buff)
#endif
/* HAVE_OPENSSL */
/*
Variables shown by SHOW STATUS in alphabetical order
*/
SHOW_VAR
status_vars
[]
=
{
{
"Aborted_clients"
,
(
char
*
)
&
aborted_threads
,
SHOW_LONG
},
{
"Aborted_connects"
,
(
char
*
)
&
aborted_connects
,
SHOW_LONG
},
...
...
@@ -8088,16 +8092,20 @@ void refresh_status(THD *thd)
{
pthread_mutex_lock
(
&
LOCK_status
);
/*
We must update the global status before cleaning up the thread
*/
/*
Add thread's status variabes to global status
*/
add_to_status
(
&
global_status_var
,
&
thd
->
status_var
);
/* Reset thread's status variables */
bzero
((
char
*
)
&
thd
->
status_var
,
sizeof
(
thd
->
status_var
));
/* Reset some global variables */
for
(
SHOW_VAR
*
ptr
=
status_vars
;
ptr
->
name
;
ptr
++
)
{
/* Note that SHOW_LONG_NOFLUSH variables are not reset */
if
(
ptr
->
type
==
SHOW_LONG
)
*
(
ulong
*
)
ptr
->
value
=
0
;
}
/* Reset the counters of all key caches (default and named). */
process_key_caches
(
reset_key_cache_counters
);
pthread_mutex_unlock
(
&
LOCK_status
);
...
...
sql/set_var.cc
View file @
5a049ba8
...
...
@@ -743,7 +743,7 @@ static int show_slave_skip_errors(THD *thd, SHOW_VAR *var, char *buff)
#endif
/* HAVE_REPLICATION */
/*
Variables shown by SHOW
variables
in alphabetical order
Variables shown by SHOW
VARIABLES
in alphabetical order
*/
SHOW_VAR
init_vars
[]
=
{
...
...
sql/sql_class.cc
View file @
5a049ba8
...
...
@@ -513,14 +513,13 @@ THD::~THD()
void
add_to_status
(
STATUS_VAR
*
to_var
,
STATUS_VAR
*
from_var
)
{
ulong
*
end
=
(
ulong
*
)
((
byte
*
)
to_var
+
offsetof
(
STATUS_VAR
,
last_system_status_var
)
+
ulong
*
end
=
(
ulong
*
)
((
byte
*
)
to_var
+
offsetof
(
STATUS_VAR
,
last_system_status_var
)
+
sizeof
(
ulong
));
ulong
*
to
=
(
ulong
*
)
to_var
,
*
from
=
(
ulong
*
)
from_var
;
while
(
to
!=
end
)
*
(
to
++
)
+=
*
(
from
++
);
/* it doesn't make sense to add last_query_cost values */
}
/*
...
...
sql/sql_class.h
View file @
5a049ba8
...
...
@@ -337,12 +337,17 @@ typedef struct system_status_var
ulong
com_stmt_reset
;
ulong
com_stmt_close
;
/*
Status variables which it does not make sense to add to
global status variable counter
*/
double
last_query_cost
;
}
STATUS_VAR
;
/*
This is used for 'show status'. It must be updated to the last ulong
variable in system_status_var
This is used for 'SHOW STATUS'. It must be updated to the last ulong
variable in system_status_var which is makes sens to add to the global
counter
*/
#define last_system_status_var com_stmt_close
...
...
storage/myisam/sort.c
View file @
5a049ba8
...
...
@@ -322,6 +322,9 @@ pthread_handler_t thr_find_all_keys(void *arg)
if
(
my_thread_init
())
goto
err
;
{
/* Add extra block since DBUG_ENTER declare variables */
DBUG_ENTER
(
"thr_find_all_keys"
);
DBUG_PRINT
(
"enter"
,
(
"master: %d"
,
sort_param
->
master
));
if
(
sort_param
->
sort_info
->
got_error
)
...
...
@@ -361,7 +364,7 @@ pthread_handler_t thr_find_all_keys(void *arg)
uint
skr
;
do
{
skr
=
maxbuffer
;
skr
=
maxbuffer
;
if
(
memavl
<
sizeof
(
BUFFPEK
)
*
maxbuffer
||
(
keys
=
(
memavl
-
sizeof
(
BUFFPEK
)
*
maxbuffer
)
/
(
sort_length
+
sizeof
(
char
*
)))
<=
1
||
...
...
@@ -388,13 +391,15 @@ pthread_handler_t thr_find_all_keys(void *arg)
else
break
;
}
old_memavl
=
memavl
;
if
((
memavl
=
memavl
/
4
*
3
)
<
MIN_SORT_MEMORY
&&
old_memavl
>
MIN_SORT_MEMORY
)
memavl
=
MIN_SORT_MEMORY
;
old_memavl
=
memavl
;
if
((
memavl
=
memavl
/
4
*
3
)
<
MIN_SORT_MEMORY
&&
old_memavl
>
MIN_SORT_MEMORY
)
memavl
=
MIN_SORT_MEMORY
;
}
if
(
memavl
<
MIN_SORT_MEMORY
)
{
mi_check_print_error
(
sort_param
->
sort_info
->
param
,
"Sort buffer too small"
);
mi_check_print_error
(
sort_param
->
sort_info
->
param
,
"Sort buffer too small"
);
goto
err
;
/* purecov: tested */
}
...
...
@@ -403,8 +408,8 @@ pthread_handler_t thr_find_all_keys(void *arg)
sort_param
->
key
+
1
,
keys
);
sort_param
->
sort_keys
=
sort_keys
;
idx
=
error
=
0
;
sort_keys
[
0
]
=
(
uchar
*
)
(
sort_keys
+
keys
);
idx
=
error
=
0
;
sort_keys
[
0
]
=
(
uchar
*
)
(
sort_keys
+
keys
);
DBUG_PRINT
(
"info"
,
(
"reading keys"
));
while
(
!
(
error
=
sort_param
->
sort_info
->
got_error
)
&&
...
...
@@ -424,9 +429,9 @@ pthread_handler_t thr_find_all_keys(void *arg)
(
BUFFPEK
*
)
alloc_dynamic
(
&
sort_param
->
buffpek
),
&
sort_param
->
tempfile
))
goto
err
;
sort_keys
[
0
]
=
(
uchar
*
)
(
sort_keys
+
keys
);
sort_keys
[
0
]
=
(
uchar
*
)
(
sort_keys
+
keys
);
memcpy
(
sort_keys
[
0
],
sort_keys
[
idx
-
1
],
(
size_t
)
sort_param
->
key_length
);
idx
=
1
;
idx
=
1
;
}
sort_keys
[
idx
]
=
sort_keys
[
idx
-
1
]
+
sort_param
->
key_length
;
}
...
...
@@ -474,8 +479,8 @@ pthread_handler_t thr_find_all_keys(void *arg)
if
(
!--
sort_param
->
sort_info
->
threads_running
)
pthread_cond_signal
(
&
sort_param
->
sort_info
->
cond
);
pthread_mutex_unlock
(
&
sort_param
->
sort_info
->
mutex
);
DBUG_PRINT
(
"exit"
,
(
"======== ending thread ========"
));
}
my_thread_end
();
return
NULL
;
}
...
...
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