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
37b8691c
Commit
37b8691c
authored
Feb 06, 2014
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix the fix and update test results for MDEV-4439
parent
bf050b1d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
49 additions
and
11 deletions
+49
-11
mysql-test/suite/innodb/r/innodb_information_schema.result
mysql-test/suite/innodb/r/innodb_information_schema.result
+1
-1
mysql-test/suite/rpl/r/rpl_mdev382.result
mysql-test/suite/rpl/r/rpl_mdev382.result
+1
-1
sql/sql_table.cc
sql/sql_table.cc
+1
-1
storage/xtradb/dict/dict0dict.cc
storage/xtradb/dict/dict0dict.cc
+46
-8
No files found.
mysql-test/suite/innodb/r/innodb_information_schema.result
View file @
37b8691c
...
@@ -51,4 +51,4 @@ RUNNING 4 0 0 7 1 0 REPEATABLE READ 1 1
...
@@ -51,4 +51,4 @@ RUNNING 4 0 0 7 1 0 REPEATABLE READ 1 1
trx_isolation_level trx_unique_checks trx_foreign_key_checks
trx_isolation_level trx_unique_checks trx_foreign_key_checks
SERIALIZABLE 0 0
SERIALIZABLE 0 0
trx_state trx_isolation_level trx_last_foreign_key_error
trx_state trx_isolation_level trx_last_foreign_key_error
RUNNING REPEATABLE READ `test`.`t2`, CONSTRAINT `
t2_ibfk_
1` FOREIGN KEY (`c02`) REFERENCES `t1` (`c01`)
RUNNING REPEATABLE READ `test`.`t2`, CONSTRAINT `
fk
1` FOREIGN KEY (`c02`) REFERENCES `t1` (`c01`)
mysql-test/suite/rpl/r/rpl_mdev382.result
View file @
37b8691c
...
@@ -315,7 +315,7 @@ CREATE TABLE `t``1` ( `a``` INT PRIMARY KEY) ENGINE=innodb;
...
@@ -315,7 +315,7 @@ CREATE TABLE `t``1` ( `a``` INT PRIMARY KEY) ENGINE=innodb;
CREATE TABLE `t``2` ( `b``` INT PRIMARY KEY, `c``` INT NOT NULL,
CREATE TABLE `t``2` ( `b``` INT PRIMARY KEY, `c``` INT NOT NULL,
FOREIGN KEY fk (`c```) REFERENCES `t``1`(`a```)) ENGINE=innodb;
FOREIGN KEY fk (`c```) REFERENCES `t``1`(`a```)) ENGINE=innodb;
TRUNCATE `t``1`;
TRUNCATE `t``1`;
ERROR 42000: Cannot truncate a table referenced in a foreign key constraint (`db1``; select 'oops!'`.`t``2`, CONSTRAINT `
t``2_ibfk_1
` FOREIGN KEY (`c```) REFERENCES `db1``; select 'oops!'`.`t``1` (`a```))
ERROR 42000: Cannot truncate a table referenced in a foreign key constraint (`db1``; select 'oops!'`.`t``2`, CONSTRAINT `
fk
` FOREIGN KEY (`c```) REFERENCES `db1``; select 'oops!'`.`t``1` (`a```))
DROP TABLE `t``2`;
DROP TABLE `t``2`;
DROP TABLE `t``1`;
DROP TABLE `t``1`;
*** Test correct quoting of DELETE FROM statement binlogged for HEAP table that is emptied due to server restart
*** Test correct quoting of DELETE FROM statement binlogged for HEAP table that is emptied due to server restart
...
...
sql/sql_table.cc
View file @
37b8691c
...
@@ -5476,7 +5476,7 @@ handle_if_exists_options(THD *thd, TABLE *table, Alter_info *alter_info)
...
@@ -5476,7 +5476,7 @@ handle_if_exists_options(THD *thd, TABLE *table, Alter_info *alter_info)
if
(
remove_key
)
if
(
remove_key
)
{
{
push_warning_printf
(
thd
,
Sql_condition
::
WARN_LEVEL_NOTE
,
push_warning_printf
(
thd
,
Sql_condition
::
WARN_LEVEL_NOTE
,
ER_DUP_KEYNAME
,
ER
(
ER_DUP_KEYNAME
),
key
->
name
.
str
);
ER_DUP_KEYNAME
,
ER
(
ER_DUP_KEYNAME
),
key
name
);
key_it
.
remove
();
key_it
.
remove
();
if
(
key
->
type
==
Key
::
FOREIGN_KEY
)
if
(
key
->
type
==
Key
::
FOREIGN_KEY
)
{
{
...
...
storage/xtradb/dict/dict0dict.cc
View file @
37b8691c
...
@@ -4242,18 +4242,45 @@ loop:
...
@@ -4242,18 +4242,45 @@ loop:
goto
loop
;
goto
loop
;
}
}
if
(
my_isspace
(
cs
,
*
ptr
))
{
ptr1
=
dict_accept
(
cs
,
ptr
,
"IF"
,
&
success
);
if
(
success
)
{
if
(
!
my_isspace
(
cs
,
*
ptr1
))
{
goto
loop
;
}
ptr1
=
dict_accept
(
cs
,
ptr1
,
"NOT"
,
&
success
);
if
(
!
success
)
{
goto
loop
;
}
ptr1
=
dict_accept
(
cs
,
ptr1
,
"EXISTS"
,
&
success
);
if
(
!
success
)
{
goto
loop
;
}
ptr
=
ptr1
;
}
}
ptr
=
dict_accept
(
cs
,
ptr
,
"("
,
&
success
);
ptr
=
dict_accept
(
cs
,
ptr
,
"("
,
&
success
);
if
(
!
success
)
{
if
(
!
success
)
{
/* MySQL allows also an index id before the '('; we
if
(
constraint_name
)
{
skip it */
/* MySQL allows also an index id before the '('; we
ptr
=
dict_skip_word
(
cs
,
ptr
,
&
success
);
skip it */
ptr
=
dict_skip_word
(
cs
,
ptr
,
&
success
);
if
(
!
success
)
{
if
(
!
success
)
{
dict_foreign_report_syntax_err
(
dict_foreign_report_syntax_err
(
name
,
start_of_latest_foreign
,
ptr
);
name
,
start_of_latest_foreign
,
ptr
);
return
(
DB_CANNOT_ADD_CONSTRAINT
);
}
}
else
{
while
(
my_isspace
(
cs
,
*
ptr
))
{
ptr
++
;
}
return
(
DB_CANNOT_ADD_CONSTRAINT
);
ptr
=
dict_scan_id
(
cs
,
ptr
,
heap
,
&
constraint_name
,
FALSE
,
FALSE
);
}
}
ptr
=
dict_accept
(
cs
,
ptr
,
"("
,
&
success
);
ptr
=
dict_accept
(
cs
,
ptr
,
"("
,
&
success
);
...
@@ -4727,6 +4754,7 @@ dict_foreign_parse_drop_constraints(
...
@@ -4727,6 +4754,7 @@ dict_foreign_parse_drop_constraints(
char
*
str
;
char
*
str
;
size_t
len
;
size_t
len
;
const
char
*
ptr
;
const
char
*
ptr
;
const
char
*
ptr1
;
const
char
*
id
;
const
char
*
id
;
struct
charset_info_st
*
cs
;
struct
charset_info_st
*
cs
;
...
@@ -4777,6 +4805,16 @@ loop:
...
@@ -4777,6 +4805,16 @@ loop:
goto
syntax_error
;
goto
syntax_error
;
}
}
ptr1
=
dict_accept
(
cs
,
ptr
,
"IF"
,
&
success
);
if
(
success
&&
my_isspace
(
cs
,
*
ptr1
))
{
ptr1
=
dict_accept
(
cs
,
ptr1
,
"EXISTS"
,
&
success
);
if
(
success
)
{
ptr
=
ptr1
;
}
}
ptr
=
dict_scan_id
(
cs
,
ptr
,
heap
,
&
id
,
FALSE
,
TRUE
);
ptr
=
dict_scan_id
(
cs
,
ptr
,
heap
,
&
id
,
FALSE
,
TRUE
);
if
(
id
==
NULL
)
{
if
(
id
==
NULL
)
{
...
...
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