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

SQL: comment and check about ALTER in update_auto_increment()

This commit is contained in:
Aleksey Midenkov
2017-07-24 16:22:59 +03:00
parent aa292666cc
commit 88454b3320

View File

@ -3029,7 +3029,8 @@ int handler::update_auto_increment()
enum enum_check_fields save_count_cuted_fields;
DBUG_ENTER("handler::update_auto_increment");
if (table->versioned_by_sql())
// System Versioning: handle ALTER ADD COLUMN AUTO_INCREMENT
if (thd->lex->sql_command == SQLCOM_ALTER_TABLE && table->versioned_by_sql())
{
Field *end= table->vers_end_field();
DBUG_ASSERT(end);