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
a4b3a9d3
Commit
a4b3a9d3
authored
Apr 02, 2007
by
Kristofer.Pettersson@naruto
Browse files
Options
Browse Files
Download
Plain Diff
Merge naruto.:C:/cpp/bug26174/my51-bug26174
into naruto.:C:/cpp/mysql-5.1-runtime
parents
c392623b
f85f0950
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
100 additions
and
18 deletions
+100
-18
mysql-test/r/information_schema.result
mysql-test/r/information_schema.result
+28
-0
mysql-test/t/information_schema.test
mysql-test/t/information_schema.test
+40
-0
sql/mysqld.cc
sql/mysqld.cc
+32
-18
No files found.
mysql-test/r/information_schema.result
View file @
a4b3a9d3
...
...
@@ -1408,4 +1408,32 @@ select user,db from information_schema.processlist;
user db
user3148 test
drop user user3148@localhost;
DROP TABLE IF EXISTS thread_status;
CREATE TABLE thread_status (variable_name VARCHAR(64),
variable_value DECIMAL(22,7));
CREATE TABLE server_status (variable_name VARCHAR(64),
variable_value DECIMAL(22,7));
DROP EVENT IF EXISTS log_status;
CREATE EVENT log_status
ON SCHEDULE EVERY 1 SECOND
DO
BEGIN
INSERT INTO thread_status SELECT variable_name, variable_value FROM
information_schema.session_status;
INSERT INTO server_status SELECT variable_name, variable_value FROM
information_schema.global_status;
END$$
SET GLOBAL event_scheduler=1;
SELECT * FROM thread_status WHERE variable_name LIKE 'SSL%' LIMIT 1,2;
variable_name variable_value
SSL_ACCEPTS 0.0000000
SSL_CALLBACK_CACHE_HITS 0.0000000
SELECT variable_name FROM server_status LIMIT 1,2;
variable_name
ABORTED_CONNECTS
BINLOG_CACHE_DISK_USE
DROP EVENT log_status;
DROP TABLE thread_status;
DROP TABLE server_status;
SET GLOBAL event_scheduler=0;
End of 5.1 tests.
mysql-test/t/information_schema.test
View file @
a4b3a9d3
...
...
@@ -1042,5 +1042,45 @@ select user,db from information_schema.processlist;
connection
default
;
drop
user
user3148
@
localhost
;
#
# Bug #26174 Server Crash: INSERT ... SELECT ... FROM I_S.GLOBAL_STATUS in Event
#
--
disable_warnings
DROP
TABLE
IF
EXISTS
thread_status
;
CREATE
TABLE
thread_status
(
variable_name
VARCHAR
(
64
),
variable_value
DECIMAL
(
22
,
7
));
CREATE
TABLE
server_status
(
variable_name
VARCHAR
(
64
),
variable_value
DECIMAL
(
22
,
7
));
DROP
EVENT
IF
EXISTS
log_status
;
--
enable_warnings
DELIMITER
$$
;
CREATE
EVENT
log_status
ON
SCHEDULE
EVERY
1
SECOND
DO
BEGIN
INSERT
INTO
thread_status
SELECT
variable_name
,
variable_value
FROM
information_schema
.
session_status
;
INSERT
INTO
server_status
SELECT
variable_name
,
variable_value
FROM
information_schema
.
global_status
;
END
$$
DELIMITER
;
$$
SET
GLOBAL
event_scheduler
=
1
;
sleep
1
;
SELECT
*
FROM
thread_status
WHERE
variable_name
LIKE
'SSL%'
LIMIT
1
,
2
;
SELECT
variable_name
FROM
server_status
LIMIT
1
,
2
;
DROP
EVENT
log_status
;
DROP
TABLE
thread_status
;
DROP
TABLE
server_status
;
SET
GLOBAL
event_scheduler
=
0
;
--
echo
End
of
5.1
tests
.
sql/mysqld.cc
View file @
a4b3a9d3
...
...
@@ -6729,12 +6729,20 @@ static int show_ssl_ctx_get_session_cache_mode(THD *thd, SHOW_VAR *var, char *bu
return
0
;
}
/* Functions relying on SSL */
/*
Functions relying on SSL
Note: In the show_ssl_* functions, we need to check if we have a
valid vio-object since this isn't always true, specifically
when session_status or global_status is requested from
inside an Event.
*/
static
int
show_ssl_get_version
(
THD
*
thd
,
SHOW_VAR
*
var
,
char
*
buff
)
{
var
->
type
=
SHOW_CHAR
;
var
->
value
=
const_cast
<
char
*>
(
thd
->
net
.
vio
->
ssl_arg
?
SSL_get_version
((
SSL
*
)
thd
->
net
.
vio
->
ssl_arg
)
:
""
);
if
(
thd
->
vio_ok
()
&&
thd
->
net
.
vio
->
ssl_arg
)
var
->
value
=
const_cast
<
char
*>
(
SSL_get_version
((
SSL
*
)
thd
->
net
.
vio
->
ssl_arg
));
else
var
->
value
=
""
;
return
0
;
}
...
...
@@ -6742,9 +6750,10 @@ static int show_ssl_session_reused(THD *thd, SHOW_VAR *var, char *buff)
{
var
->
type
=
SHOW_LONG
;
var
->
value
=
buff
;
*
((
long
*
)
buff
)
=
(
long
)
thd
->
net
.
vio
->
ssl_arg
?
SSL_session_reused
((
SSL
*
)
thd
->
net
.
vio
->
ssl_arg
)
:
0
;
if
(
thd
->
vio_ok
()
&&
thd
->
net
.
vio
->
ssl_arg
)
*
((
long
*
)
buff
)
=
(
long
)
SSL_session_reused
((
SSL
*
)
thd
->
net
.
vio
->
ssl_arg
);
else
*
((
long
*
)
buff
)
=
0
;
return
0
;
}
...
...
@@ -6752,9 +6761,10 @@ static int show_ssl_get_default_timeout(THD *thd, SHOW_VAR *var, char *buff)
{
var
->
type
=
SHOW_LONG
;
var
->
value
=
buff
;
*
((
long
*
)
buff
)
=
(
long
)
thd
->
net
.
vio
->
ssl_arg
?
SSL_get_default_timeout
((
SSL
*
)
thd
->
net
.
vio
->
ssl_arg
)
:
0
;
if
(
thd
->
vio_ok
()
&&
thd
->
net
.
vio
->
ssl_arg
)
*
((
long
*
)
buff
)
=
(
long
)
SSL_get_default_timeout
((
SSL
*
)
thd
->
net
.
vio
->
ssl_arg
);
else
*
((
long
*
)
buff
)
=
0
;
return
0
;
}
...
...
@@ -6762,9 +6772,10 @@ static int show_ssl_get_verify_mode(THD *thd, SHOW_VAR *var, char *buff)
{
var
->
type
=
SHOW_LONG
;
var
->
value
=
buff
;
*
((
long
*
)
buff
)
=
(
long
)
thd
->
net
.
vio
->
ssl_arg
?
SSL_get_verify_mode
((
SSL
*
)
thd
->
net
.
vio
->
ssl_arg
)
:
0
;
if
(
thd
->
net
.
vio
&&
thd
->
net
.
vio
->
ssl_arg
)
*
((
long
*
)
buff
)
=
(
long
)
SSL_get_verify_mode
((
SSL
*
)
thd
->
net
.
vio
->
ssl_arg
);
else
*
((
long
*
)
buff
)
=
0
;
return
0
;
}
...
...
@@ -6772,17 +6783,20 @@ static int show_ssl_get_verify_depth(THD *thd, SHOW_VAR *var, char *buff)
{
var
->
type
=
SHOW_LONG
;
var
->
value
=
buff
;
*
((
long
*
)
buff
)
=
(
long
)
thd
->
net
.
vio
->
ssl_arg
?
SSL_get_verify_depth
((
SSL
*
)
thd
->
net
.
vio
->
ssl_arg
)
:
0
;
if
(
thd
->
vio_ok
()
&&
thd
->
net
.
vio
->
ssl_arg
)
*
((
long
*
)
buff
)
=
(
long
)
SSL_get_verify_depth
((
SSL
*
)
thd
->
net
.
vio
->
ssl_arg
);
else
*
((
long
*
)
buff
)
=
0
;
return
0
;
}
static
int
show_ssl_get_cipher
(
THD
*
thd
,
SHOW_VAR
*
var
,
char
*
buff
)
{
var
->
type
=
SHOW_CHAR
;
var
->
value
=
const_cast
<
char
*>
(
thd
->
net
.
vio
->
ssl_arg
?
SSL_get_cipher
((
SSL
*
)
thd
->
net
.
vio
->
ssl_arg
)
:
""
);
if
(
thd
->
vio_ok
()
&&
thd
->
net
.
vio
->
ssl_arg
)
var
->
value
=
const_cast
<
char
*>
(
SSL_get_cipher
((
SSL
*
)
thd
->
net
.
vio
->
ssl_arg
));
else
var
->
value
=
""
;
return
0
;
}
...
...
@@ -6790,7 +6804,7 @@ static int show_ssl_get_cipher_list(THD *thd, SHOW_VAR *var, char *buff)
{
var
->
type
=
SHOW_CHAR
;
var
->
value
=
buff
;
if
(
thd
->
net
.
vio
->
ssl_arg
)
if
(
thd
->
vio_ok
()
&&
thd
->
net
.
vio
->
ssl_arg
)
{
int
i
;
const
char
*
p
;
...
...
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