summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
Diffstat (limited to 'sql')
-rw-r--r--sql/mysqld.cc10
-rw-r--r--sql/sql_show.cc5
-rw-r--r--sql/structs.h3
3 files changed, 18 insertions, 0 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index a28ae38c675..f9d7ee4e739 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -2765,7 +2765,14 @@ static void init_ssl()
opt_ssl_cipher);
DBUG_PRINT("info",("ssl_acceptor_fd: 0x%lx", (long) ssl_acceptor_fd));
if (!ssl_acceptor_fd)
+ {
opt_use_ssl = 0;
+ have_openssl= SHOW_OPTION_DISABLED;
+ }
+ }
+ else
+ {
+ have_openssl= SHOW_OPTION_DISABLED;
}
if (des_key_file)
load_des_key_file(des_key_file);
@@ -5851,6 +5858,9 @@ struct show_var_st status_vars[]= {
{"Com_xa_recover", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_XA_RECOVER]),SHOW_LONG_STATUS},
{"Com_xa_rollback", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_XA_ROLLBACK]),SHOW_LONG_STATUS},
{"Com_xa_start", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_XA_START]),SHOW_LONG_STATUS},
+#ifdef HAVE_COMPRESS
+ {"Compression", (char*) 0, SHOW_NET_COMPRESSION},
+#endif /* HAVE_COMPRESS */
{"Connections", (char*) &thread_id, SHOW_LONG_CONST},
{"Created_tmp_disk_tables", (char*) offsetof(STATUS_VAR, created_tmp_disk_tables), SHOW_LONG_STATUS},
{"Created_tmp_files", (char*) &my_tmp_file_created, SHOW_LONG},
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index 929bf36d305..4b3242cbe12 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -1632,6 +1632,11 @@ static bool show_status_array(THD *thd, const char *wild,
value= (value-(char*) &dflt_key_cache_var)+ (char*) dflt_key_cache;
end= longlong10_to_str(*(longlong*) value, buff, 10);
break;
+#ifdef HAVE_COMPRESS
+ case SHOW_NET_COMPRESSION:
+ end= strmov(buff, thd->net.compress ? "ON" : "OFF");
+ break;
+#endif /* HAVE_COMPRESS */
case SHOW_UNDEF: // Show never happen
case SHOW_SYS:
break; // Return empty string
diff --git a/sql/structs.h b/sql/structs.h
index e490a2de60c..52d80b3d0c0 100644
--- a/sql/structs.h
+++ b/sql/structs.h
@@ -185,6 +185,9 @@ enum SHOW_TYPE
SHOW_SSL_CTX_SESS_TIMEOUTS, SHOW_SSL_CTX_SESS_CACHE_FULL,
SHOW_SSL_GET_CIPHER_LIST,
#endif /* HAVE_OPENSSL */
+#ifdef HAVE_COMPRESS
+ SHOW_NET_COMPRESSION,
+#endif /* HAVE_COMPRESS */
SHOW_RPL_STATUS, SHOW_SLAVE_RUNNING, SHOW_SLAVE_RETRIED_TRANS,
SHOW_KEY_CACHE_LONG, SHOW_KEY_CACHE_CONST_LONG, SHOW_KEY_CACHE_LONGLONG,
SHOW_LONG_STATUS, SHOW_LONG_CONST_STATUS, SHOW_SLAVE_SKIP_ERRORS