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
7bfdc5bb
Commit
7bfdc5bb
authored
Sep 04, 2009
by
Satya B
Browse files
Options
Browse Files
Download
Plain Diff
merge mysql-5.0-bugteam to mysql-5.1-bugteam
parents
83967a64
6e27ef43
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
1 deletion
+31
-1
mysql-test/r/create.result
mysql-test/r/create.result
+13
-0
mysql-test/t/create.test
mysql-test/t/create.test
+17
-0
sql/sql_insert.cc
sql/sql_insert.cc
+1
-1
No files found.
mysql-test/r/create.result
View file @
7bfdc5bb
...
@@ -1572,6 +1572,19 @@ CREATE TABLE IF NOT EXISTS t2 (a INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY)
...
@@ -1572,6 +1572,19 @@ CREATE TABLE IF NOT EXISTS t2 (a INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY)
SELECT a FROM t1;
SELECT a FROM t1;
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
DROP TABLE t1, t2;
DROP TABLE t1, t2;
#
# BUG#46384 - mysqld segfault when trying to create table with same
# name as existing view
#
CREATE TABLE t1 (a INT);
CREATE TABLE t2 (a INT);
INSERT INTO t1 VALUES (1),(2),(3);
INSERT INTO t2 VALUES (1),(2),(3);
CREATE VIEW v1 AS SELECT t1.a FROM t1, t2;
CREATE TABLE v1 AS SELECT * FROM t1;
ERROR 42S01: Table 'v1' already exists
DROP VIEW v1;
DROP TABLE t1,t2;
End of 5.0 tests
End of 5.0 tests
CREATE TABLE t1 (a int, b int);
CREATE TABLE t1 (a int, b int);
insert into t1 values (1,1),(1,2);
insert into t1 values (1,1),(1,2);
...
...
mysql-test/t/create.test
View file @
7bfdc5bb
...
@@ -1198,6 +1198,23 @@ CREATE TABLE IF NOT EXISTS t2 (a INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY)
...
@@ -1198,6 +1198,23 @@ CREATE TABLE IF NOT EXISTS t2 (a INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY)
DROP
TABLE
t1
,
t2
;
DROP
TABLE
t1
,
t2
;
--
echo
#
--
echo
# BUG#46384 - mysqld segfault when trying to create table with same
--
echo
# name as existing view
--
echo
#
CREATE
TABLE
t1
(
a
INT
);
CREATE
TABLE
t2
(
a
INT
);
INSERT
INTO
t1
VALUES
(
1
),(
2
),(
3
);
INSERT
INTO
t2
VALUES
(
1
),(
2
),(
3
);
CREATE
VIEW
v1
AS
SELECT
t1
.
a
FROM
t1
,
t2
;
--
error
ER_TABLE_EXISTS_ERROR
CREATE
TABLE
v1
AS
SELECT
*
FROM
t1
;
DROP
VIEW
v1
;
DROP
TABLE
t1
,
t2
;
--
echo
End
of
5.0
tests
--
echo
End
of
5.0
tests
...
...
sql/sql_insert.cc
View file @
7bfdc5bb
...
@@ -3596,7 +3596,7 @@ select_create::prepare(List<Item> &values, SELECT_LEX_UNIT *u)
...
@@ -3596,7 +3596,7 @@ select_create::prepare(List<Item> &values, SELECT_LEX_UNIT *u)
DBUG_EXECUTE_IF
(
"sleep_create_select_before_check_if_exists"
,
my_sleep
(
6000000
););
DBUG_EXECUTE_IF
(
"sleep_create_select_before_check_if_exists"
,
my_sleep
(
6000000
););
if
(
!
(
create_info
->
options
&
HA_LEX_CREATE_TMP_TABLE
)
&&
if
(
!
(
create_info
->
options
&
HA_LEX_CREATE_TMP_TABLE
)
&&
create_table
->
table
->
db_stat
)
(
create_table
->
table
&&
create_table
->
table
->
db_stat
)
)
{
{
/* Table already exists and was open at open_and_lock_tables() stage. */
/* Table already exists and was open at open_and_lock_tables() stage. */
if
(
create_info
->
options
&
HA_LEX_CREATE_IF_NOT_EXISTS
)
if
(
create_info
->
options
&
HA_LEX_CREATE_IF_NOT_EXISTS
)
...
...
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