List:Internals« Previous MessageNext Message »
From:Sergei Golubchik Date:December 5 2005 11:08am
Subject:bk commit into 5.0 tree (serg:1.2051)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of serg. When serg does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.2051 05/12/05 12:08:30 serg@stripped +3 -0
  better error for optimize/repair/etc a view

  sql/sql_table.cc
    1.291 05/12/05 12:08:19 serg@stripped +2 -9
    better error for optimize/repair/etc a view

  mysql-test/r/view.result
    1.137 05/12/05 12:08:19 serg@stripped +11 -6
    better error for optimize/repair/etc a view

  mysql-test/r/sp.result
    1.174 05/12/05 12:08:19 serg@stripped +12 -12
    better error for optimize/repair/etc a view

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	serg
# Host:	serg.mylan
# Root:	/usr/home/serg/Abk/mysql-5.0

--- 1.290/sql/sql_table.cc	Sat Dec  3 15:01:53 2005
+++ 1.291/sql/sql_table.cc	Mon Dec  5 12:08:19 2005
@@ -2225,18 +2225,11 @@ static bool mysql_admin_table(THD* thd, 
     lex->query_tables_own_last= 0;
     thd->no_warnings_for_error= no_warnings_for_error;
     if (view_operator_func == NULL)
-      simple_open_n_lock_tables(thd, table);
-    else
-      open_and_lock_tables(thd, table);
+      table->required_type=FRMTYPE_TABLE;
+    open_and_lock_tables(thd, table);
     thd->no_warnings_for_error= 0;
     table->next_global= save_next_global;
     table->next_local= save_next_local;
-    /* if view are unsupported */
-    if (table->view && view_operator_func == NULL)
-    {
-      result_code= HA_ADMIN_NOT_BASE_TABLE;
-      goto send_result;
-    }
     thd->open_options&= ~extra_open_options;
 
     if (prepare_func)

--- 1.136/mysql-test/r/view.result	Fri Nov 18 15:26:43 2005
+++ 1.137/mysql-test/r/view.result	Mon Dec  5 12:08:19 2005
@@ -2383,20 +2383,25 @@ 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	Unknown table 'test.v1'
+test.v1	optimize	error	'test.v1' is not BASE TABLE
+Warnings:
+Error	1347	'test.v1' is not BASE TABLE
 ANALYZE TABLE v1;
 Table	Op	Msg_type	Msg_text
-test.v1	analyze	note	Unknown table 'test.v1'
+test.v1	analyze	error	'test.v1' is not BASE TABLE
+Warnings:
+Error	1347	'test.v1' is not BASE TABLE
 REPAIR TABLE v1;
 Table	Op	Msg_type	Msg_text
-test.v1	repair	note	Unknown table 'test.v1'
+test.v1	repair	error	'test.v1' is not BASE TABLE
+Warnings:
+Error	1347	'test.v1' is not BASE TABLE
 DROP TABLE t1;
 OPTIMIZE TABLE v1;
 Table	Op	Msg_type	Msg_text
-test.v1	optimize	note	Unknown table 'test.v1'
+test.v1	optimize	error	'test.v1' is not BASE TABLE
 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
+Error	1347	'test.v1' is not BASE TABLE
 DROP VIEW v1;
 create definer = current_user() sql security invoker view v1 as select 1;
 show create view v1;

--- 1.173/mysql-test/r/sp.result	Sat Dec  3 15:01:51 2005
+++ 1.174/mysql-test/r/sp.result	Mon Dec  5 12:08:19 2005
@@ -4180,55 +4180,55 @@ Table	Op	Msg_type	Msg_text
 test.t1	repair	status	OK
 test.t2	repair	status	OK
 test.t3	repair	error	Table 'test.t3' doesn't exist
-test.v1	repair	note	Unknown table 'test.v1'
+test.v1	repair	error	'test.v1' is not BASE TABLE
 Table	Op	Msg_type	Msg_text
 test.t1	optimize	status	OK
 test.t2	optimize	status	OK
 test.t3	optimize	error	Table 'test.t3' doesn't exist
-test.v1	optimize	note	Unknown table 'test.v1'
+test.v1	optimize	error	'test.v1' is not BASE TABLE
 Table	Op	Msg_type	Msg_text
 test.t1	analyze	status	Table is already up to date
 test.t2	analyze	status	Table is already up to date
 test.t3	analyze	error	Table 'test.t3' doesn't exist
-test.v1	analyze	note	Unknown table 'test.v1'
+test.v1	analyze	error	'test.v1' is not BASE TABLE
 Warnings:
-Error	1146	Table 'test.t3' doesn't exist
+Error	1347	'test.v1' is not BASE TABLE
 call bug13012()|
 Table	Op	Msg_type	Msg_text
 test.t1	repair	status	OK
 test.t2	repair	status	OK
 test.t3	repair	error	Table 'test.t3' doesn't exist
-test.v1	repair	note	Unknown table 'test.v1'
+test.v1	repair	error	'test.v1' is not BASE TABLE
 Table	Op	Msg_type	Msg_text
 test.t1	optimize	status	OK
 test.t2	optimize	status	OK
 test.t3	optimize	error	Table 'test.t3' doesn't exist
-test.v1	optimize	note	Unknown table 'test.v1'
+test.v1	optimize	error	'test.v1' is not BASE TABLE
 Table	Op	Msg_type	Msg_text
 test.t1	analyze	status	Table is already up to date
 test.t2	analyze	status	Table is already up to date
 test.t3	analyze	error	Table 'test.t3' doesn't exist
-test.v1	analyze	note	Unknown table 'test.v1'
+test.v1	analyze	error	'test.v1' is not BASE TABLE
 Warnings:
-Error	1146	Table 'test.t3' doesn't exist
+Error	1347	'test.v1' is not BASE TABLE
 call bug13012()|
 Table	Op	Msg_type	Msg_text
 test.t1	repair	status	OK
 test.t2	repair	status	OK
 test.t3	repair	error	Table 'test.t3' doesn't exist
-test.v1	repair	note	Unknown table 'test.v1'
+test.v1	repair	error	'test.v1' is not BASE TABLE
 Table	Op	Msg_type	Msg_text
 test.t1	optimize	status	OK
 test.t2	optimize	status	OK
 test.t3	optimize	error	Table 'test.t3' doesn't exist
-test.v1	optimize	note	Unknown table 'test.v1'
+test.v1	optimize	error	'test.v1' is not BASE TABLE
 Table	Op	Msg_type	Msg_text
 test.t1	analyze	status	Table is already up to date
 test.t2	analyze	status	Table is already up to date
 test.t3	analyze	error	Table 'test.t3' doesn't exist
-test.v1	analyze	note	Unknown table 'test.v1'
+test.v1	analyze	error	'test.v1' is not BASE TABLE
 Warnings:
-Error	1146	Table 'test.t3' doesn't exist
+Error	1347	'test.v1' is not BASE TABLE
 drop procedure bug13012|
 drop view v1;
 select * from t1|
Thread
bk commit into 5.0 tree (serg:1.2051)Sergei Golubchik5 Dec