My Project
Public Member Functions | Public Attributes
Alter_table_ctx Class Reference

#include <sql_alter.h>

List of all members.

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.


Member Function Documentation

const char* Alter_table_ctx::get_new_filename ( ) const [inline]
Returns:
filename (including .frm) for the new table.
const char* Alter_table_ctx::get_new_path ( ) const [inline]
Returns:
path to the new table.
const char* Alter_table_ctx::get_path ( ) const [inline]
Returns:
path to the original table.
const char* Alter_table_ctx::get_tmp_path ( ) const [inline]
Returns:
path to the temporary table created during ALTER TABLE.
bool Alter_table_ctx::is_database_changed ( ) const [inline]
Returns:
true if the table is moved to another database, false otherwise.
bool Alter_table_ctx::is_table_renamed ( ) const [inline]
Returns:
true if the table is renamed, false otherwise.

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


Member Data Documentation

Name of foreign key for the above error.

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.

Name of table for the above error.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines