MySQL 9.1.0
Source Code Documentation
Server_options Class Reference

This class represent server options as set by the parser. More...

#include <sql_servers.h>

Public Member Functions

void set_port (long port)
 
void set_host (LEX_STRING host)
 
void set_db (LEX_STRING db)
 
void set_username (LEX_STRING username)
 
void set_password (LEX_STRING password)
 
void set_scheme (LEX_STRING scheme)
 
void set_socket (LEX_STRING socket)
 
void set_owner (LEX_STRING owner)
 
long get_port () const
 
const char * get_host () const
 
const char * get_db () const
 
const char * get_username () const
 
const char * get_password () const
 
const char * get_scheme () const
 
const char * get_socket () const
 
const char * get_owner () const
 
void reset ()
 Reset all strings to NULL and port to PORT_NOT_SET. More...
 
bool insert_into_cache () const
 Create a cache entry and insert it into the cache. More...
 
bool update_cache (FOREIGN_SERVER *existing) const
 Update a cache entry. More...
 
void store_new_server (TABLE *table) const
 Create a record representing these server options, ready to be inserted into the mysql.servers table. More...
 
void store_altered_server (TABLE *table, FOREIGN_SERVER *existing) const
 Create a record for updating a row in the mysql.servers table. More...
 

Public Attributes

LEX_STRING m_server_name
 

Static Public Attributes

static const long PORT_NOT_SET = -1
 

Private Attributes

long m_port
 
LEX_STRING m_host
 
LEX_STRING m_db
 
LEX_STRING m_username
 
LEX_STRING m_password
 
LEX_STRING m_scheme
 
LEX_STRING m_socket
 
LEX_STRING m_owner
 

Detailed Description

This class represent server options as set by the parser.

Member Function Documentation

◆ get_db()

const char * Server_options::get_db ( ) const
inline

◆ get_host()

const char * Server_options::get_host ( ) const
inline

◆ get_owner()

const char * Server_options::get_owner ( ) const
inline

◆ get_password()

const char * Server_options::get_password ( ) const
inline

◆ get_port()

long Server_options::get_port ( ) const
inline

◆ get_scheme()

const char * Server_options::get_scheme ( ) const
inline

◆ get_socket()

const char * Server_options::get_socket ( ) const
inline

◆ get_username()

const char * Server_options::get_username ( ) const
inline

◆ insert_into_cache()

bool Server_options::insert_into_cache ( ) const

Create a cache entry and insert it into the cache.

Returns
false if entry was created and inserted, true otherwise.

◆ reset()

void Server_options::reset ( void  )

Reset all strings to NULL and port to PORT_NOT_SET.

This prepares the structure for being used by a new statement.

◆ set_db()

void Server_options::set_db ( LEX_STRING  db)
inline

◆ set_host()

void Server_options::set_host ( LEX_STRING  host)
inline

◆ set_owner()

void Server_options::set_owner ( LEX_STRING  owner)
inline

◆ set_password()

void Server_options::set_password ( LEX_STRING  password)
inline

◆ set_port()

void Server_options::set_port ( long  port)
inline

◆ set_scheme()

void Server_options::set_scheme ( LEX_STRING  scheme)
inline

◆ set_socket()

void Server_options::set_socket ( LEX_STRING  socket)
inline

◆ set_username()

void Server_options::set_username ( LEX_STRING  username)
inline

◆ store_altered_server()

void Server_options::store_altered_server ( TABLE table,
FOREIGN_SERVER existing 
) const

Create a record for updating a row in the mysql.servers table.

Parameters
tableTable to be updated.
existingCache entry represeting the existing values.

◆ store_new_server()

void Server_options::store_new_server ( TABLE table) const

Create a record representing these server options, ready to be inserted into the mysql.servers table.

Parameters
tableTable to be inserted into.

◆ update_cache()

bool Server_options::update_cache ( FOREIGN_SERVER existing) const

Update a cache entry.

Parameters
existingCache entry to update
Returns
false if the entry was updated, true otherwise.

Member Data Documentation

◆ m_db

LEX_STRING Server_options::m_db
private

◆ m_host

LEX_STRING Server_options::m_host
private

◆ m_owner

LEX_STRING Server_options::m_owner
private

◆ m_password

LEX_STRING Server_options::m_password
private

◆ m_port

long Server_options::m_port
private

◆ m_scheme

LEX_STRING Server_options::m_scheme
private

◆ m_server_name

LEX_STRING Server_options::m_server_name

◆ m_socket

LEX_STRING Server_options::m_socket
private

◆ m_username

LEX_STRING Server_options::m_username
private

◆ PORT_NOT_SET

const long Server_options::PORT_NOT_SET = -1
static

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