Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
719089a8
Commit
719089a8
authored
Dec 05, 2005
by
serg@serg.mylan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
better error for optimize/repair/etc a view
parent
9c0a8bbd
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
27 deletions
+25
-27
mysql-test/r/sp.result
mysql-test/r/sp.result
+12
-12
mysql-test/r/view.result
mysql-test/r/view.result
+11
-6
sql/sql_table.cc
sql/sql_table.cc
+2
-9
No files found.
mysql-test/r/sp.result
View file @
719089a8
...
@@ -4180,55 +4180,55 @@ Table Op Msg_type Msg_text
...
@@ -4180,55 +4180,55 @@ Table Op Msg_type Msg_text
test.t1 repair status OK
test.t1 repair status OK
test.t2 repair status OK
test.t2 repair status OK
test.t3 repair error Table 'test.t3' doesn't exist
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
Table Op Msg_type Msg_text
test.t1 optimize status OK
test.t1 optimize status OK
test.t2 optimize status OK
test.t2 optimize status OK
test.t3 optimize error Table 'test.t3' doesn't exist
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
Table Op Msg_type Msg_text
test.t1 analyze status Table is already up to date
test.t1 analyze status Table is already up to date
test.t2 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.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:
Warnings:
Error 1
146 Table 'test.t3' doesn't exist
Error 1
347 'test.v1' is not BASE TABLE
call bug13012()|
call bug13012()|
Table Op Msg_type Msg_text
Table Op Msg_type Msg_text
test.t1 repair status OK
test.t1 repair status OK
test.t2 repair status OK
test.t2 repair status OK
test.t3 repair error Table 'test.t3' doesn't exist
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
Table Op Msg_type Msg_text
test.t1 optimize status OK
test.t1 optimize status OK
test.t2 optimize status OK
test.t2 optimize status OK
test.t3 optimize error Table 'test.t3' doesn't exist
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
Table Op Msg_type Msg_text
test.t1 analyze status Table is already up to date
test.t1 analyze status Table is already up to date
test.t2 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.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:
Warnings:
Error 1
146 Table 'test.t3' doesn't exist
Error 1
347 'test.v1' is not BASE TABLE
call bug13012()|
call bug13012()|
Table Op Msg_type Msg_text
Table Op Msg_type Msg_text
test.t1 repair status OK
test.t1 repair status OK
test.t2 repair status OK
test.t2 repair status OK
test.t3 repair error Table 'test.t3' doesn't exist
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
Table Op Msg_type Msg_text
test.t1 optimize status OK
test.t1 optimize status OK
test.t2 optimize status OK
test.t2 optimize status OK
test.t3 optimize error Table 'test.t3' doesn't exist
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
Table Op Msg_type Msg_text
test.t1 analyze status Table is already up to date
test.t1 analyze status Table is already up to date
test.t2 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.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:
Warnings:
Error 1
146 Table 'test.t3' doesn't exist
Error 1
347 'test.v1' is not BASE TABLE
drop procedure bug13012|
drop procedure bug13012|
drop view v1;
drop view v1;
select * from t1|
select * from t1|
...
...
mysql-test/r/view.result
View file @
719089a8
...
@@ -2383,20 +2383,25 @@ CREATE TABLE t1(id INT);
...
@@ -2383,20 +2383,25 @@ CREATE TABLE t1(id INT);
CREATE VIEW v1 AS SELECT id FROM t1;
CREATE VIEW v1 AS SELECT id FROM t1;
OPTIMIZE TABLE v1;
OPTIMIZE TABLE v1;
Table Op Msg_type Msg_text
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;
ANALYZE TABLE v1;
Table Op Msg_type Msg_text
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;
REPAIR TABLE v1;
Table Op Msg_type Msg_text
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;
DROP TABLE t1;
OPTIMIZE TABLE v1;
OPTIMIZE TABLE v1;
Table Op Msg_type Msg_text
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:
Warnings:
Error 1146 Table 'test.t1' doesn't exist
Error 1347 'test.v1' is not BASE TABLE
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;
DROP VIEW v1;
create definer = current_user() sql security invoker view v1 as select 1;
create definer = current_user() sql security invoker view v1 as select 1;
show create view v1;
show create view v1;
...
...
sql/sql_table.cc
View file @
719089a8
...
@@ -2225,18 +2225,11 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
...
@@ -2225,18 +2225,11 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
lex
->
query_tables_own_last
=
0
;
lex
->
query_tables_own_last
=
0
;
thd
->
no_warnings_for_error
=
no_warnings_for_error
;
thd
->
no_warnings_for_error
=
no_warnings_for_error
;
if
(
view_operator_func
==
NULL
)
if
(
view_operator_func
==
NULL
)
simple_open_n_lock_tables
(
thd
,
table
);
table
->
required_type
=
FRMTYPE_TABLE
;
else
open_and_lock_tables
(
thd
,
table
);
open_and_lock_tables
(
thd
,
table
);
thd
->
no_warnings_for_error
=
0
;
thd
->
no_warnings_for_error
=
0
;
table
->
next_global
=
save_next_global
;
table
->
next_global
=
save_next_global
;
table
->
next_local
=
save_next_local
;
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
;
thd
->
open_options
&=
~
extra_open_options
;
if
(
prepare_func
)
if
(
prepare_func
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment