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
0c0a170f
Commit
0c0a170f
authored
Dec 13, 2001
by
monty@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix that SHOW STATUS works with SSL.
Add 4.0 commands to SHOW STATUS.
parent
6aeb40bd
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
63 additions
and
29 deletions
+63
-29
Docs/manual.texi
Docs/manual.texi
+1
-0
mysql-test/r/innodb.result
mysql-test/r/innodb.result
+1
-1
sql/mysqld.cc
sql/mysqld.cc
+9
-1
sql/sql_lex.h
sql/sql_lex.h
+1
-1
sql/sql_parse.cc
sql/sql_parse.cc
+1
-1
sql/sql_show.cc
sql/sql_show.cc
+49
-24
sql/sql_yacc.yy
sql/sql_yacc.yy
+1
-1
No files found.
Docs/manual.texi
View file @
0c0a170f
...
...
@@ -22819,6 +22819,7 @@ snapshot.
listing of slaves currently registered with the master (Master)
@item @code{SHOW SLAVE STATUS} @tab Provides status information on essential parameters of the slave thread. (Slave)
@item @code{SHOW MASTER LOGS} @tab Only available starting in Version
3.23.28. Lists the binary logs on the master. You should use this
command prior to @code{PURGE MASTER LOGS TO} to find out how far you
mysql-test/r/innodb.result
View file @
0c0a170f
...
...
@@ -900,7 +900,7 @@ explain select a,b,c from t1;
table type possible_keys key key_len ref rows Extra
t1 ALL NULL NULL NULL NULL 4
drop table t1;
create table t1 (testint int not null default 1);
create table t1 (testint int not null default 1)
type=innodb
;
desc t1;
Field Type Null Key Default Extra
testint int(11) 1
...
...
sql/mysqld.cc
View file @
0c0a170f
...
...
@@ -3147,16 +3147,21 @@ struct show_var_st status_vars[]= {
{
"Com_create_index"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_CREATE_INDEX
),
SHOW_LONG
},
{
"Com_create_table"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_CREATE_TABLE
),
SHOW_LONG
},
{
"Com_delete"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_DELETE
),
SHOW_LONG
},
{
"Com_delete_multi"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_DELETE_MULTI
),
SHOW_LONG
},
{
"Com_drop_db"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_DROP_DB
),
SHOW_LONG
},
{
"Com_drop_function"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_DROP_FUNCTION
),
SHOW_LONG
},
{
"Com_drop_index"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_DROP_INDEX
),
SHOW_LONG
},
{
"Com_drop_table"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_DROP_TABLE
),
SHOW_LONG
},
{
"Com_flush"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_FLUSH
),
SHOW_LONG
},
{
"Com_grant"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_GRANT
),
SHOW_LONG
},
{
"Com_ha_close"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_HA_OPEN
),
SHOW_LONG
},
{
"Com_ha_open"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_HA_OPEN
),
SHOW_LONG
},
{
"Com_ha_read"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_HA_READ
),
SHOW_LONG
},
{
"Com_insert"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_INSERT
),
SHOW_LONG
},
{
"Com_insert_select"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_INSERT_SELECT
),
SHOW_LONG
},
{
"Com_kill"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_KILL
),
SHOW_LONG
},
{
"Com_load"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_LOAD
),
SHOW_LONG
},
{
"Com_load_master_data"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_LOAD_MASTER_DATA
),
SHOW_LONG
},
{
"Com_load_master_table"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_LOAD_MASTER_TABLE
),
SHOW_LONG
},
{
"Com_lock_tables"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_LOCK_TABLES
),
SHOW_LONG
},
{
"Com_optimize"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_OPTIMIZE
),
SHOW_LONG
},
...
...
@@ -3171,6 +3176,7 @@ struct show_var_st status_vars[]= {
{
"Com_rollback"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_ROLLBACK
),
SHOW_LONG
},
{
"Com_select"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_SELECT
),
SHOW_LONG
},
{
"Com_set_option"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_SET_OPTION
),
SHOW_LONG
},
{
"Com_show_binlog_events"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_SHOW_BINLOG_EVENTS
),
SHOW_LONG
},
{
"Com_show_binlogs"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_SHOW_BINLOGS
),
SHOW_LONG
},
{
"Com_show_create"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_SHOW_CREATE
),
SHOW_LONG
},
{
"Com_show_databases"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_SHOW_DATABASES
),
SHOW_LONG
},
...
...
@@ -3178,9 +3184,11 @@ struct show_var_st status_vars[]= {
{
"Com_show_grants"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_SHOW_GRANTS
),
SHOW_LONG
},
{
"Com_show_keys"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_SHOW_KEYS
),
SHOW_LONG
},
{
"Com_show_logs"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_SHOW_LOGS
),
SHOW_LONG
},
{
"Com_show_master_STAT"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_SHOW_MASTER_STAT
),
SHOW_LONG
},
{
"Com_show_master_stat"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_SHOW_MASTER_STAT
),
SHOW_LONG
},
{
"Com_show_new_master"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_SHOW_NEW_MASTER
),
SHOW_LONG
},
{
"Com_show_open_tables"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_SHOW_OPEN_TABLES
),
SHOW_LONG
},
{
"Com_show_processlist"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_SHOW_PROCESSLIST
),
SHOW_LONG
},
{
"Com_show_slave_hosts"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_SHOW_SLAVE_HOSTS
),
SHOW_LONG
},
{
"Com_show_slave_stat"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_SHOW_SLAVE_STAT
),
SHOW_LONG
},
{
"Com_show_status"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_SHOW_STATUS
),
SHOW_LONG
},
{
"Com_show_tables"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_SHOW_TABLES
),
SHOW_LONG
},
...
...
sql/sql_lex.h
View file @
0c0a170f
...
...
@@ -55,7 +55,7 @@ enum enum_sql_command {
SQLCOM_RESET
,
SQLCOM_PURGE
,
SQLCOM_SHOW_BINLOGS
,
SQLCOM_SHOW_OPEN_TABLES
,
SQLCOM_LOAD_MASTER_DATA
,
SQLCOM_HA_OPEN
,
SQLCOM_HA_CLOSE
,
SQLCOM_HA_READ
,
SQLCOM_SHOW_SLAVE_HOSTS
,
SQLCOM_
MULTI_DELETE
,
SQLCOM_SHOW_SLAVE_HOSTS
,
SQLCOM_
DELETE_MULTI
,
SQLCOM_SHOW_BINLOG_EVENTS
,
SQLCOM_SHOW_NEW_MASTER
,
SQLCOM_END
};
...
...
sql/sql_parse.cc
View file @
0c0a170f
...
...
@@ -1691,7 +1691,7 @@ mysql_execute_command(void)
select_lex
->
options
);
break
;
}
case
SQLCOM_
MULTI_DELETE
:
case
SQLCOM_
DELETE_MULTI
:
{
TABLE_LIST
*
aux_tables
=
(
TABLE_LIST
*
)
thd
->
lex
.
auxilliary_table_list
.
first
;
TABLE_LIST
*
auxi
;
...
...
sql/sql_show.cc
View file @
0c0a170f
...
...
@@ -1180,65 +1180,85 @@ int mysqld_show(THD *thd, const char *wild, show_var_st *variables)
/* First group - functions relying on CTX */
case
SHOW_SSL_CTX_SESS_ACCEPT
:
net_store_data
(
&
packet2
,(
uint32
)
SSL_CTX_sess_accept
(
ssl_acceptor_fd
->
ssl_context_
));
(
!
ssl_acceptor_fd
?
0
:
SSL_CTX_sess_accept
(
ssl_acceptor_fd
->
ssl_context_
)));
break
;
case
SHOW_SSL_CTX_SESS_ACCEPT_GOOD
:
net_store_data
(
&
packet2
,(
uint32
)
SSL_CTX_sess_accept_good
(
ssl_acceptor_fd
->
ssl_context_
));
(
!
ssl_acceptor_fd
?
0
:
SSL_CTX_sess_accept_good
(
ssl_acceptor_fd
->
ssl_context_
)));
break
;
case
SHOW_SSL_CTX_SESS_CONNECT_GOOD
:
net_store_data
(
&
packet2
,(
uint32
)
SSL_CTX_sess_connect_good
(
ssl_acceptor_fd
->
ssl_context_
));
(
!
ssl_acceptor_fd
?
0
:
SSL_CTX_sess_connect_good
(
ssl_acceptor_fd
->
ssl_context_
)));
break
;
case
SHOW_SSL_CTX_SESS_ACCEPT_RENEGOTIATE
:
net_store_data
(
&
packet2
,(
uint32
)
SSL_CTX_sess_accept_renegotiate
(
ssl_acceptor_fd
->
ssl_context_
));
(
!
ssl_acceptor_fd
?
0
:
SSL_CTX_sess_accept_renegotiate
(
ssl_acceptor_fd
->
ssl_context_
)));
break
;
case
SHOW_SSL_CTX_SESS_CONNECT_RENEGOTIATE
:
net_store_data
(
&
packet2
,(
uint32
)
SSL_CTX_sess_connect_renegotiate
(
ssl_acceptor_fd
->
ssl_context_
));
(
!
ssl_acceptor_fd
?
0
:
SSL_CTX_sess_connect_renegotiate
(
ssl_acceptor_fd
->
ssl_context_
)));
break
;
case
SHOW_SSL_CTX_SESS_CB_HITS
:
net_store_data
(
&
packet2
,(
uint32
)
SSL_CTX_sess_cb_hits
(
ssl_acceptor_fd
->
ssl_context_
));
(
!
ssl_acceptor_fd
?
0
:
SSL_CTX_sess_cb_hits
(
ssl_acceptor_fd
->
ssl_context_
)));
break
;
case
SHOW_SSL_CTX_SESS_HITS
:
net_store_data
(
&
packet2
,(
uint32
)
SSL_CTX_sess_hits
(
ssl_acceptor_fd
->
ssl_context_
));
(
!
ssl_acceptor_fd
?
0
:
SSL_CTX_sess_hits
(
ssl_acceptor_fd
->
ssl_context_
)));
break
;
case
SHOW_SSL_CTX_SESS_CACHE_FULL
:
net_store_data
(
&
packet2
,(
uint32
)
SSL_CTX_sess_cache_full
(
ssl_acceptor_fd
->
ssl_context_
));
(
!
ssl_acceptor_fd
?
0
:
SSL_CTX_sess_cache_full
(
ssl_acceptor_fd
->
ssl_context_
)));
break
;
case
SHOW_SSL_CTX_SESS_MISSES
:
net_store_data
(
&
packet2
,(
uint32
)
SSL_CTX_sess_misses
(
ssl_acceptor_fd
->
ssl_context_
));
(
!
ssl_acceptor_fd
?
0
:
SSL_CTX_sess_misses
(
ssl_acceptor_fd
->
ssl_context_
)));
break
;
case
SHOW_SSL_CTX_SESS_TIMEOUTS
:
net_store_data
(
&
packet2
,(
uint32
)
SSL_CTX_sess_timeouts
(
ssl_acceptor_fd
->
ssl_context_
));
(
!
ssl_acceptor_fd
?
0
:
SSL_CTX_sess_timeouts
(
ssl_acceptor_fd
->
ssl_context_
)));
break
;
case
SHOW_SSL_CTX_SESS_NUMBER
:
net_store_data
(
&
packet2
,(
uint32
)
SSL_CTX_sess_number
(
ssl_acceptor_fd
->
ssl_context_
));
(
!
ssl_acceptor_fd
?
0
:
SSL_CTX_sess_number
(
ssl_acceptor_fd
->
ssl_context_
)));
break
;
case
SHOW_SSL_CTX_SESS_CONNECT
:
net_store_data
(
&
packet2
,(
uint32
)
SSL_CTX_sess_connect
(
ssl_acceptor_fd
->
ssl_context_
));
(
!
ssl_acceptor_fd
?
0
:
SSL_CTX_sess_connect
(
ssl_acceptor_fd
->
ssl_context_
)));
break
;
case
SHOW_SSL_CTX_SESS_GET_CACHE_SIZE
:
net_store_data
(
&
packet2
,(
uint32
)
SSL_CTX_sess_get_cache_size
(
ssl_acceptor_fd
->
ssl_context_
));
(
!
ssl_acceptor_fd
?
0
:
SSL_CTX_sess_get_cache_size
(
ssl_acceptor_fd
->
ssl_context_
)));
break
;
case
SHOW_SSL_CTX_GET_VERIFY_MODE
:
net_store_data
(
&
packet2
,(
uint32
)
SSL_CTX_get_verify_mode
(
ssl_acceptor_fd
->
ssl_context_
));
(
!
ssl_acceptor_fd
?
0
:
SSL_CTX_get_verify_mode
(
ssl_acceptor_fd
->
ssl_context_
)));
break
;
case
SHOW_SSL_CTX_GET_VERIFY_DEPTH
:
net_store_data
(
&
packet2
,(
uint32
)
SSL_CTX_get_verify_depth
(
ssl_acceptor_fd
->
ssl_context_
));
(
!
ssl_acceptor_fd
?
0
:
SSL_CTX_get_verify_depth
(
ssl_acceptor_fd
->
ssl_context_
)));
break
;
case
SHOW_SSL_CTX_GET_SESSION_CACHE_MODE
:
if
(
!
ssl_acceptor_fd
)
{
net_store_data
(
&
packet2
,
"NONE"
);
break
;
}
switch
(
SSL_CTX_get_session_cache_mode
(
ssl_acceptor_fd
->
ssl_context_
))
{
case
SSL_SESS_CACHE_OFF
:
...
...
@@ -1286,23 +1306,28 @@ int mysqld_show(THD *thd, const char *wild, show_var_st *variables)
SSL_get_verify_depth
(
thd
->
net
.
vio
->
ssl_
)
:
0
));
break
;
case
SHOW_SSL_GET_CIPHER
:
net_store_data
(
&
packet2
,
thd
->
net
.
vio
->
ssl_
?
SSL_get_cipher
(
thd
->
net
.
vio
->
ssl_
)
:
""
);
net_store_data
(
&
packet2
,
thd
->
net
.
vio
->
ssl_
?
SSL_get_cipher
(
thd
->
net
.
vio
->
ssl_
)
:
""
);
break
;
case
SHOW_SSL_GET_CIPHER_LIST
:
if
(
thd
->
net
.
vio
->
ssl_
)
if
(
thd
->
net
.
vio
->
ssl_
)
{
char
buf
[
1024
]
=
""
;
for
(
int
i
=
0
;
;
i
++
)
char
buf
[
1024
],
*
pos
;
pos
=
buf
;
for
(
int
i
=
0
;
i
++
;)
{
const
char
*
p
=
SSL_get_cipher_list
(
thd
->
net
.
vio
->
ssl_
,
i
);
if
(
p
==
NULL
)
break
;
if
(
i
!=
0
)
strcat
(
buf
,
":"
);
strcat
(
buf
,
p
);
DBUG_PRINT
(
"info"
,(
"cipher to add: %s,%s"
,
p
,
buf
));
pos
=
strmov
(
pos
,
p
);
*
pos
++=
':'
;
}
if
(
pos
!=
buf
)
pos
--
;
// Remove last ':'
*
pos
=
0
;
net_store_data
(
&
packet2
,
buf
);
}
else
}
else
net_store_data
(
&
packet2
,
""
);
break
;
...
...
sql/sql_yacc.yy
View file @
0c0a170f
...
...
@@ -2406,7 +2406,7 @@ single_multi:
| table_wild_list
{
LEX *lex=Lex;
lex->sql_command = SQLCOM_
MULTI_DELETE
;
lex->sql_command = SQLCOM_
DELETE_MULTI
;
mysql_init_select(lex);
lex->select->select_limit=HA_POS_ERROR;
lex->auxilliary_table_list.elements=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