mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
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 ...
This commit is contained in:
@@ -17683,7 +17683,7 @@ using @code{myisampack}. @xref{Compressed format}.
|
||||
@section @code{ALTER TABLE} Syntax
|
||||
|
||||
@example
|
||||
ALTER [IGNORE] TABLE tbl_name alter_spec [, alter_spec ...]
|
||||
ALTER [IGNORE] TABLE tbl_name alter_spec [, alter_spec ...] [ORDER BY col]
|
||||
|
||||
alter_specification:
|
||||
ADD [COLUMN] create_definition [FIRST | AFTER column_name ]
|
||||
@@ -17832,6 +17832,14 @@ index exists, it drops the first @code{UNIQUE} index in the table.
|
||||
(@strong{MySQL} marks the first @code{UNIQUE} key as the @code{PRIMARY KEY}
|
||||
if no @code{PRIMARY KEY} was specified explicitly.)
|
||||
|
||||
@findex ORDER BY
|
||||
@item
|
||||
@code {ORDER BY} allows you to create the new table with the rows in a
|
||||
specific order. Note that the table will not remain in this order after
|
||||
inserts and deletes. In some cases, it may make sorting easier for
|
||||
@strong{MySQL} if the table is in order by the column that you wish to
|
||||
order it by later.
|
||||
|
||||
@findex ALTER TABLE
|
||||
@item
|
||||
If you use @code{ALTER TABLE} on a @code{MyISAM} table, all non-unique
|
||||
@@ -38312,6 +38320,9 @@ a temporary table
|
||||
@item
|
||||
@code{CHANGE MASTER TO} without specifying @code{MASTER_LOG_POS} would
|
||||
set it to 0 instead of 4 and hit the magic number in the master binlog.
|
||||
@item
|
||||
@code{ALTER TABLE ... ORDER BY ...} syntax added. This will create the
|
||||
new table with the rows in a specific order.
|
||||
|
||||
@end itemize
|
||||
|
||||
|
Reference in New Issue
Block a user