1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-01 06:46:55 +03:00

MCOL-477 Change autoincrement on ALTER TABLE

This patch allows the following syntax to change the current
autoincrement value for the table:

ALTER TABLE table_name COMMENT='autoincrement=value';

Where "value" is the new integer to be used.
This commit is contained in:
Andrew Hutchings
2017-01-05 15:03:54 +00:00
parent 30bd422537
commit bb800e4771
9 changed files with 210 additions and 7 deletions

View File

@ -184,6 +184,11 @@ int AlterTableStatement::unserialize(ByteStream& bytestream)
ata->unserialize(bytestream);
fActions.push_back( ata );
break;
case DDL_ATA_TABLE_COMMENT:
ata = new AtaTableComment();
ata->unserialize(bytestream);
fActions.push_back( ata );
break;
default:
throw("Bad typecode for AlterTableAction");
break;
@ -917,6 +922,33 @@ int AtaDropTableConstraint::serialize(ByteStream& bytestream)
}
///////////////////////////////////////
/// AtaTableComment Serialization
///////////////////////////////////////
/** @brief Construct from Bytestream */
int AtaTableComment::unserialize(ByteStream& bytestream)
{
int ret=1;
// read table constraint
bytestream >> fTableComment;
return ret;
}
/** @brief Serialize to ByteStream */
int AtaTableComment::serialize(ByteStream& bytestream)
{
int ret=1;
bytestream << (quadbyte) DDL_ATA_TABLE_COMMENT;
bytestream << fTableComment;
return ret;
}
///////////////////////////////////////
/// AtaRenameTable Serialization