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
6c258beb
Commit
6c258beb
authored
Oct 20, 2005
by
bar@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/usr/home/bar/mysql-4.1
into mysql.com:/usr/home/bar/mysql-5.0
parents
2c90e2f7
af3d8bd4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
14 deletions
+32
-14
mysys/charset.c
mysys/charset.c
+19
-12
mysys/my_lib.c
mysys/my_lib.c
+13
-2
No files found.
mysys/charset.c
View file @
6c258beb
...
@@ -38,6 +38,22 @@ my_bool my_charset_same(CHARSET_INFO *cs1, CHARSET_INFO *cs2)
...
@@ -38,6 +38,22 @@ my_bool my_charset_same(CHARSET_INFO *cs1, CHARSET_INFO *cs2)
}
}
static
uint
get_collation_number_internal
(
const
char
*
name
)
{
CHARSET_INFO
**
cs
;
for
(
cs
=
all_charsets
;
cs
<
all_charsets
+
array_elements
(
all_charsets
)
-
1
;
cs
++
)
{
if
(
cs
[
0
]
&&
cs
[
0
]
->
name
&&
!
my_strcasecmp
(
&
my_charset_latin1
,
cs
[
0
]
->
name
,
name
))
return
cs
[
0
]
->
number
;
}
return
0
;
}
static
my_bool
init_state_maps
(
CHARSET_INFO
*
cs
)
static
my_bool
init_state_maps
(
CHARSET_INFO
*
cs
)
{
{
uint
i
;
uint
i
;
...
@@ -189,7 +205,8 @@ static my_bool simple_cs_is_full(CHARSET_INFO *cs)
...
@@ -189,7 +205,8 @@ static my_bool simple_cs_is_full(CHARSET_INFO *cs)
static
int
add_collation
(
CHARSET_INFO
*
cs
)
static
int
add_collation
(
CHARSET_INFO
*
cs
)
{
{
if
(
cs
->
name
&&
(
cs
->
number
||
(
cs
->
number
=
get_collation_number
(
cs
->
name
))))
if
(
cs
->
name
&&
(
cs
->
number
||
(
cs
->
number
=
get_collation_number_internal
(
cs
->
name
))))
{
{
if
(
!
all_charsets
[
cs
->
number
])
if
(
!
all_charsets
[
cs
->
number
])
{
{
...
@@ -419,18 +436,8 @@ void free_charsets(void)
...
@@ -419,18 +436,8 @@ void free_charsets(void)
uint
get_collation_number
(
const
char
*
name
)
uint
get_collation_number
(
const
char
*
name
)
{
{
CHARSET_INFO
**
cs
;
init_available_charsets
(
MYF
(
0
));
init_available_charsets
(
MYF
(
0
));
return
get_collation_number_internal
(
name
);
for
(
cs
=
all_charsets
;
cs
<
all_charsets
+
array_elements
(
all_charsets
)
-
1
;
cs
++
)
{
if
(
cs
[
0
]
&&
cs
[
0
]
->
name
&&
!
my_strcasecmp
(
&
my_charset_latin1
,
cs
[
0
]
->
name
,
name
))
return
cs
[
0
]
->
number
;
}
return
0
;
/* this mimics find_type() */
}
}
...
...
mysys/my_lib.c
View file @
6c258beb
...
@@ -426,6 +426,18 @@ MY_DIR *my_dir(const char *path, myf MyFlags)
...
@@ -426,6 +426,18 @@ MY_DIR *my_dir(const char *path, myf MyFlags)
do
do
{
{
#ifdef __BORLANDC__
attrib
=
find
.
ff_attrib
;
#else
attrib
=
find
.
attrib
;
/*
Do not show hidden and system files which Windows sometimes create.
Note. Because Borland's findfirst() is called with the third
argument = 0 hidden/system files are excluded from the search.
*/
if
(
attrib
&
(
_A_HIDDEN
|
_A_SYSTEM
))
continue
;
#endif
#ifdef __BORLANDC__
#ifdef __BORLANDC__
if
(
!
(
finfo
.
name
=
strdup_root
(
names_storage
,
find
.
ff_name
)))
if
(
!
(
finfo
.
name
=
strdup_root
(
names_storage
,
find
.
ff_name
)))
goto
error
;
goto
error
;
...
@@ -442,11 +454,10 @@ MY_DIR *my_dir(const char *path, myf MyFlags)
...
@@ -442,11 +454,10 @@ MY_DIR *my_dir(const char *path, myf MyFlags)
bzero
(
finfo
.
mystat
,
sizeof
(
MY_STAT
));
bzero
(
finfo
.
mystat
,
sizeof
(
MY_STAT
));
#ifdef __BORLANDC__
#ifdef __BORLANDC__
finfo
.
mystat
->
st_size
=
find
.
ff_fsize
;
finfo
.
mystat
->
st_size
=
find
.
ff_fsize
;
mode
=
MY_S_IREAD
;
attrib
=
find
.
ff_attrib
;
#else
#else
finfo
.
mystat
->
st_size
=
find
.
size
;
finfo
.
mystat
->
st_size
=
find
.
size
;
mode
=
MY_S_IREAD
;
attrib
=
find
.
attrib
;
#endif
#endif
mode
=
MY_S_IREAD
;
if
(
!
(
attrib
&
_A_RDONLY
))
if
(
!
(
attrib
&
_A_RDONLY
))
mode
|=
MY_S_IWRITE
;
mode
|=
MY_S_IWRITE
;
if
(
attrib
&
_A_SUBDIR
)
if
(
attrib
&
_A_SUBDIR
)
...
...
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