MySQL 8.4.3
Source Code Documentation
key_spec.cc File Reference
#include "sql/key_spec.h"
#include <stddef.h>
#include <algorithm>
#include <cstring>
#include <string>
#include "my_dbug.h"
#include "my_inttypes.h"
#include "my_sys.h"
#include "mysql/strings/m_ctype.h"
#include "mysql_com.h"
#include "mysqld_error.h"
#include "sql/create_field.h"
#include "sql/dd/dd.h"
#include "sql/dd/dictionary.h"
#include "sql/derror.h"
#include "sql/item.h"
#include "sql/item_func.h"
#include "sql/sql_class.h"
#include "sql/sql_parse.h"
#include "sql/table.h"
#include "sql_lex.h"

Functions

bool foreign_key_prefix (const Key_spec *a, const Key_spec *b)
 Test if a foreign key (= generated key) is a prefix of the given key (ignoring key name, key type and order of columns) More...
 

Variables

KEY_CREATE_INFO default_key_create_info
 

Function Documentation

◆ foreign_key_prefix()

bool foreign_key_prefix ( const Key_spec a,
const Key_spec b 
)

Test if a foreign key (= generated key) is a prefix of the given key (ignoring key name, key type and order of columns)

Note
This is only used to test if an index for a FOREIGN KEY exists. We only compare field names.
Return values
falseGenerated key is a prefix of other key
trueNot equal

Variable Documentation

◆ default_key_create_info

KEY_CREATE_INFO default_key_create_info