summaryrefslogtreecommitdiff
path: root/sql/sql_yacc.yy
diff options
context:
space:
mode:
authorunknown <jcole@tetra.bedford.progress.com>2000-11-11 12:27:34 -0600
committerunknown <jcole@tetra.bedford.progress.com>2000-11-11 12:27:34 -0600
commitc0f040274d2c452c5bada8b3adb623d98c149b2e (patch)
tree668d3864fb0236ab961658a071aed0dd51ae8ac5 /sql/sql_yacc.yy
parent1acd5898cec6c07b8b28dd345f152dc0fcceaa3b (diff)
downloadmariadb-git-c0f040274d2c452c5bada8b3adb623d98c149b2e.tar.gz
Added ALTER TABLE ... ORDER BY ...
Docs/manual.texi: Added documentation for ALTER TABLE ... ORDER BY ... sql/mysql_priv.h: Exported make_unireg_sortorder Exported setup_order sql/sql_base.cc: Changes for ALTER TABLE ... ORDER BY ... sql/sql_parse.cc: Changes for ALTER TABLE ... ORDER BY ... sql/sql_select.cc: Moved make_unireg_sortorder and setup_order prototypes to mysql_priv.h and made them non-static so that they can be used elsewhere. Needed for ALTER TABLE ... ORDER BY ...
Diffstat (limited to 'sql/sql_yacc.yy')
-rw-r--r--sql/sql_yacc.yy12
1 files changed, 8 insertions, 4 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index f7497d605cc..5d62fbe84ba 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -1030,14 +1030,18 @@ alter:
lex->col_list.empty();
lex->drop_list.empty();
lex->alter_list.empty();
+ lex->order_list.elements=0;
+ lex->order_list.first=0;
+ lex->order_list.next= (byte**) &lex->order_list.first;
lex->db=lex->name=0;
bzero((char*) &lex->create_info,sizeof(lex->create_info));
lex->create_info.db_type= DB_TYPE_DEFAULT;
}
- alter_list opt_create_table_options
-
+ alter_list order_clause opt_create_table_options
+
alter_list:
- alter_list_item
+ /* empty */
+ | alter_list_item
| alter_list ',' alter_list_item
add_column:
@@ -1075,7 +1079,7 @@ alter_list_item:
{ Lex->alter_list.push_back(new Alter_column($3.str,(Item*) 0)); }
| RENAME opt_to table_alias table_ident
{ Lex->db=$4->db.str ; Lex->name= $4->table.str; }
- | create_table_option
+ | opt_create_table_options
opt_column:
/* empty */ {}