Bug #58594 Add Exception checking to example blackout script

Submitted: 30 Nov 2010 15:51 Modified: 5 Jan 2011 18:32
Reporter: Mark Leith Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Enterprise Monitor: Documentation Severity:S3 (Non-critical)
Version:2.2+ OS:Any
Assigned to: John Russell CPU Architecture:Any

[30 Nov 2010 15:51] Mark Leith
Description:
The script example in the documentation does not check for known exceptions, so it can be run, and actually appear to succeed, when really some internal exception is being returned that is just ignored. 

http://dev.mysql.com/doc/mysql-monitor/2.2/en/mem-advisor-scripting-blackouts.html

How to repeat:
perl ./blackout.pl localhost:8080 admin mysql nonexistantservername:3306 true

Suggested fix:
Add the following to the bottom of the script:

  if ($response->content =~ /UserUnauthorizedException/ ||
       $response->content =~ /ServerDoesNotExistException/) { 
  	die $response->content;
  }
[5 Jan 2011 18:32] John Russell
Added to 2.3 and 2.2 manuals.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.039 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.