diff options
| author | Elena Stepanova <elenst@mariadb.com> | 2022-01-09 01:39:57 +0200 |
|---|---|---|
| committer | Elena Stepanova <elenst@mariadb.com> | 2022-01-09 01:39:57 +0200 |
| commit | bc65ed112e427e164b2ad7e22fdccd78c981a1e3 (patch) | |
| tree | 322482f35067218dc073b4b6c3be1a4723c0b06f | |
| parent | c13c1079b7d78158f14f549611f84d43fa199946 (diff) | |
| download | mariadb-git-tst-10.8-elenst.tar.gz | |
Test commit, not to be merged anywheretst-10.8-elenst
| -rw-r--r-- | sql/sql_lex.cc | 5 | ||||
| -rw-r--r-- | sql/sql_yacc.yy | 11 |
2 files changed, 11 insertions, 5 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index b5f8cf4a886..8206dfb5b54 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -512,8 +512,9 @@ void LEX::add_key_to_list(LEX_CSTRING *field_name, DDL_options(check_exists ? DDL_options::OPT_IF_NOT_EXISTS : DDL_options::OPT_NONE)); - key->columns.push_back(new (mem_root) Key_part_spec(field_name, 0), - mem_root); + Key_part_spec *kps= new (mem_root) Key_part_spec(field_name, 0); + kps->asc= 0; + key->columns.push_back(kps, mem_root); alter_info.key_list.push_back(key, mem_root); } diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index faea2120c06..a1268c6a22e 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -1405,7 +1405,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize); %type <create_field> field_spec column_def %type <num> - order_dir lock_option + order_dir order_dir_ind lock_option udf_type opt_local opt_no_write_to_binlog opt_temporary all_or_any opt_distinct opt_glimit_clause opt_ignore_leaves fulltext_options union_option @@ -6842,12 +6842,12 @@ ignorability: ; key_list: - key_list ',' key_part order_dir + key_list ',' key_part order_dir_ind { $3->asc= $4; Lex->last_key->columns.push_back($3, thd->mem_root); } - | key_part order_dir + | key_part order_dir_ind { $1->asc= $2; Lex->last_key->columns.push_back($1, thd->mem_root); @@ -12219,6 +12219,11 @@ order_dir: | DESC { $$= 0; } ; +order_dir_ind: + /* empty */ { $$= 0; } + | ASC { $$= 1; } + | DESC { $$= 0; } + ; opt_limit_clause: /* empty */ |
