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
43f122c4
Commit
43f122c4
authored
Jan 30, 2006
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge aivanov@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/alexi/innodb/mysql-4.1-merged
parents
ae653f1b
cc47eb77
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
1 deletion
+28
-1
innobase/dict/dict0dict.c
innobase/dict/dict0dict.c
+2
-1
mysql-test/r/innodb.result
mysql-test/r/innodb.result
+13
-0
mysql-test/t/innodb.test
mysql-test/t/innodb.test
+13
-0
No files found.
innobase/dict/dict0dict.c
View file @
43f122c4
...
...
@@ -2755,7 +2755,8 @@ dict_table_get_highest_foreign_id(
if
(
ut_strlen
(
foreign
->
id
)
>
((
sizeof
dict_ibfk
)
-
1
)
+
len
&&
0
==
ut_memcmp
(
foreign
->
id
,
table
->
name
,
len
)
&&
0
==
ut_memcmp
(
foreign
->
id
+
len
,
dict_ibfk
,
(
sizeof
dict_ibfk
)
-
1
))
{
dict_ibfk
,
(
sizeof
dict_ibfk
)
-
1
)
&&
foreign
->
id
[
len
+
((
sizeof
dict_ibfk
)
-
1
)]
!=
'0'
)
{
/* It is of the >= 4.0.18 format */
id
=
strtoul
(
foreign
->
id
+
len
+
((
sizeof
dict_ibfk
)
-
1
),
...
...
mysql-test/r/innodb.result
View file @
43f122c4
...
...
@@ -1794,3 +1794,16 @@ a hex(b)
7 D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B2
update t1 set b = 'three' where a = 6;
drop table t1;
CREATE TABLE t1(a INT, PRIMARY KEY(a)) ENGINE=InnoDB;
CREATE TABLE t2(a INT) ENGINE=InnoDB;
ALTER TABLE t2 ADD FOREIGN KEY (a) REFERENCES t1(a);
ALTER TABLE t2 DROP FOREIGN KEY t2_ibfk_1;
ALTER TABLE t2 ADD CONSTRAINT t2_ibfk_0 FOREIGN KEY (a) REFERENCES t1(a);
ALTER TABLE t2 DROP FOREIGN KEY t2_ibfk_0;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`a` int(11) default NULL,
KEY `t2_ibfk_0` (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
DROP TABLE t2,t1;
mysql-test/t/innodb.test
View file @
43f122c4
...
...
@@ -1365,4 +1365,17 @@ insert into t1 values(7,_utf8 0xD0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1
select
a
,
hex
(
b
)
from
t1
order
by
b
;
update
t1
set
b
=
'three'
where
a
=
6
;
drop
table
t1
;
# Ensure that <tablename>_ibfk_0 is not mistreated as a
# generated foreign key identifier. (Bug #16387)
CREATE
TABLE
t1
(
a
INT
,
PRIMARY
KEY
(
a
))
ENGINE
=
InnoDB
;
CREATE
TABLE
t2
(
a
INT
)
ENGINE
=
InnoDB
;
ALTER
TABLE
t2
ADD
FOREIGN
KEY
(
a
)
REFERENCES
t1
(
a
);
ALTER
TABLE
t2
DROP
FOREIGN
KEY
t2_ibfk_1
;
ALTER
TABLE
t2
ADD
CONSTRAINT
t2_ibfk_0
FOREIGN
KEY
(
a
)
REFERENCES
t1
(
a
);
ALTER
TABLE
t2
DROP
FOREIGN
KEY
t2_ibfk_0
;
SHOW
CREATE
TABLE
t2
;
DROP
TABLE
t2
,
t1
;
# End of 4.1 tests
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