diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2020-10-02 17:30:02 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2020-10-06 13:50:28 +0200 |
commit | 5933081d8b05893b8987c0c89237b4764a2f22e0 (patch) | |
tree | 7c9eb85382384131ae3a80bcfddb2cf706316777 /sql/sql_yacc.yy | |
parent | b3a9fbdbab5d29408a637d9d2422a75876f76756 (diff) | |
download | mariadb-git-5933081d8b05893b8987c0c89237b4764a2f22e0.tar.gz |
MDEV-18163 Assertion `table_share->tmp_table != NO_TMP_TABLE || m_lock_type != 2' failed in handler::ha_rnd_next(); / Assertion `table_list->table' failed in find_field_in_table_ref / ERROR 1901 (on optimized builds)
Add the same check for altering DEFAULT used as for CREATE TABLE.
Diffstat (limited to 'sql/sql_yacc.yy')
-rw-r--r-- | sql/sql_yacc.yy | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 386c86cb3e2..138d5e13701 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -7692,6 +7692,8 @@ alter_list_item: | ALTER opt_column field_ident SET DEFAULT column_default_expr { LEX *lex=Lex; + if (check_expression($6, $3.str, VCOL_DEFAULT)) + MYSQL_YYABORT; Alter_column *ac= new (thd->mem_root) Alter_column($3.str,$6); if (ac == NULL) MYSQL_YYABORT; |