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
7f2a0074
Commit
7f2a0074
authored
Mar 31, 2004
by
marko@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
InnoDB: Remove ut_str_contains() and replace it with strchr()
parent
16ac732c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
36 deletions
+4
-36
innobase/dict/dict0dict.c
innobase/dict/dict0dict.c
+3
-3
innobase/include/ut0mem.h
innobase/include/ut0mem.h
+0
-8
innobase/row/row0mysql.c
innobase/row/row0mysql.c
+1
-1
innobase/ut/ut0mem.c
innobase/ut/ut0mem.c
+0
-24
No files found.
innobase/dict/dict0dict.c
View file @
7f2a0074
...
...
@@ -1002,7 +1002,7 @@ dict_table_rename_in_cache(
sprintf
(
foreign
->
foreign_table_name
,
"%s"
,
table
->
name
);
if
(
ut_str_contains
(
foreign
->
id
,
'/'
))
{
if
(
strchr
(
foreign
->
id
,
'/'
))
{
ulint
db_len
;
char
old_id
[
2000
];
...
...
@@ -3331,7 +3331,7 @@ loop:
while
(
foreign
!=
NULL
)
{
if
(
0
==
ut_strcmp
(
foreign
->
id
,
id
)
||
(
ut_str_contains
(
foreign
->
id
,
'/'
)
||
(
strchr
(
foreign
->
id
,
'/'
)
&&
0
==
ut_strcmp
(
id
,
dict_remove_db_name
(
foreign
->
id
))))
{
/* Found */
...
...
@@ -4059,7 +4059,7 @@ dict_print_info_on_foreign_key_in_create_format(
ulint
cpy_len
;
ulint
i
;
if
(
ut_str_contains
(
foreign
->
id
,
'/'
))
{
if
(
strchr
(
foreign
->
id
,
'/'
))
{
/* Strip the preceding database name from the constraint id */
stripped_id
=
foreign
->
id
+
1
+
dict_get_db_name_len
(
foreign
->
id
);
...
...
innobase/include/ut0mem.h
View file @
7f2a0074
...
...
@@ -85,14 +85,6 @@ ut_str_catenate(
/* out, own: catenated null-terminated string */
char
*
str1
,
/* in: null-terminated string */
char
*
str2
);
/* in: null-terminated string */
/**************************************************************************
Checks if a null-terminated string contains a certain character. */
ibool
ut_str_contains
(
/*============*/
char
*
str
,
/* in: null-terminated string */
char
c
);
/* in: character */
#ifndef UNIV_NONINL
#include "ut0mem.ic"
...
...
innobase/row/row0mysql.c
View file @
7f2a0074
...
...
@@ -2362,7 +2362,7 @@ row_rename_table_for_mysql(
db_name
,
constraints_to_drop
[
i
],
db_name
,
constraints_to_drop
[
i
]);
if
(
!
ut_str_contains
(
constraints_to_drop
[
i
],
'/'
))
{
if
(
!
strchr
(
constraints_to_drop
[
i
],
'/'
))
{
/* If this happens to be an old format
constraint, let us delete it. Since all new
format constraints contain '/', it does no
...
...
innobase/ut/ut0mem.c
View file @
7f2a0074
...
...
@@ -221,27 +221,3 @@ ut_str_catenate(
return
(
str
);
}
/**************************************************************************
Checks if a null-terminated string contains a certain character. */
ibool
ut_str_contains
(
/*============*/
char
*
str
,
/* in: null-terminated string */
char
c
)
/* in: character */
{
ulint
len
;
ulint
i
;
len
=
ut_strlen
(
str
);
for
(
i
=
0
;
i
<
len
;
i
++
)
{
if
(
str
[
i
]
==
c
)
{
return
(
TRUE
);
}
}
return
(
FALSE
);
}
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