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
ed68b615
Commit
ed68b615
authored
Dec 30, 2002
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge work.mysql.com:/home/bk/mysql-4.1
into myvenu.com:/home/venu/bk/src-4.1 sql/sql_table.cc: Auto merged
parents
f32d1148
cbe18bae
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
10 deletions
+27
-10
mysql-test/r/create.result
mysql-test/r/create.result
+13
-2
mysql-test/t/create.test
mysql-test/t/create.test
+6
-2
sql/sql_table.cc
sql/sql_table.cc
+8
-6
No files found.
mysql-test/r/create.result
View file @
ed68b615
...
...
@@ -198,9 +198,9 @@ t3 CREATE TABLE `t3` (
) TYPE=MyISAM CHARSET=latin1
select * from t3;
id name
drop table t3;
drop table t2, t3;
drop database if exists test_$1;
create database test_$1;
drop table if exists test_$1.t3;
create table test_$1.t3 like t1;
create temporary table t3 like test_$1.t3;
show create table t3;
...
...
@@ -209,6 +209,15 @@ t3 CREATE TEMPORARY TABLE `t3` (
`id` int(11) NOT NULL default '0',
`name` char(20) character set latin1 default NULL
) TYPE=MyISAM CHARSET=latin1
create table t2 like t3;
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`id` int(11) NOT NULL default '0',
`name` char(20) character set latin1 default NULL
) TYPE=MyISAM CHARSET=latin1
select * from t2;
id name
create table t3 like t1;
create table t3 like test_$1.t3;
Table 't3' already exists
...
...
@@ -218,6 +227,8 @@ create table t3 like non_existing_table;
Unknown table 'non_existing_table'
create temporary table t3 like t1;
Table 't3' already exists
create table t3 like `a/a`;
Incorrect table name 'a/a'
drop table t1, t2, t3;
drop table t3;
drop database test_$1;
mysql-test/t/create.test
View file @
ed68b615
...
...
@@ -134,18 +134,22 @@ select * from t3;
drop
table
t3
;
show
create
table
t3
;
select
*
from
t3
;
drop
table
t3
;
drop
table
t2
,
t3
;
drop
database
if
exists
test_
$
1
;
create
database
test_
$
1
;
drop
table
if
exists
test_
$
1.
t3
;
create
table
test_
$
1.
t3
like
t1
;
create
temporary
table
t3
like
test_
$
1.
t3
;
show
create
table
t3
;
create
table
t2
like
t3
;
show
create
table
t2
;
select
*
from
t2
;
create
table
t3
like
t1
;
!
$
1050
create
table
t3
like
test_
$
1.
t3
;
--
error
1044
,
1
create
table
non_existing_database
.
t1
like
t1
;
!
$
1051
create
table
t3
like
non_existing_table
;
!
$
1050
create
temporary
table
t3
like
t1
;
!
$
1103
create
table
t3
like
`a/a`
;
drop
table
t1
,
t2
,
t3
;
drop
table
t3
;
drop
database
test_
$
1
;
...
...
sql/sql_table.cc
View file @
ed68b615
...
...
@@ -1415,8 +1415,8 @@ int mysql_create_like_table(THD* thd, TABLE_LIST* table,
check_table_name
(
src_table
,
table_ident
->
table
.
length
))
||
table_ident
->
db
.
str
&&
check_db_name
((
src_db
=
table_ident
->
db
.
str
)))
{
net_printf
(
thd
,
ER_WRONG_TABLE_NAME
,
src_table
);
DBUG_RETURN
(
0
);
my_error
(
ER_WRONG_TABLE_NAME
,
MYF
(
0
),
src_table
);
DBUG_RETURN
(
-
1
);
}
if
((
tmp_table
=
find_temporary_table
(
thd
,
src_db
,
src_table
)))
...
...
@@ -1472,14 +1472,16 @@ int mysql_create_like_table(THD* thd, TABLE_LIST* table,
{
if
(
err
||
!
open_temporary_table
(
thd
,
dst_path
,
db
,
table_name
,
1
))
{
(
void
)
rm_temporary_table
(
create_info
->
db_type
,
dst_path
);
DBUG_RETURN
(
-
1
);
(
void
)
rm_temporary_table
(
create_info
->
db_type
,
dst_path
);
/* purecov: inspected */
DBUG_RETURN
(
-
1
);
/* purecov: inspected */
}
}
else
if
(
err
)
{
(
void
)
quick_rm_table
(
create_info
->
db_type
,
db
,
table_name
);
DBUG_RETURN
(
-
1
);
(
void
)
quick_rm_table
(
create_info
->
db_type
,
db
,
table_name
);
/* purecov: inspected */
DBUG_RETURN
(
-
1
);
/* purecov: inspected */
}
DBUG_RETURN
(
0
);
...
...
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