MySQL  8.0.16
Source Code Documentation
sql_cmd_srs.cc File Reference

This file implements the CREATE/DROP SPATIAL REFERENCE SYSTEM statements. More...

#include "sql/sql_cmd_srs.h"
#include <string>
#include "scope_guard.h"
#include "sql/auth/auth_acls.h"
#include "sql/binlog.h"
#include "sql/dd/cache/dictionary_client.h"
#include "sql/dd/dd.h"
#include "sql/dd/impl/types/spatial_reference_system_impl.h"
#include "sql/dd/types/spatial_reference_system.h"
#include "sql/derror.h"
#include "sql/gis/srid.h"
#include "sql/lock.h"
#include "sql/sql_backup_lock.h"
#include "sql/sql_class.h"
#include "sql/sql_prepare.h"
#include "sql/srs_fetcher.h"
#include "sql/strfunc.h"
#include "sql/thd_raii.h"
#include "sql/transaction.h"

Functions

static void warn_if_in_reserved_range (gis::srid_t srid, THD *thd)
 Issue a warning if an SRID is within one of the reserved ranges. More...
 
static bool srs_is_used (gis::srid_t srid, THD *thd)
 Check if an SRS is used, i.e., if any columns depend on it. More...
 
static bool rollback (THD *thd)
 Abort the current statement and transaction. More...
 
static bool commit (THD *thd)
 Commit the current statement and transaction. More...
 

Detailed Description

This file implements the CREATE/DROP SPATIAL REFERENCE SYSTEM statements.

Function Documentation

◆ commit()

static bool commit ( THD thd)
static

Commit the current statement and transaction.

Parameters
[in]thdThread context.
Return values
falseSuccess.
trueAn error occurred.

◆ rollback()

static bool rollback ( THD thd)
static

Abort the current statement and transaction.

Parameters
[in]thdThread context.
Return values
falseSuccess.
trueAn error occurred.

◆ srs_is_used()

static bool srs_is_used ( gis::srid_t  srid,
THD thd 
)
static

Check if an SRS is used, i.e., if any columns depend on it.

Parameters
[in]sridThe SRID.
[in]thdThread context.
Return values
trueThe SRS is used by at least one column.
falseThe SRS is not used by any columns.

◆ warn_if_in_reserved_range()

static void warn_if_in_reserved_range ( gis::srid_t  srid,
THD thd 
)
static

Issue a warning if an SRID is within one of the reserved ranges.

Parameters
[in]sridThe SRID to check.
[in]thdThread context.