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
73977d11
Commit
73977d11
authored
Jun 01, 2006
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug #18483 Cannot create table with FK constraint
- remove error set for auto partitioned tables
parent
6e20d34b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
1 deletion
+24
-1
mysql-test/r/ndb_basic.result
mysql-test/r/ndb_basic.result
+8
-0
mysql-test/t/ndb_basic.test
mysql-test/t/ndb_basic.test
+14
-0
sql/sql_table.cc
sql/sql_table.cc
+2
-1
No files found.
mysql-test/r/ndb_basic.result
View file @
73977d11
...
@@ -748,3 +748,11 @@ f1 f2 f3
...
@@ -748,3 +748,11 @@ f1 f2 f3
111111 aaaaaa 1
111111 aaaaaa 1
222222 bbbbbb 2
222222 bbbbbb 2
drop table t1;
drop table t1;
CREATE TABLE t1 (a VARCHAR(255) NOT NULL,
CONSTRAINT pk_a PRIMARY KEY (a))engine=ndb;
CREATE TABLE t2(a VARCHAR(255) NOT NULL,
b VARCHAR(255) NOT NULL,
c VARCHAR(255) NOT NULL,
CONSTRAINT pk_b_c_id PRIMARY KEY (b,c),
CONSTRAINT fk_a FOREIGN KEY(a) REFERENCES t1(a))engine=ndb;
drop table t1, t2;
mysql-test/t/ndb_basic.test
View file @
73977d11
...
@@ -713,3 +713,17 @@ select * from t1 order by f1;
...
@@ -713,3 +713,17 @@ select * from t1 order by f1;
select
*
from
t1
order
by
f2
;
select
*
from
t1
order
by
f2
;
select
*
from
t1
order
by
f3
;
select
*
from
t1
order
by
f3
;
drop
table
t1
;
drop
table
t1
;
#
# Bug #18483 Cannot create table with FK constraint
# ndb does not support foreign key constraint, it is silently ignored
# in line with other storage engines
#
CREATE
TABLE
t1
(
a
VARCHAR
(
255
)
NOT
NULL
,
CONSTRAINT
pk_a
PRIMARY
KEY
(
a
))
engine
=
ndb
;
CREATE
TABLE
t2
(
a
VARCHAR
(
255
)
NOT
NULL
,
b
VARCHAR
(
255
)
NOT
NULL
,
c
VARCHAR
(
255
)
NOT
NULL
,
CONSTRAINT
pk_b_c_id
PRIMARY
KEY
(
b
,
c
),
CONSTRAINT
fk_a
FOREIGN
KEY
(
a
)
REFERENCES
t1
(
a
))
engine
=
ndb
;
drop
table
t1
,
t2
;
sql/sql_table.cc
View file @
73977d11
...
@@ -3106,7 +3106,8 @@ bool mysql_create_table_internal(THD *thd,
...
@@ -3106,7 +3106,8 @@ bool mysql_create_table_internal(THD *thd,
}
}
while
((
key
=
key_iterator
++
))
while
((
key
=
key_iterator
++
))
{
{
if
(
key
->
type
==
Key
::
FOREIGN_KEY
)
if
(
key
->
type
==
Key
::
FOREIGN_KEY
&&
!
part_info
->
is_auto_partitioned
)
{
{
my_error
(
ER_CANNOT_ADD_FOREIGN
,
MYF
(
0
));
my_error
(
ER_CANNOT_ADD_FOREIGN
,
MYF
(
0
));
goto
err
;
goto
err
;
...
...
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