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
de066145
Commit
de066145
authored
Jul 03, 2002
by
lenz@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/my/mysql-4.0 into mysql.com:/my/mysql-4.0-build
parents
6849c2e4
04888e46
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
24 deletions
+31
-24
include/my_sys.h
include/my_sys.h
+7
-0
mysys/my_getopt.c
mysys/my_getopt.c
+7
-7
strings/ctype-latin1_de.c
strings/ctype-latin1_de.c
+2
-2
strings/ctype-tis620.c
strings/ctype-tis620.c
+15
-15
No files found.
include/my_sys.h
View file @
de066145
...
...
@@ -159,6 +159,13 @@ extern my_string my_strdup(const char *from,myf MyFlags);
#define ORIG_CALLER_INFO
/* nothing */
#endif
#ifdef HAVE_ALLOCA
#ifdef __GNUC__
/* Remove any previous definitions. */
#undef alloca
#define alloca(size) __builtin_alloca (size)
#else
/* xlc */
#pragma alloca
#endif
/* GCC. */
#define my_alloca(SZ) alloca((size_t) (SZ))
#define my_afree(PTR) {}
#else
...
...
mysys/my_getopt.c
View file @
de066145
...
...
@@ -293,7 +293,7 @@ int handle_options(int *argc, char ***argv,
*/
*
((
my_bool
*
)
optp
->
value
)
=
(
my_bool
)
(
!
optend
||
*
optend
==
'1'
);
(
*
argc
)
--
;
continue
;
/
/ For GET_BOOL get_one_option() shouldn't be called
continue
;
/
* For GET_BOOL get_one_option() shouldn't be called */
}
argument
=
optend
;
}
...
...
@@ -341,16 +341,16 @@ int handle_options(int *argc, char ***argv,
if
(
optp
->
var_type
==
GET_BOOL
&&
optp
->
arg_type
==
NO_ARG
)
{
*
((
my_bool
*
)
optp
->
value
)
=
(
my_bool
)
1
;
continue
;
/
/ For GET_BOOL get_one_option() shouldn't be called
continue
;
/
* For GET_BOOL get_one_option() shouldn't be called */
}
else
if
(
optp
->
arg_type
==
REQUIRED_ARG
||
optp
->
arg_type
==
OPT_ARG
)
{
if
(
*
(
optend
+
1
))
{
/
/ The rest of the option is option argument
/
* The rest of the option is option argument */
argument
=
optend
+
1
;
/
/ This is in effect a jump out of the outer loop
/
* This is in effect a jump out of the outer loop */
optend
=
(
char
*
)
" "
;
}
else
if
(
optp
->
arg_type
==
REQUIRED_ARG
)
...
...
@@ -573,7 +573,7 @@ static longlong getopt_ll (char *arg, const struct my_option *optp, int *err)
if
(
num
<
(
longlong
)
optp
->
min_value
)
num
=
(
longlong
)
optp
->
min_value
;
else
if
(
num
>
0
&&
(
ulonglong
)
num
>
(
ulonglong
)
(
ulong
)
optp
->
max_value
&&
optp
->
max_value
)
/
/ if max value is not set -> no upper limit
&&
optp
->
max_value
)
/
* if max value is not set -> no upper limit */
num
=
(
longlong
)
(
ulong
)
optp
->
max_value
;
num
=
((
num
-
(
longlong
)
optp
->
sub_size
)
/
(
optp
->
block_size
?
(
ulonglong
)
optp
->
block_size
:
...
...
@@ -597,7 +597,7 @@ static ulonglong getopt_ull (char *arg, const struct my_option *optp, int *err)
if
(
num
<
(
ulonglong
)
optp
->
min_value
)
num
=
(
ulonglong
)
optp
->
min_value
;
else
if
(
num
>
0
&&
(
ulonglong
)
num
>
(
ulonglong
)
(
ulong
)
optp
->
max_value
&&
optp
->
max_value
)
/
/ if max value is not set -> no upper limit
&&
optp
->
max_value
)
/
* if max value is not set -> no upper limit */
num
=
(
ulonglong
)
(
ulong
)
optp
->
max_value
;
num
=
((
num
-
(
ulonglong
)
optp
->
sub_size
)
/
(
optp
->
block_size
?
(
ulonglong
)
optp
->
block_size
:
...
...
@@ -717,7 +717,7 @@ void my_print_help(const struct my_option *options)
for
(
line_end
=
comment
+
comment_space
;
*
line_end
!=
' '
;
line_end
--
);
for
(;
comment
!=
line_end
;
comment
++
)
putchar
(
*
comment
);
comment
++
;
/
/ skip the space, as a newline will take it's place now
comment
++
;
/
* skip the space, as a newline will take it's place now */
putchar
(
'\n'
);
for
(
col
=
0
;
col
<
name_space
;
col
++
)
putchar
(
' '
);
...
...
strings/ctype-latin1_de.c
View file @
de066145
...
...
@@ -339,7 +339,7 @@ my_bool my_like_range_latin1_de(const char *ptr, uint ptr_length,
*
min_length
=
(
uint
)(
min_str
-
min_org
);
*
max_length
=
res_length
;
do
{
*
min_str
++
=
' '
;
/
/ Because if key compression
*
min_str
++
=
' '
;
/
* Because if key compression */
*
max_str
++
=
max_sort_char
;
}
while
(
min_str
!=
min_end
);
return
0
;
...
...
@@ -356,6 +356,6 @@ my_bool my_like_range_latin1_de(const char *ptr, uint ptr_length,
}
while
(
min_str
!=
min_end
)
*
min_str
++
=
*
max_str
++
=
' '
;
/
/ Because if key compression
*
min_str
++
=
*
max_str
++
=
' '
;
/
* Because if key compression */
return
0
;
}
strings/ctype-tis620.c
View file @
de066145
...
...
@@ -460,8 +460,8 @@ static uchar* thai2sortable(const uchar * tstr,uint len)
const
uchar
*
p
=
tstr
;
uchar
*
outBuf
;
/
/ uchar *pRight1, *pRight2, *pRight3, *pRight4;
/
/ uchar *pLeft1, *pLeft2, *pLeft3, *pLeft4;
/
* uchar *pRight1, *pRight2, *pRight3, *pRight4; */
/
* uchar *pLeft1, *pLeft2, *pLeft3, *pLeft4; */
uchar
*
pRight1
,
*
pRight2
,
*
pRight3
;
uchar
*
pLeft1
,
*
pLeft2
,
*
pLeft3
;
uint
bufSize
;
...
...
@@ -496,11 +496,11 @@ static uchar* thai2sortable(const uchar * tstr,uint len)
*
pRight1
++
=
t_ctype
[
p
[
1
]][
0
];
*
pRight2
++
=
t_ctype
[
p
[
1
]][
1
];
*
pRight3
++
=
t_ctype
[
p
[
1
]][
2
];
/
/ *pRight4++ = t_ctype[p[1]][3];
/
* *pRight4++ = t_ctype[p[1]][3]; */
*
pRight1
++
=
t_ctype
[
*
p
][
0
];
*
pRight2
++
=
t_ctype
[
*
p
][
1
];
*
pRight3
++
=
t_ctype
[
*
p
][
2
];
/
/ *pRight4++ = t_ctype[*p][3];
/
* *pRight4++ = t_ctype[*p][3]; */
len
--
;
p
+=
2
;
}
else
{
...
...
@@ -517,17 +517,17 @@ static uchar* thai2sortable(const uchar * tstr,uint len)
}
*
pRight1
++
=
L2_BLANK
;
*
pRight2
++
=
L3_BLANK
;
/
/ *pRight3++ = L4_BLANK;
/
* *pRight3++ = L4_BLANK; */
*
pRight3
++
=
'\0'
;
/
/ *pRight4++ = '\0';
/
* *pRight4++ = '\0'; */
memcpy
(
pRight1
,
pLeft2
,
pRight2
-
pLeft2
);
pRight1
+=
pRight2
-
pLeft2
;
memcpy
(
pRight1
,
pLeft3
,
pRight3
-
pLeft3
);
/
/ pRight1 += pRight3 - pLeft3;
/
/ memcpy(pRight1, pLeft4, pRight4 - pLeft4);
/
* pRight1 += pRight3 - pLeft3; */
/
* memcpy(pRight1, pLeft4, pRight4 - pLeft4); */
free
(
pLeft2
);
free
(
pLeft3
);
/
/ free(pLeft4);
/
* free(pLeft4); */
return
(
outBuf
);
}
...
...
@@ -619,22 +619,22 @@ my_bool my_like_range_tis620(const char *ptr, uint ptr_length, pchar escape,
{
if
(
*
ptr
==
escape
&&
ptr
+
1
!=
end
)
{
ptr
++
;
/
/ Skipp escape
ptr
++
;
/
* Skipp escape */
*
min_str
++=
*
max_str
++
=
*
ptr
;
continue
;
}
if
(
*
ptr
==
wild_one
)
/
/ '_' in SQL
if
(
*
ptr
==
wild_one
)
/
* '_' in SQL */
{
*
min_str
++=
'\0'
;
/
/ This should be min char
*
min_str
++=
'\0'
;
/
* This should be min char */
*
max_str
++=
max_sort_chr
;
continue
;
}
if
(
*
ptr
==
wild_many
)
/
/ '%' in SQL
if
(
*
ptr
==
wild_many
)
/
* '%' in SQL */
{
*
min_length
=
(
uint
)
(
min_str
-
min_org
);
*
max_length
=
res_length
;
do
{
*
min_str
++
=
' '
;
/
/ Because if key compression
*
min_str
++
=
' '
;
/
* Because if key compression */
*
max_str
++
=
max_sort_chr
;
}
while
(
min_str
!=
min_end
);
return
0
;
...
...
@@ -644,7 +644,7 @@ my_bool my_like_range_tis620(const char *ptr, uint ptr_length, pchar escape,
*
min_length
=
*
max_length
=
(
uint
)
(
min_str
-
min_org
);
while
(
min_str
!=
min_end
)
*
min_str
++
=
*
max_str
++
=
' '
;
/
/ Because if key compression
*
min_str
++
=
*
max_str
++
=
' '
;
/
* Because if key compression */
return
0
;
}
...
...
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