1
0
mirror of https://github.com/MariaDB/server.git synced 2025-11-13 21:42:58 +03:00

Merge rurik.mysql.com:/home/igor/mysql-5.0

into  rurik.mysql.com:/home/igor/dev/mysql-5.0-0


sql/handler.h:
  Auto merged
sql/sql_table.cc:
  Auto merged
This commit is contained in:
unknown
2005-11-04 15:03:29 -08:00
5 changed files with 59 additions and 10 deletions

View File

@@ -2335,3 +2335,22 @@ f1 group_concat(f2 order by f2 desc)
1 3,2,1
drop view v1,v2;
drop table t1;
CREATE TABLE t1(id INT);
CREATE VIEW v1 AS SELECT id FROM t1;
OPTIMIZE TABLE v1;
Table Op Msg_type Msg_text
test.v1 optimize note You cannot apply optimize to a view
ANALYZE TABLE v1;
Table Op Msg_type Msg_text
test.v1 analyze note You cannot apply analyze to a view
REPAIR TABLE v1;
Table Op Msg_type Msg_text
test.v1 repair note You cannot apply repair to a view
DROP TABLE t1;
OPTIMIZE TABLE v1;
Table Op Msg_type Msg_text
test.v1 optimize note You cannot apply optimize to a view
Warnings:
Error 1146 Table 'test.t1' doesn't exist
Error 1356 View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
DROP VIEW v1;

View File

@@ -2200,3 +2200,17 @@ select * from v1;
select * from v2;
drop view v1,v2;
drop table t1;
# Bug #14540: OPTIMIZE, ANALYZE, REPAIR applied to not a view
#
CREATE TABLE t1(id INT);
CREATE VIEW v1 AS SELECT id FROM t1;
OPTIMIZE TABLE v1;
ANALYZE TABLE v1;
REPAIR TABLE v1;
DROP TABLE t1;
OPTIMIZE TABLE v1;
DROP VIEW v1;