MySQL  8.0.27
Source Code Documentation
sql_load.cc File Reference
#include "sql/sql_load.h"
#include <fcntl.h>
#include <limits.h>
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <algorithm>
#include <atomic>
#include <limits>
#include "libbinlogevents/include/load_data_events.h"
#include "m_ctype.h"
#include "m_string.h"
#include "my_base.h"
#include "my_bitmap.h"
#include "my_dbug.h"
#include "my_dir.h"
#include "my_inttypes.h"
#include "my_io.h"
#include "my_loglevel.h"
#include "my_macros.h"
#include "my_sys.h"
#include "my_thread_local.h"
#include "mysql/components/services/log_builtins.h"
#include "mysql/psi/mysql_file.h"
#include "mysql/service_mysql_alloc.h"
#include "mysql/thread_type.h"
#include "mysql_com.h"
#include "mysqld_error.h"
#include "sql/auth/auth_acls.h"
#include "sql/auth/auth_common.h"
#include "sql/binlog.h"
#include "sql/derror.h"
#include "sql/error_handler.h"
#include "sql/field.h"
#include "sql/handler.h"
#include "sql/item.h"
#include "sql/item_func.h"
#include "sql/item_timefunc.h"
#include "sql/log.h"
#include "sql/log_event.h"
#include "sql/mysqld.h"
#include "sql/protocol.h"
#include "sql/protocol_classic.h"
#include "sql/psi_memory_key.h"
#include "sql/query_result.h"
#include "sql/rpl_replica.h"
#include "sql/rpl_rli.h"
#include "sql/sql_base.h"
#include "sql/sql_class.h"
#include "sql/sql_error.h"
#include "sql/sql_insert.h"
#include "sql/sql_lex.h"
#include "sql/sql_list.h"
#include "sql/sql_show.h"
#include "sql/sql_view.h"
#include "sql/system_variables.h"
#include "sql/table.h"
#include "sql/table_trigger_dispatcher.h"
#include "sql/thr_malloc.h"
#include "sql/transaction_info.h"
#include "sql/trigger_def.h"
#include "sql_string.h"
#include "thr_lock.h"

Classes

class  XML_TAG
 
class  READ_INFO
 
class  Field_tmp_nullability_guard
 

Namespaces

 anonymous_namespace{sql_load.cc}
 

Macros

#define GET   (stack_pos != stack ? *--stack_pos : my_b_get(&cache))
 
#define PUSH(A)   *(stack_pos++) = (A)
 
#define GET_MBCHARLEN(cs, chr, len)
 The logic here is similar with my_mbcharlen, except for GET and PUSH. More...
 

Functions

bool anonymous_namespace{sql_load.cc}::is_hidden_generated_column (TABLE *table, Item *item)
 Checks if an item is a hidden generated column. More...
 
static int my_xml_entity_to_char (const char *name, size_t length)
 
static int my_tospace (int chr)
 Convert newline, linefeed, tab to space. More...
 

Macro Definition Documentation

◆ GET

#define GET   (stack_pos != stack ? *--stack_pos : my_b_get(&cache))

◆ GET_MBCHARLEN

#define GET_MBCHARLEN (   cs,
  chr,
  len 
)
Value:
do { \
len = my_mbcharlen((cs), (chr)); \
if (len == 0 && my_mbmaxlenlen((cs)) == 2) { \
int chr1 = GET; \
if (chr1 != my_b_EOF) { \
len = my_mbcharlen_2((cs), (chr), chr1); \
/* Character is gb18030 or invalid (len = 0) */ \
assert(len == 0 || len == 2 || len == 4); \
} \
if (len != 0) PUSH(chr1); \
} \
} while (0)
while(-- *argc > 0 &&*(pos= *(++*argv))=='-')
Definition: do_ctype.cc:83
constexpr int my_b_EOF
Definition: my_sys.h:492
#define my_mbcharlen_2(s, a, b)
Get the length of gb18030 code by the given two leading bytes.
Definition: m_ctype.h:704
#define my_mbmaxlenlen(s)
Get the maximum length of leading bytes needed to determine the length of a multi-byte gb18030 code.
Definition: m_ctype.h:714
#define my_mbcharlen(s, a)
Definition: m_ctype.h:693
Definition: commit_order_queue.h:33
#define GET
Definition: sql_load.cc:114
#define PUSH(A)
Definition: sql_load.cc:115

The logic here is similar with my_mbcharlen, except for GET and PUSH.

Parameters
[in]cscharset info
[in]chrthe first char of sequence
[out]lenthe length of multi-byte char

◆ PUSH

#define PUSH (   A)    *(stack_pos++) = (A)

Function Documentation

◆ my_tospace()

static int my_tospace ( int  chr)
static

Convert newline, linefeed, tab to space.

Parameters
chrcharacter

According to the "XML 1.0" standard, only space (#x20) characters, carriage returns, line feeds or tabs are considered as spaces. Convert all of them to space (#x20) for parsing simplicity.

◆ my_xml_entity_to_char()

static int my_xml_entity_to_char ( const char *  name,
size_t  length 
)
static