MySQL  8.0.17
Source Code Documentation
sql_check_constraint.h File Reference
#include <map>
#include "lex_string.h"
#include "mem_root_array.h"
#include "sql/dd/string_type.h"

Go to the source code of this file.

Classes

class  Sql_check_constraint_spec
 Class to represent the check constraint specifications obtained from the SQL statement parse. More...
 
class  Sql_check_constraint_share
 Class to represent check constraint in the TABLE_SHARE. More...
 
class  Sql_table_check_constraint
 Class to represent check constraint in the TABLE instance. More...
 

Typedefs

using Sql_check_constraint_spec_list = Mem_root_array< Sql_check_constraint_spec * >
 Type for the list of Sql_check_constraint_spec elements. More...
 
using Sql_check_constraint_share_list = Mem_root_array< Sql_check_constraint_share * >
 Type for the list of Sql_check_constraint_share elements. More...
 
using Sql_table_check_constraint_list = Mem_root_array< Sql_table_check_constraint * >
 Type for the list of Sql_table_check_constraint elements. More...
 

Functions

bool is_slave_with_master_without_check_constraints_support (THD *thd)
 Method to check if server is a slave server and master server is on a version not supporting check constraints feature. More...
 

Typedef Documentation

◆ Sql_check_constraint_share_list

Type for the list of Sql_check_constraint_share elements.

◆ Sql_check_constraint_spec_list

Type for the list of Sql_check_constraint_spec elements.

◆ Sql_table_check_constraint_list

Type for the list of Sql_table_check_constraint elements.

Function Documentation

◆ is_slave_with_master_without_check_constraints_support()

bool is_slave_with_master_without_check_constraints_support ( THD thd)

Method to check if server is a slave server and master server is on a version not supporting check constraints feature.

Check constraint support is introduced in server version 80016.

Method is used by methods prepare_check_constraints_for_create() and prepare_check_constraints_for_alter(). Check constraints are not prepared (and specification list is cleared) when this method returns to true. In older versions, check constraint syntax was supported but check constraint feature was not supported. So if master is on older version and slave gets event with check constraint syntax then on slave supporting check constraint, query is parsed but during prepare time the specifications are ignored for the statement(event).

Return values
trueif server is a slave server and master server is on a version not supporting check constraints feature.
falseOtherwise.