You've already forked mariadb-columnstore-engine
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:
@ -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
|
||||
|
Reference in New Issue
Block a user