MySQL 26.7.0
Source Code Documentation
mysql_statement_service_imp.cc File Reference
#include "mysql_statement_service_imp.h"
#include <mysql/components/service_implementation.h>
#include <sql/current_thd.h>
#include <sql/statement/statement.h>
#include <cstddef>
#include <cstdint>
#include <cstdio>
#include <cstring>
#include <string>
#include <variant>
#include "field_types.h"
#include "lex_string.h"
#include "my_inttypes.h"
#include "my_sys.h"
#include "mysql/com_data.h"
#include "mysql/components/services/bits/mle_time_bits.h"
#include "mysql/components/services/bits/stored_program_bits.h"
#include "mysql/components/services/defs/mysql_string_defs.h"
#include "mysql/components/services/mysql_statement_service.h"
#include "mysql_time.h"
#include "sql/item.h"

Classes

struct  Service_statement
 

Functions

 REQUIRES_SERVICE_PLACEHOLDER (mysql_current_thread_reader)
 
static auto enum_field_type_to_sp_arg_type (enum_field_types field_type, uint flags) -> uint64_t
 Convert raw MYSQL_TYPE_* plus field flags to the legacy statement service MYSQL_SP_ARG_TYPE_* domain. More...
 
MYSQL_TIME convert_to_mysql_time (const mle_time &value)
 
static auto sp_arg_type_to_enum_field_type (uint64_t type) -> std::optional< enum_field_types >
 Convert bind_param()'s MYSQL_SP_ARG_TYPE_* input to raw enum_field_types. More...
 
static auto is_valid_sp_arg_type (uint64_t type) -> bool
 
static auto is_temporal_sp_arg_type (uint64_t type) -> bool
 
bool execute_prepared_statement (Prepared_statement_handle *statement)
 
bool execute_regular_statement (Regular_statement_handle *statement)
 
auto convert_to_mle_time (const MYSQL_TIME &value) -> mle_time
 

Variables

constexpr auto MYSQL_SUCCESS = 0
 
constexpr auto MYSQL_FAILURE = 1
 

Function Documentation

◆ convert_to_mle_time()

auto convert_to_mle_time ( const MYSQL_TIME value) -> mle_time

◆ convert_to_mysql_time()

MYSQL_TIME convert_to_mysql_time ( const mle_time value)

◆ enum_field_type_to_sp_arg_type()

static auto enum_field_type_to_sp_arg_type ( enum_field_types  field_type,
uint  flags 
) -> uint64_t
static

Convert raw MYSQL_TYPE_* plus field flags to the legacy statement service MYSQL_SP_ARG_TYPE_* domain.

MYSQL_TYPE_STRING needs flags to distinguish CHAR from ENUM and SET.

◆ execute_prepared_statement()

bool execute_prepared_statement ( Prepared_statement_handle statement)

◆ execute_regular_statement()

bool execute_regular_statement ( Regular_statement_handle statement)

◆ is_temporal_sp_arg_type()

static auto is_temporal_sp_arg_type ( uint64_t  type) -> bool
static

◆ is_valid_sp_arg_type()

static auto is_valid_sp_arg_type ( uint64_t  type) -> bool
static

◆ REQUIRES_SERVICE_PLACEHOLDER()

REQUIRES_SERVICE_PLACEHOLDER ( mysql_current_thread_reader  )

◆ sp_arg_type_to_enum_field_type()

static auto sp_arg_type_to_enum_field_type ( uint64_t  type) -> std::optional<enum_field_types>
static

Convert bind_param()'s MYSQL_SP_ARG_TYPE_* input to raw enum_field_types.

Variable Documentation

◆ MYSQL_FAILURE

constexpr auto MYSQL_FAILURE = 1
constexpr

◆ MYSQL_SUCCESS

constexpr auto MYSQL_SUCCESS = 0
constexpr