Commit 6736f152 authored by Monty's avatar Monty

Added FLUSH THREADS

parent 37393bea
...@@ -558,3 +558,10 @@ ERROR HY000: Table 'v1' was not locked with LOCK TABLES ...@@ -558,3 +558,10 @@ ERROR HY000: Table 'v1' was not locked with LOCK TABLES
UNLOCK TABLES; UNLOCK TABLES;
DROP VIEW v1; DROP VIEW v1;
DROP TABLE t1; DROP TABLE t1;
#
# Test FLUSH THREADS
#
flush threads;
show status like "Threads_cached";
Variable_name Value
Threads_cached 0
...@@ -672,3 +672,9 @@ UNLOCK TABLES; ...@@ -672,3 +672,9 @@ UNLOCK TABLES;
DROP VIEW v1; DROP VIEW v1;
DROP TABLE t1; DROP TABLE t1;
--echo #
--echo # Test FLUSH THREADS
--echo #
flush threads;
show status like "Threads_cached";
...@@ -8,5 +8,5 @@ SELECT 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1 ...@@ -8,5 +8,5 @@ SELECT 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1
#################################### ####################################
SELECT event_name, digest, digest_text, sql_text FROM events_statements_history_long; SELECT event_name, digest, digest_text, sql_text FROM events_statements_history_long;
event_name digest digest_text sql_text event_name digest digest_text sql_text
statement/sql/truncate 1ce0abbaf6f3f120bdc1464f34c3e614 TRUNCATE TABLE truncat... statement/sql/select 8ad134e475b278738ee855a05d6a77cf SELECT ? + ? + SELECT ...
statement/sql/select c13037c37462abf2be6cf94058702f18 SELECT ? + ? + SELECT ... statement/sql/truncate 2b32156b59f41d61d9070458bce5932e TRUNCATE TABLE truncat...
...@@ -19,4 +19,5 @@ SELECT 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1 ...@@ -19,4 +19,5 @@ SELECT 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1
--echo #################################### --echo ####################################
--echo # QUERYING PS STATEMENT DIGEST --echo # QUERYING PS STATEMENT DIGEST
--echo #################################### --echo ####################################
--sorted_result
SELECT event_name, digest, digest_text, sql_text FROM events_statements_history_long; SELECT event_name, digest, digest_text, sql_text FROM events_statements_history_long;
...@@ -661,6 +661,7 @@ static SYMBOL symbols[] = { ...@@ -661,6 +661,7 @@ static SYMBOL symbols[] = {
{ "TRAILING", SYM(TRAILING)}, { "TRAILING", SYM(TRAILING)},
{ "TRANSACTION", SYM(TRANSACTION_SYM)}, { "TRANSACTION", SYM(TRANSACTION_SYM)},
{ "TRANSACTIONAL", SYM(TRANSACTIONAL_SYM)}, { "TRANSACTIONAL", SYM(TRANSACTIONAL_SYM)},
{ "THREADS", SYM(THREADS_SYM)},
{ "TRIGGER", SYM(TRIGGER_SYM)}, { "TRIGGER", SYM(TRIGGER_SYM)},
{ "TRIGGERS", SYM(TRIGGERS_SYM)}, { "TRIGGERS", SYM(TRIGGERS_SYM)},
{ "TRUE", SYM(TRUE_SYM)}, { "TRUE", SYM(TRUE_SYM)},
......
...@@ -1098,6 +1098,7 @@ End SQL_MODE_ORACLE_SPECIFIC */ ...@@ -1098,6 +1098,7 @@ End SQL_MODE_ORACLE_SPECIFIC */
%token <kwd> TIME_SYM /* SQL-2003-R, Oracle-R */ %token <kwd> TIME_SYM /* SQL-2003-R, Oracle-R */
%token <kwd> TRANSACTION_SYM %token <kwd> TRANSACTION_SYM
%token <kwd> TRANSACTIONAL_SYM %token <kwd> TRANSACTIONAL_SYM
%token <kwd> THREADS_SYM
%token <kwd> TRIGGERS_SYM %token <kwd> TRIGGERS_SYM
%token <kwd> TRIM_ORACLE %token <kwd> TRIM_ORACLE
%token <kwd> TRUNCATE_SYM %token <kwd> TRUNCATE_SYM
...@@ -14085,6 +14086,8 @@ flush_option: ...@@ -14085,6 +14086,8 @@ flush_option:
{ Lex->type|= REFRESH_USER_RESOURCES; } { Lex->type|= REFRESH_USER_RESOURCES; }
| SSL_SYM | SSL_SYM
{ Lex->type|= REFRESH_SSL;} { Lex->type|= REFRESH_SSL;}
| THREADS_SYM
{ Lex->type|= REFRESH_THREADS;}
| IDENT_sys remember_tok_start | IDENT_sys remember_tok_start
{ {
Lex->type|= REFRESH_GENERIC; Lex->type|= REFRESH_GENERIC;
...@@ -15741,6 +15744,7 @@ keyword_sp_var_and_label: ...@@ -15741,6 +15744,7 @@ keyword_sp_var_and_label:
| THAN_SYM | THAN_SYM
| TRANSACTION_SYM %prec PREC_BELOW_CONTRACTION_TOKEN2 | TRANSACTION_SYM %prec PREC_BELOW_CONTRACTION_TOKEN2
| TRANSACTIONAL_SYM | TRANSACTIONAL_SYM
| THREADS_SYM
| TRIGGERS_SYM | TRIGGERS_SYM
| TRIM_ORACLE | TRIM_ORACLE
| TIMESTAMP_ADD | TIMESTAMP_ADD
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment