#include <sql_service_interface.h>
◆ Sql_service_interface()
Sql_service_interface constructor - Non-threaded version. 
Initializes sql_service_context class
- Parameters
 - 
  
    | cs_txt_bin | send result in string or native types i.e. to CS_TEXT_REPRESENTATION or CS_BINARY_REPRESENTATION  | 
    | cs_charset | charset for the string data input  | 
  
   
 
 
◆ ~Sql_service_interface()
      
        
          | Sql_service_interface::~Sql_service_interface  | 
          ( | 
           | ) | 
           | 
        
      
 
Sql_service_interface destructor. 
 
 
◆ configure_session()
  
  
      
        
          | long Sql_service_interface::configure_session  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
private   | 
  
 
Configures the session's session variables. 
- Returns
 - the sql error number 
 
- Return values
 - 
  
    | 0 | OK  | 
    | >0 | SQL Error Number returned from MySQL Service API  | 
    | <0 | local errors  | 
  
   
 
 
◆ execute()
Executes a server command in a session. 
- Parameters
 - 
  
    | cmd | command service data input structure containing command details (query/database/session id..). Check include/mysql/com_data.h for more details.  | 
    | cmd_type | command type default set is COM_QUERY  | 
    | rset | resulted obtained after executing query  | 
    | cs_txt_bin | send result in string or native types i.e. to CS_TEXT_REPRESENTATION or CS_BINARY_REPRESENTATION  | 
    | cs_charset | charset for the string data input | 
  
   
- Returns
 - the sql error number 
 
- Return values
 - 
  
    | 0 | OK  | 
    | >0 | SQL Error Number returned from MySQL Service API  | 
    | <0 | local errors  | 
  
   
 
 
◆ execute_internal()
Executes a server command in a session. 
- Parameters
 - 
  
    | rset | resulted obtained after executing query  | 
    | cs_txt_bin | send result in string or native types i.e. to CS_TEXT_REPRESENTATION or CS_BINARY_REPRESENTATION  | 
    | cs_charset | charset for the string data input  | 
    | cmd | command service data input structure containing command details (query/database/session id..). Check include/mysql/com_data.h for more details.  | 
    | cmd_type | command type default set is COM_QUERY | 
  
   
- Returns
 - the sql error number 
 
- Return values
 - 
  
    | 0 | OK  | 
    | >0 | SQL Error Number returned from MySQL Service API  | 
    | -1 | Internal server session failed or was killed  | 
    | -2 | Internal API failure  | 
  
   
 
 
◆ execute_query() [1/2]
      
        
          | long Sql_service_interface::execute_query  | 
          ( | 
          const std::string &  | 
          query_string | ) | 
           | 
        
      
 
Executes a server command in a session. 
- Note
 - the command type here is COM_QUERY
 
- Parameters
 - 
  
    | query_string | query to be executed | 
  
   
- Returns
 - the sql error number 
 
- Return values
 - 
  
    | 0 | OK  | 
    | >0 | SQL Error Number returned from MySQL Service API  | 
    | <0 | local errors  | 
  
   
 
 
◆ execute_query() [2/2]
Executes a server command in a session. 
- Parameters
 - 
  
    | sql_string | query to be executed  | 
    | rset | resulted obtained after executing query  | 
    | cs_txt_bin | send result in string or native types i.e. to CS_TEXT_REPRESENTATION or CS_BINARY_REPRESENTATION  | 
    | cs_charset | charset for the string data input | 
  
   
- Note
 - the command type here is COM_QUERY
 
- Returns
 - the sql error number 
 
- Return values
 - 
  
    | 0 | OK  | 
    | >0 | SQL Error Number returned from MySQL Service API  | 
    | <0 | local errors  | 
  
   
 
 
◆ get_session()
Returns the MYSQL_SESSION object. 
- Returns
 - thread ID 
 
 
 
◆ get_session_id()
  
  
      
        
          | uint64_t Sql_service_interface::get_session_id  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Returns the ID of a session. 
- Returns
 - thread ID 
 
 
 
◆ is_acl_disabled()
      
        
          | bool Sql_service_interface::is_acl_disabled  | 
          ( | 
           | ) | 
           | 
        
      
 
Check if the server is running without user privileges. 
- Return values
 - 
  
    | true | the server is skipping the grant table  | 
    | false | user privileges are working normally  | 
  
   
 
 
◆ is_session_killed()
  
  
      
        
          | int Sql_service_interface::is_session_killed  | 
          ( | 
          MYSQL_SESSION  | 
          session | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Returns whether the session was killed. 
- Return values
 - 
  
  
 
 
 
◆ open_session()
      
        
          | int Sql_service_interface::open_session  | 
          ( | 
           | ) | 
           | 
        
      
 
Opens an server session for internal server connection. 
- Returns
 - the operation status 
 
- Return values
 - 
  
  
 
 
 
◆ open_thread_session()
      
        
          | int Sql_service_interface::open_thread_session  | 
          ( | 
          void *  | 
          plugin_ptr | ) | 
           | 
        
      
 
Opens an threaded server session for internal server connection. 
- Parameters
 - 
  
    | plugin_ptr | a plugin pointer passed the connection thread. | 
  
   
- Returns
 - the operation status 
 
- Return values
 - 
  
  
 
 
 
◆ set_charset()
  
  
      
        
          | void Sql_service_interface::set_charset  | 
          ( | 
          const CHARSET_INFO *  | 
          charset | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
set charset for the string data input(com_query for example) 
- Parameters
 - 
  
    | charset | charset for the string data input  | 
  
   
 
 
◆ set_send_resulttype()
Set send result type to CS_TEXT_REPRESENTATION or CS_BINARY_REPRESENTATION. 
- Parameters
 - 
  
    | field_type | send result in string or native types i.e. to CS_TEXT_REPRESENTATION or CS_BINARY_REPRESENTATION  | 
  
   
 
 
◆ set_session_user()
      
        
          | int Sql_service_interface::set_session_user  | 
          ( | 
          const char *  | 
          user | ) | 
           | 
        
      
 
Set the session associated user. 
- Parameters
 - 
  
    | user | the user to change to | 
  
   
- Return values
 - 
  
  
 
 
 
◆ wait_for_session_server()
  
  
      
        
          | int Sql_service_interface::wait_for_session_server  | 
          ( | 
          ulong  | 
          total_timeout | ) | 
           | 
         
       
   | 
  
private   | 
  
 
Wait for server to be in SERVER_OPERATING state. 
- Parameters
 - 
  
    | total_timeout | number of seconds to wait for session server | 
  
   
- Returns
 - session server availability 
 
- Return values
 - 
  
    | 0 | session server is in SERVER_OPERATING state  | 
    | 1 | timeout  | 
    | -1 | session server shutdown in progress  | 
  
   
 
 
◆ m_charset
◆ m_plugin
  
  
      
        
          | void* Sql_service_interface::m_plugin | 
         
       
   | 
  
private   | 
  
 
Pointer to the group_replication plugin structure. 
 
 
◆ m_session
Pointer to Srv_session class. 
 
 
◆ m_txt_or_bin
send result in string or native types 
 
 
The documentation for this class was generated from the following files: