1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

MDEV-14694 ALTER COLUMN IF EXISTS .. causes syntax error.

Implementing the 'IF EXISTS' option for statements
        ALTER TABLE ALTER COLUMN SET/DROP DEFAULT.
This commit is contained in:
Alexey Botchkov
2018-01-30 17:08:36 +04:00
parent 5478547c96
commit 926adcfeea
7 changed files with 85 additions and 29 deletions

View File

@ -284,8 +284,9 @@ class Alter_column :public Sql_alloc {
public:
const char *name;
Virtual_column_info *default_value;
Alter_column(const char *par_name, Virtual_column_info *expr)
:name(par_name), default_value(expr) {}
bool alter_if_exists;
Alter_column(const char *par_name, Virtual_column_info *expr, bool par_exists)
:name(par_name), default_value(expr), alter_if_exists(par_exists) {}
/**
Used to make a clone of this object for ALTER/CREATE TABLE
@sa comment for Key_part_spec::clone