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
9b0ab3fc
Commit
9b0ab3fc
authored
Dec 11, 2007
by
istruewing@stella.local
Browse files
Options
Browse Files
Download
Plain Diff
Merge stella.local:/home2/mydev/mysql-5.1-ateam
into stella.local:/home2/mydev/mysql-5.1-axmrg
parents
34b317c8
749ded6f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
1 deletion
+29
-1
mysql-test/r/partition_innodb.result
mysql-test/r/partition_innodb.result
+12
-0
mysql-test/t/partition_innodb.test
mysql-test/t/partition_innodb.test
+15
-0
sql/sql_table.cc
sql/sql_table.cc
+2
-1
No files found.
mysql-test/r/partition_innodb.result
View file @
9b0ab3fc
# Bug#32948
CREATE TABLE t1 (c1 INT, PRIMARY KEY (c1)) ENGINE=INNODB;
CREATE TABLE t2 (c1 INT, PRIMARY KEY (c1),
FOREIGN KEY (c1) REFERENCES t1 (c1)
ON DELETE CASCADE)
ENGINE=INNODB;
ALTER TABLE t1 PARTITION BY HASH(c1) PARTITIONS 5;
ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails
ALTER TABLE t1 ENGINE=MyISAM;
ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails
DROP TABLE t2;
DROP TABLE t1;
create table t1 (a int) engine=innodb partition by hash(a) ;
show table status like 't1';
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
...
...
mysql-test/t/partition_innodb.test
View file @
9b0ab3fc
--
source
include
/
have_partition
.
inc
--
source
include
/
have_innodb
.
inc
# Bug#32948 - FKs allowed to reference partitioned table
#
--
echo
# Bug#32948
CREATE
TABLE
t1
(
c1
INT
,
PRIMARY
KEY
(
c1
))
ENGINE
=
INNODB
;
CREATE
TABLE
t2
(
c1
INT
,
PRIMARY
KEY
(
c1
),
FOREIGN
KEY
(
c1
)
REFERENCES
t1
(
c1
)
ON
DELETE
CASCADE
)
ENGINE
=
INNODB
;
--
error
ER_ROW_IS_REFERENCED
ALTER
TABLE
t1
PARTITION
BY
HASH
(
c1
)
PARTITIONS
5
;
--
error
ER_ROW_IS_REFERENCED
ALTER
TABLE
t1
ENGINE
=
MyISAM
;
DROP
TABLE
t2
;
DROP
TABLE
t1
;
#
# Bug #14673: Wrong InnoDB default row format
#
...
...
sql/sql_table.cc
View file @
9b0ab3fc
...
...
@@ -5979,7 +5979,8 @@ view_err:
goto
err
;
new_db_type
=
create_info
->
db_type
;
if
(
new_db_type
!=
old_db_type
&&
if
((
new_db_type
!=
old_db_type
||
alter_info
->
flags
&
ALTER_PARTITION
)
&&
!
table
->
file
->
can_switch_engines
())
{
my_error
(
ER_ROW_IS_REFERENCED
,
MYF
(
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