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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
3e84336f
Commit
3e84336f
authored
Aug 03, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge grichter@bk-internal.mysql.com:/home/bk/mysql-5.0
into lmy002.wdf.sap.corp:/home/georg/work/mysql/prod/mysql-5.0
parents
ec9470b5
7c173395
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
0 deletions
+26
-0
mysql-test/r/create.result
mysql-test/r/create.result
+7
-0
mysql-test/t/create.test
mysql-test/t/create.test
+10
-0
sql/sql_table.cc
sql/sql_table.cc
+9
-0
No files found.
mysql-test/r/create.result
View file @
3e84336f
...
...
@@ -602,3 +602,10 @@ drop database mysqltest;
create table test.t1 like x;
ERROR 42000: Incorrect database name 'NULL'
drop table if exists test.t1;
create database mysqltest;
use mysqltest;
create view v1 as select 'foo' from dual;
create table t1 like v1;
ERROR HY000: 'mysqltest.v1' is not a table
drop view v1;
drop database mysqltest;
mysql-test/t/create.test
View file @
3e84336f
...
...
@@ -515,4 +515,14 @@ create table test.t1 like x;
drop
table
if
exists
test
.
t1
;
--
enable_warnings
#
# Bug #6859: Bogus error message on attempt to CREATE TABLE t LIKE view
#
create
database
mysqltest
;
use
mysqltest
;
create
view
v1
as
select
'foo'
from
dual
;
--
error
1347
create
table
t1
like
v1
;
drop
view
v1
;
drop
database
mysqltest
;
# End of 4.1 tests
sql/sql_table.cc
View file @
3e84336f
...
...
@@ -2629,6 +2629,15 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table,
}
}
/*
create like should be not allowed for Views, Triggers, ...
*/
if
(
mysql_frm_type
(
src_path
)
!=
FRMTYPE_TABLE
)
{
my_error
(
ER_WRONG_OBJECT
,
MYF
(
0
),
src_db
,
src_table
,
"a table"
);
goto
err
;
}
/*
Validate the destination table
...
...
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