Commit 65d0e46d authored by unknown's avatar unknown

Merge weblab.(none):/home/marcsql/TREE/mysql-4.1-24562

into  weblab.(none):/home/marcsql/TREE/mysql-5.0-24562-merge


mysql-test/t/alter_table.test:
  Auto merged
parents fa710dfb d4ee8ceb
......@@ -528,6 +528,71 @@ SHOW INDEX FROM bug24219_2;
DROP TABLE bug24219_2;
#
# Bug#24562 (ALTER TABLE ... ORDER BY ... with complex expression asserts)
#
--disable_warnings
drop table if exists table_24562;
--enable_warnings
create table table_24562(
section int,
subsection int,
title varchar(50));
insert into table_24562 values
(1, 0, "Introduction"),
(1, 1, "Authors"),
(1, 2, "Acknowledgements"),
(2, 0, "Basics"),
(2, 1, "Syntax"),
(2, 2, "Client"),
(2, 3, "Server"),
(3, 0, "Intermediate"),
(3, 1, "Complex queries"),
(3, 2, "Stored Procedures"),
(3, 3, "Stored Functions"),
(4, 0, "Advanced"),
(4, 1, "Replication"),
(4, 2, "Load balancing"),
(4, 3, "High availability"),
(5, 0, "Conclusion");
select * from table_24562;
alter table table_24562 add column reviewer varchar(20),
order by title;
select * from table_24562;
update table_24562 set reviewer="Me" where section=2;
update table_24562 set reviewer="You" where section=3;
alter table table_24562
order by section ASC, subsection DESC;
select * from table_24562;
alter table table_24562
order by table_24562.subsection ASC, table_24562.section DESC;
select * from table_24562;
--error 1064
alter table table_24562 order by 12;
--error 1064
alter table table_24562 order by (section + 12);
--error 1064
alter table table_24562 order by length(title);
--error 1064
alter table table_24562 order by (select 12 from dual);
--error 1054
alter table table_24562 order by no_such_col;
drop table table_24562;
# End of 4.1 tests
#
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment