MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Alter_table_ctx Class Reference

#include <sql_alter.h>

Collaboration diagram for Alter_table_ctx:

Public Member Functions

 Alter_table_ctx (THD *thd, TABLE_LIST *table_list, uint tables_opened_arg, char *new_db_arg, char *new_name_arg)
bool is_database_changed () const
bool is_table_renamed () const
const char * get_new_filename () const
const char * get_path () const
const char * get_new_path () const
const char * get_tmp_path () const
void set_fk_error_if_delete_row (FOREIGN_KEY_INFO *fk)

Public Attributes

Create_fielddatetime_field
bool error_if_not_empty
uint tables_opened
char * db
char * table_name
char * alias
char * new_db
char * new_name
char * new_alias
char tmp_name [80]
bool fk_error_if_delete_row
const char * fk_error_id
const char * fk_error_table

Detailed Description

Runtime context for ALTER TABLE.

Definition at line 260 of file sql_alter.h.

Member Function Documentation

const char* Alter_table_ctx::get_new_filename ( ) const
inline
Returns
filename (including .frm) for the new table.

Definition at line 283 of file sql_alter.h.

const char* Alter_table_ctx::get_new_path ( ) const
inline
Returns
path to the new table.

Definition at line 301 of file sql_alter.h.

const char* Alter_table_ctx::get_path ( ) const
inline
Returns
path to the original table.

Definition at line 292 of file sql_alter.h.

const char* Alter_table_ctx::get_tmp_path ( ) const
inline
Returns
path to the temporary table created during ALTER TABLE.

Definition at line 310 of file sql_alter.h.

bool Alter_table_ctx::is_database_changed ( ) const
inline
Returns
true if the table is moved to another database, false otherwise.

Definition at line 271 of file sql_alter.h.

Here is the caller graph for this function:

bool Alter_table_ctx::is_table_renamed ( ) const
inline
Returns
true if the table is renamed, false otherwise.

Definition at line 277 of file sql_alter.h.

Here is the call graph for this function:

void Alter_table_ctx::set_fk_error_if_delete_row ( FOREIGN_KEY_INFO fk)
inline

Mark ALTER TABLE as needing to produce foreign key error if it deletes a row from the table being changed.

Definition at line 317 of file sql_alter.h.

Member Data Documentation

const char* Alter_table_ctx::fk_error_id

Name of foreign key for the above error.

Definition at line 342 of file sql_alter.h.

bool Alter_table_ctx::fk_error_if_delete_row

Indicates that if a row is deleted during copying of data from old version of table to the new version ER_FK_CANNOT_DELETE_PARENT error should be emitted.

Definition at line 340 of file sql_alter.h.

const char* Alter_table_ctx::fk_error_table

Name of table for the above error.

Definition at line 344 of file sql_alter.h.


The documentation for this class was generated from the following files: