MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Sql_cmd_get_diagnostics Class Reference

#include <sql_get_diagnostics.h>

Inheritance diagram for Sql_cmd_get_diagnostics:
Collaboration diagram for Sql_cmd_get_diagnostics:

Public Member Functions

 Sql_cmd_get_diagnostics (Diagnostics_information *info)
virtual enum_sql_command sql_command_code () const
 Return the command code for this statement.
virtual bool execute (THD *thd)

Additional Inherited Members

- Static Public Member Functions inherited from Sql_alloc
static void * operator new (size_t size) throw ()
static void * operator new[] (size_t size) throw ()
static void * operator new[] (size_t size, MEM_ROOT *mem_root) throw ()
static void * operator new (size_t size, MEM_ROOT *mem_root) throw ()
static void operator delete (void *ptr, size_t size)
static void operator delete (void *ptr, MEM_ROOT *mem_root)
static void operator delete[] (void *ptr, MEM_ROOT *mem_root)
static void operator delete[] (void *ptr, size_t size)

Detailed Description

Sql_cmd_get_diagnostics represents a GET DIAGNOSTICS statement.

The GET DIAGNOSTICS statement retrieves exception or completion condition information from a diagnostics area, usually pertaining to the last non-diagnostic SQL statement that was executed.

Definition at line 30 of file sql_get_diagnostics.h.

Constructor & Destructor Documentation

Sql_cmd_get_diagnostics::Sql_cmd_get_diagnostics ( Diagnostics_information info)
inline

Constructor, used to represent a GET DIAGNOSTICS statement.

Parameters
infoDiagnostics information to be obtained.

Definition at line 38 of file sql_get_diagnostics.h.

Member Function Documentation

bool Sql_cmd_get_diagnostics::execute ( THD *  thd)
virtual

Execute this GET DIAGNOSTICS statement.

Parameters
thdThe current thread.
Remarks
Errors or warnings occurring during the execution of the GET DIAGNOSTICS statement should not affect the diagnostics area of a previous statement as the diagnostics information there would be wiped out. Thus, in order to preserve the contents of the diagnostics area from which information is being retrieved, the GET DIAGNOSTICS statement is executed under a separate diagnostics area. If any errors or warnings occur during the execution of the GET DIAGNOSTICS statement, these error or warnings (conditions) are appended to the list of the original diagnostics area. The only exception to this is fatal errors, which must always cause the statement to fail.
Return values
falseon success.
trueon error

Implements Sql_cmd.

Definition at line 43 of file sql_get_diagnostics.cc.

Here is the call graph for this function:


The documentation for this class was generated from the following files: