summaryrefslogtreecommitdiff
path: root/sql/sql_yacc_ora.yy
diff options
context:
space:
mode:
authorAleksey Midenkov <midenok@gmail.com>2019-04-11 10:04:34 +0300
committerAleksey Midenkov <midenok@gmail.com>2019-08-11 12:32:08 +0300
commit0b74c8832d45340a455f27c3b4aa20db5d8313db (patch)
treeb0d81bb973c5918b3a4ca273e7e07c2a5e02c385 /sql/sql_yacc_ora.yy
parent638e78853f8d7c0e2c1cf580f3847c5789f165e1 (diff)
downloadmariadb-git-0b74c8832d45340a455f27c3b4aa20db5d8313db.tar.gz
MDEV-19127 Assertion `row_start_field' failed in vers_prepare_keys upon ALTER TABLE
Prevent conflicting clauses at parser level. Clear HA_VERSIONED_TABLE flag for DROP SYSTEM VERSIONING (for the sake of strictness).
Diffstat (limited to 'sql/sql_yacc_ora.yy')
-rw-r--r--sql/sql_yacc_ora.yy6
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/sql_yacc_ora.yy b/sql/sql_yacc_ora.yy
index 45f770b0c88..28d3d1bf90b 100644
--- a/sql/sql_yacc_ora.yy
+++ b/sql/sql_yacc_ora.yy
@@ -7292,6 +7292,11 @@ serial_attribute:
{
Lex->last_field->versioning= $1;
Lex->create_info.options|= HA_VERSIONED_TABLE;
+ if (Lex->alter_info.flags & ALTER_DROP_SYSTEM_VERSIONING)
+ {
+ my_yyabort_error((ER_VERS_NOT_VERSIONED, MYF(0),
+ Lex->create_last_non_select_table->table_name.str));
+ }
}
;
@@ -8435,6 +8440,7 @@ alter_list_item:
| DROP SYSTEM VERSIONING_SYM
{
Lex->alter_info.flags|= ALTER_DROP_SYSTEM_VERSIONING;
+ Lex->create_info.options&= ~HA_VERSIONED_TABLE;
}
| DROP PERIOD_SYM FOR_SYSTEM_TIME_SYM
{