List:Internals« Previous MessageNext Message »
From:Derek Downey Date:October 6 2011 6:26pm
Subject:Com_empty_query
View as plain text  
Hi,
 I was trying to find out what would trigger the counter on Com_empty_query and my two
test cases do not trigger it:

mysql> SHOW STATUS LIKE 'Com_empty%';
+-----------------+-------+
| Variable_name   | Value |
+-----------------+-------+
| Com_empty_query | 0     |
+-----------------+-------+
1 row in set (0.00 sec)

mysql> SELECT * FROM foo WHERE bar=2;
Empty set (0.03 sec)

mysql> ;
ERROR: 
No query specified

mysql> SHOW STATUS LIKE 'Com_empty%';
+-----------------+-------+
| Variable_name   | Value |
+-----------------+-------+
| Com_empty_query | 0     |
+-----------------+-------+
1 row in set (0.00 sec)

Looking at the source, it seems to get triggered on an END_OF_INPUT in the query section
of 'sql_yacc.yy' (assuming the query is syntactically correct). sql_lex.cc is the only
instance that returns an END_OF_INPUT (after a lip->eof()), but I can't seem to
trigger it.

Is this triggered on a breakdown from the client, or on a certain type of (reproducible)
query?

Thanks,
 Derek Downey
Thread
Com_empty_queryDerek Downey6 Oct
  • Re: Com_empty_queryEric Bergen9 Oct