TIBCO LogLogic LMI - Enable warnings in MySQL

TIBCO LogLogic LMI - Enable warnings in MySQL

book

Article ID: KB0080097

calendar_today

Updated On:

Products Versions
TIBCO LogLogic Enterprise Virtual Appliance all versions

Description

When you are troubleshooting inside MySQL, you may find that you run into some output that looks similar to this:

Query OK, 0 rows affected, 1 warning (0.07 sec).

By default, warnings are not enabled.

Issue/Introduction

This KB will explain how to toggle warnings inside MySQL.

Resolution

To see warnings, there are two options available to you:
1. If you have global warnings turned off, and you receive a warning as part of a query, you can run:
 
SHOW WARNINGS
 
immediately afterwards to show the warnings associated with the last query. In the example below, there were no warnings associated with the previous query, and so an empty set is returned:
 
mysql> show warnings;
Empty set (0.00 sec)
 
2. To configure warnings to show for every query, you can run the following:
 
mysql> \W
Show warnings enabled.
 
To disable global warnings, run the following:
 
mysql> \w
Show warnings disabled.

These settings are all per session, so as soon as you exit from MySQL they will revert to standard.  They are not copied over via HA, and so you would need to enable them on both nodes.