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
b58cb6b5
Commit
b58cb6b5
authored
Nov 03, 2004
by
marko@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
InnoDB: fix bugs in the FOREIGN KEY parser (Bug #6340)
parent
73bb6b9c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
26 deletions
+29
-26
innobase/dict/dict0dict.c
innobase/dict/dict0dict.c
+29
-26
No files found.
innobase/dict/dict0dict.c
View file @
b58cb6b5
...
...
@@ -604,7 +604,7 @@ dict_table_get_on_id(
}
/************************************************************************
Looks for column n postion in the clustered index. */
Looks for column n pos
i
tion in the clustered index. */
ulint
dict_table_get_nth_col_pos
(
...
...
@@ -2140,8 +2140,8 @@ dict_foreign_add_to_cache(
/*************************************************************************
Scans from pointer onwards. Stops if is at the start of a copy of
'string' where characters are compared without case sensitivity
. Stops
also at '\0'. */
'string' where characters are compared without case sensitivity
, and
only outside `` or "" quotes. Stops
also at '\0'. */
static
const
char
*
dict_scan_to
(
...
...
@@ -2150,31 +2150,34 @@ dict_scan_to(
const
char
*
ptr
,
/* in: scan from */
const
char
*
string
)
/* in: look for this */
{
ibool
success
;
ulint
i
;
loop:
if
(
*
ptr
==
'\0'
)
{
return
(
ptr
);
}
success
=
TRUE
;
for
(
i
=
0
;
i
<
ut_strlen
(
string
);
i
++
)
{
if
(
toupper
((
ulint
)(
ptr
[
i
]))
!=
toupper
((
ulint
)(
string
[
i
])))
{
success
=
FALSE
;
char
quote
=
'\0'
;
for
(;
*
ptr
;
ptr
++
)
{
if
(
*
ptr
==
quote
)
{
/* Closing quote character: do not look for
starting quote or the keyword. */
quote
=
'\0'
;
}
else
if
(
quote
)
{
/* Within quotes: do nothing. */
}
else
if
(
*
ptr
==
'`'
||
*
ptr
==
'"'
)
{
/* Starting quote: remember the quote character. */
quote
=
*
ptr
;
}
else
{
/* Outside quotes: look for the keyword. */
ulint
i
;
for
(
i
=
0
;
string
[
i
];
i
++
)
{
if
(
toupper
((
ulint
)(
ptr
[
i
]))
!=
toupper
((
ulint
)(
string
[
i
])))
{
goto
nomatch
;
}
}
break
;
nomatch:
;
}
}
if
(
success
)
{
return
(
ptr
);
}
ptr
++
;
goto
loop
;
return
(
ptr
);
}
/*************************************************************************
...
...
@@ -2762,13 +2765,13 @@ dict_create_foreign_constraints_low(
ut_a
(
success
);
if
(
!
isspace
(
*
ptr
))
{
if
(
!
isspace
(
*
ptr
)
&&
*
ptr
!=
'"'
&&
*
ptr
!=
'`'
)
{
goto
loop
;
}
do
{
while
(
isspace
(
*
ptr
))
{
ptr
++
;
}
while
(
isspace
(
*
ptr
));
}
/* read constraint name unless got "CONSTRAINT FOREIGN" */
if
(
ptr
!=
ptr2
)
{
...
...
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