about me about me
photography photography
software projects software projects
contact me contact me
03
Jul

MySQL Warnings

posted 2007 // mysql // 0

My preferred tool for constructing queries against MySQL databases is the command line client. One niggle that has plagued me since I started using the client was the inability to retrieve warnings that sometimes occur on queries.

This morning I stumbled across the following in the MySQL manual:

mysql> SET GLOBAL query_cache_size = 40000;
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> SHOW WARNINGS\G
*************************** 1. row ***************************
  Level: Warning
   Code: 1282
Message: Query cache failed to set size 39936; new query 
         cache size is 0

SHOW WARNINGS reports those pesky messages I could never retrieve!


comments

No comments for this post.