mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
MDEV-32751 sys schema view session_ssl_status is empty
* treat FUNC/ARRAY variables as SESSION (otherwise they won't be shown) * allow SHOW_SIMPLE_FUNC everywhere where SHOW_FUNC is * increase row buffer size to avoid "too short" assert
This commit is contained in:
@ -1,4 +1,22 @@
|
||||
connect ssl_con,localhost,root,,,,,SSL;
|
||||
select variable_name from performance_schema.status_by_thread where VARIABLE_NAME LIKE 'Ssl%';
|
||||
variable_name
|
||||
Ssl_cipher
|
||||
Ssl_cipher_list
|
||||
Ssl_default_timeout
|
||||
Ssl_server_not_after
|
||||
Ssl_server_not_before
|
||||
Ssl_verify_depth
|
||||
Ssl_verify_mode
|
||||
Ssl_version
|
||||
Ssl_cipher
|
||||
Ssl_cipher_list
|
||||
Ssl_default_timeout
|
||||
Ssl_server_not_after
|
||||
Ssl_server_not_before
|
||||
Ssl_verify_depth
|
||||
Ssl_verify_mode
|
||||
Ssl_version
|
||||
SELECT (VARIABLE_VALUE <> '') AS have_ssl FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher';
|
||||
have_ssl
|
||||
1
|
||||
|
@ -13,6 +13,8 @@
|
||||
|
||||
connect (ssl_con,localhost,root,,,,,SSL);
|
||||
|
||||
select variable_name from performance_schema.status_by_thread where VARIABLE_NAME LIKE 'Ssl%';
|
||||
|
||||
# Check ssl turned on
|
||||
SELECT (VARIABLE_VALUE <> '') AS have_ssl FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher';
|
||||
|
||||
|
@ -66,7 +66,7 @@ static inline SHOW_SCOPE show_scope_from_type(enum enum_mysql_show_type type)
|
||||
case SHOW_SIMPLE_FUNC:
|
||||
case SHOW_UNDEF:
|
||||
default:
|
||||
return SHOW_SCOPE_UNDEF;
|
||||
return SHOW_SCOPE_ALL;
|
||||
}
|
||||
return SHOW_SCOPE_UNDEF;
|
||||
}
|
||||
@ -716,6 +716,7 @@ bool PFS_status_variable_cache::can_aggregate(enum_mysql_show_type variable_type
|
||||
case SHOW_CHAR_PTR:
|
||||
case SHOW_ARRAY:
|
||||
case SHOW_FUNC:
|
||||
case SHOW_SIMPLE_FUNC:
|
||||
case SHOW_INT:
|
||||
case SHOW_LONG:
|
||||
case SHOW_LONGLONG:
|
||||
@ -1152,16 +1153,19 @@ void PFS_status_variable_cache::manifest(THD *thd, const SHOW_VAR *show_var_arra
|
||||
reevaluate the new SHOW_TYPE and value. Handle nested case where
|
||||
SHOW_FUNC resolves to another SHOW_FUNC.
|
||||
*/
|
||||
if (show_var_ptr->type == SHOW_FUNC)
|
||||
if (show_var_ptr->type == SHOW_FUNC || show_var_ptr->type == SHOW_SIMPLE_FUNC)
|
||||
{
|
||||
show_var_tmp= *show_var_ptr;
|
||||
/*
|
||||
Execute the function reference in show_var_tmp->value, which returns
|
||||
show_var_tmp with a new type and new value.
|
||||
*/
|
||||
for (const SHOW_VAR *var= show_var_ptr; var->type == SHOW_FUNC; var= &show_var_tmp)
|
||||
for (const SHOW_VAR *var= show_var_ptr;
|
||||
var->type == SHOW_FUNC || var->type == SHOW_SIMPLE_FUNC;
|
||||
var= &show_var_tmp)
|
||||
{
|
||||
((mysql_show_var_func)(var->value))(thd, &show_var_tmp, value_buf.data, NULL, m_query_scope);
|
||||
((mysql_show_var_func)(var->value))(thd, &show_var_tmp, value_buf.data,
|
||||
&thd->status_var, m_query_scope);
|
||||
}
|
||||
show_var_ptr= &show_var_tmp;
|
||||
}
|
||||
|
@ -659,7 +659,7 @@ public:
|
||||
private:
|
||||
void make_row(const CHARSET_INFO *cs, const char* str, size_t length);
|
||||
|
||||
char m_str[1024];
|
||||
char m_str[2048];
|
||||
uint m_length;
|
||||
const CHARSET_INFO *m_charset;
|
||||
};
|
||||
|
Reference in New Issue
Block a user