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
23f25285
Commit
23f25285
authored
Mar 16, 2003
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
system_charset_info has been moved to /sql directory
and isn't used in libraries any longer
parent
2aa9f207
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
43 additions
and
41 deletions
+43
-41
extra/mysql_install.c
extra/mysql_install.c
+1
-1
extra/replace.c
extra/replace.c
+1
-1
extra/resolve_stack_dump.c
extra/resolve_stack_dump.c
+5
-5
extra/resolveip.c
extra/resolveip.c
+1
-1
libmysql/libmysql.c
libmysql/libmysql.c
+10
-10
mysys/charset.c
mysys/charset.c
+0
-1
mysys/default.c
mysys/default.c
+5
-5
mysys/mf_iocache2.c
mysys/mf_iocache2.c
+1
-1
mysys/my_error.c
mysys/my_error.c
+1
-1
mysys/my_getwd.c
mysys/my_getwd.c
+1
-1
mysys/my_init.c
mysys/my_init.c
+1
-1
mysys/typelib.c
mysys/typelib.c
+2
-2
sql/sql_string.cc
sql/sql_string.cc
+1
-0
tools/mysqlmanager.c
tools/mysqlmanager.c
+13
-11
No files found.
extra/mysql_install.c
View file @
23f25285
...
...
@@ -157,7 +157,7 @@ static int get_answer(QUESTION_WIDGET* w)
char
c
;
if
(
!
fgets
(
buf
,
sizeof
(
buf
),
w
->
in
))
die
(
"Failed fgets on input stream"
);
switch
((
c
=
my_tolower
(
system_charset_info
,
*
buf
)))
switch
((
c
=
my_tolower
(
&
my_charset_latin1
,
*
buf
)))
{
case
'\n'
:
return
w
->
default_ind
;
...
...
extra/replace.c
View file @
23f25285
...
...
@@ -113,7 +113,7 @@ char *argv[];
exit
(
1
);
for
(
i
=
1
,
pos
=
word_end_chars
;
i
<
256
;
i
++
)
if
(
my_isspace
(
system_charset_info
,
i
))
if
(
my_isspace
(
&
my_charset_latin1
,
i
))
*
pos
++=
i
;
*
pos
=
0
;
if
(
!
(
replace
=
init_replace
((
char
**
)
from
.
typelib
.
type_names
,
...
...
extra/resolve_stack_dump.c
View file @
23f25285
...
...
@@ -175,9 +175,9 @@ trace dump and specify the path to it with -s or --symbols-file");
static
uchar
hex_val
(
char
c
)
{
uchar
l
;
if
(
my_isdigit
(
system_charset_info
,
c
))
if
(
my_isdigit
(
&
my_charset_latin1
,
c
))
return
c
-
'0'
;
l
=
my_tolower
(
system_charset_info
,
c
);
l
=
my_tolower
(
&
my_charset_latin1
,
c
);
if
(
l
<
'a'
||
l
>
'f'
)
return
HEX_INVALID
;
return
(
uchar
)
10
+
((
uchar
)
c
-
(
uchar
)
'a'
);
...
...
@@ -203,10 +203,10 @@ static int init_sym_entry(SYM_ENTRY* se, char* buf)
if
(
!
se
->
addr
)
return
-
1
;
while
(
my_isspace
(
system_charset_info
,
*
buf
++
))
while
(
my_isspace
(
&
my_charset_latin1
,
*
buf
++
))
/* empty */
;
while
(
my_isspace
(
system_charset_info
,
*
buf
++
))
while
(
my_isspace
(
&
my_charset_latin1
,
*
buf
++
))
/* empty - skip more space */
;
--
buf
;
/* now we are on the symbol */
...
...
@@ -288,7 +288,7 @@ static void do_resolve()
{
p
=
buf
;
/* skip space */
while
(
my_isspace
(
system_charset_info
,
*
p
))
while
(
my_isspace
(
&
my_charset_latin1
,
*
p
))
++
p
;
if
(
*
p
++
==
'0'
&&
*
p
++
==
'x'
)
...
...
extra/resolveip.c
View file @
23f25285
...
...
@@ -122,7 +122,7 @@ int main(int argc, char **argv)
{
ip
=
*
argv
++
;
if
(
my_isdigit
(
system_charset_info
,
ip
[
0
]))
if
(
my_isdigit
(
&
my_charset_latin1
,
ip
[
0
]))
{
taddr
=
inet_addr
(
ip
);
if
(
taddr
==
htonl
(
INADDR_BROADCAST
))
...
...
libmysql/libmysql.c
View file @
23f25285
...
...
@@ -1693,9 +1693,9 @@ STDCALL mysql_rpl_query_type(const char* q, int len)
for
(;
q
<
q_end
;
++
q
)
{
char
c
;
if
(
my_isalpha
(
system_charset_info
,
(
c
=
*
q
)))
if
(
my_isalpha
(
&
my_charset_latin1
,
(
c
=
*
q
)))
{
switch
(
my_tolower
(
system_charset_info
,
c
))
{
switch
(
my_tolower
(
&
my_charset_latin1
,
c
))
{
case
'i'
:
/* insert */
case
'u'
:
/* update or unlock tables */
case
'l'
:
/* lock tables or load data infile */
...
...
@@ -1703,10 +1703,10 @@ STDCALL mysql_rpl_query_type(const char* q, int len)
case
'a'
:
/* alter */
return
MYSQL_RPL_MASTER
;
case
'c'
:
/* create or check */
return
my_tolower
(
system_charset_info
,
q
[
1
])
==
'h'
?
MYSQL_RPL_ADMIN
:
return
my_tolower
(
&
my_charset_latin1
,
q
[
1
])
==
'h'
?
MYSQL_RPL_ADMIN
:
MYSQL_RPL_MASTER
;
case
's'
:
/* select or show */
return
my_tolower
(
system_charset_info
,
q
[
1
])
==
'h'
?
MYSQL_RPL_ADMIN
:
return
my_tolower
(
&
my_charset_latin1
,
q
[
1
])
==
'h'
?
MYSQL_RPL_ADMIN
:
MYSQL_RPL_SLAVE
;
case
'f'
:
/* flush */
case
'r'
:
/* repair */
...
...
@@ -4842,40 +4842,40 @@ static void send_data_str(MYSQL_BIND *param, char *value, uint length)
switch
(
param
->
buffer_type
)
{
case
MYSQL_TYPE_TINY
:
{
uchar
data
=
(
uchar
)
my_strntol
(
system_charset_info
,
value
,
length
,
10
,
NULL
,
uchar
data
=
(
uchar
)
my_strntol
(
&
my_charset_latin1
,
value
,
length
,
10
,
NULL
,
&
err
);
*
buffer
=
data
;
break
;
}
case
MYSQL_TYPE_SHORT
:
{
short
data
=
(
short
)
my_strntol
(
system_charset_info
,
value
,
length
,
10
,
NULL
,
short
data
=
(
short
)
my_strntol
(
&
my_charset_latin1
,
value
,
length
,
10
,
NULL
,
&
err
);
int2store
(
buffer
,
data
);
break
;
}
case
MYSQL_TYPE_LONG
:
{
int32
data
=
(
int32
)
my_strntol
(
system_charset_info
,
value
,
length
,
10
,
NULL
,
int32
data
=
(
int32
)
my_strntol
(
&
my_charset_latin1
,
value
,
length
,
10
,
NULL
,
&
err
);
int4store
(
buffer
,
data
);
break
;
}
case
MYSQL_TYPE_LONGLONG
:
{
longlong
data
=
my_strntoll
(
system_charset_info
,
value
,
length
,
10
,
NULL
,
&
err
);
longlong
data
=
my_strntoll
(
&
my_charset_latin1
,
value
,
length
,
10
,
NULL
,
&
err
);
int8store
(
buffer
,
data
);
break
;
}
case
MYSQL_TYPE_FLOAT
:
{
float
data
=
(
float
)
my_strntod
(
system_charset_info
,
value
,
length
,
NULL
,
&
err
);
float
data
=
(
float
)
my_strntod
(
&
my_charset_latin1
,
value
,
length
,
NULL
,
&
err
);
float4store
(
buffer
,
data
);
break
;
}
case
MYSQL_TYPE_DOUBLE
:
{
double
data
=
my_strntod
(
system_charset_info
,
value
,
length
,
NULL
,
&
err
);
double
data
=
my_strntod
(
&
my_charset_latin1
,
value
,
length
,
NULL
,
&
err
);
float8store
(
buffer
,
data
);
break
;
}
...
...
mysys/charset.c
View file @
23f25285
...
...
@@ -408,7 +408,6 @@ char *get_charsets_dir(char *buf)
CHARSET_INFO
*
all_charsets
[
256
];
CHARSET_INFO
*
default_charset_info
=
&
my_charset_latin1
;
CHARSET_INFO
*
system_charset_info
=
&
my_charset_latin1
;
#define MY_ADD_CHARSET(x) all_charsets[(x)->number]=(x)
...
...
mysys/default.c
View file @
23f25285
...
...
@@ -249,7 +249,7 @@ static my_bool search_default_file(DYNAMIC_ARRAY *args, MEM_ROOT *alloc,
{
line
++
;
/* Ignore comment and empty lines */
for
(
ptr
=
buff
;
my_isspace
(
system_charset_info
,
*
ptr
)
;
ptr
++
)
;
for
(
ptr
=
buff
;
my_isspace
(
&
my_charset_latin1
,
*
ptr
)
;
ptr
++
)
;
if
(
*
ptr
==
'#'
||
*
ptr
==
';'
||
!*
ptr
)
continue
;
if
(
*
ptr
==
'['
)
/* Group name */
...
...
@@ -262,7 +262,7 @@ static my_bool search_default_file(DYNAMIC_ARRAY *args, MEM_ROOT *alloc,
name
,
line
);
goto
err
;
}
for
(
;
my_isspace
(
system_charset_info
,
end
[
-
1
])
;
end
--
)
;
/* Remove end space */
for
(
;
my_isspace
(
&
my_charset_latin1
,
end
[
-
1
])
;
end
--
)
;
/* Remove end space */
end
[
0
]
=
0
;
read_values
=
find_type
(
ptr
,
group
,
3
)
>
0
;
continue
;
...
...
@@ -278,7 +278,7 @@ static my_bool search_default_file(DYNAMIC_ARRAY *args, MEM_ROOT *alloc,
continue
;
if
(
!
(
end
=
value
=
strchr
(
ptr
,
'='
)))
end
=
strend
(
ptr
);
/* Option without argument */
for
(
;
my_isspace
(
system_charset_info
,
end
[
-
1
])
;
end
--
)
;
for
(
;
my_isspace
(
&
my_charset_latin1
,
end
[
-
1
])
;
end
--
)
;
if
(
!
value
)
{
if
(
!
(
tmp
=
alloc_root
(
alloc
,(
uint
)
(
end
-
ptr
)
+
3
)))
...
...
@@ -291,9 +291,9 @@ static my_bool search_default_file(DYNAMIC_ARRAY *args, MEM_ROOT *alloc,
{
/* Remove pre- and end space */
char
*
value_end
;
for
(
value
++
;
my_isspace
(
system_charset_info
,
*
value
);
value
++
)
;
for
(
value
++
;
my_isspace
(
&
my_charset_latin1
,
*
value
);
value
++
)
;
value_end
=
strend
(
value
);
for
(
;
my_isspace
(
system_charset_info
,
value_end
[
-
1
])
;
value_end
--
)
;
for
(
;
my_isspace
(
&
my_charset_latin1
,
value_end
[
-
1
])
;
value_end
--
)
;
if
(
value_end
<
value
)
/* Empty string */
value_end
=
value
;
if
(
!
(
tmp
=
alloc_root
(
alloc
,(
uint
)
(
end
-
ptr
)
+
3
+
...
...
mysys/mf_iocache2.c
View file @
23f25285
...
...
@@ -267,7 +267,7 @@ uint my_b_vprintf(IO_CACHE *info, const char* fmt, va_list args)
/* Found one '%' */
}
/* Skipp if max size is used (to be compatible with printf) */
while
(
my_isdigit
(
system_charset_info
,
*
fmt
)
||
*
fmt
==
'.'
||
*
fmt
==
'-'
)
while
(
my_isdigit
(
&
my_charset_latin1
,
*
fmt
)
||
*
fmt
==
'.'
||
*
fmt
==
'-'
)
fmt
++
;
if
(
*
fmt
==
's'
)
/* String parameter */
{
...
...
mysys/my_error.c
View file @
23f25285
...
...
@@ -69,7 +69,7 @@ int my_error(int nr,myf MyFlags, ...)
else
{
/* Skipp if max size is used (to be compatible with printf) */
while
(
my_isdigit
(
system_charset_info
,
*
tpos
)
||
*
tpos
==
'.'
||
*
tpos
==
'-'
)
while
(
my_isdigit
(
&
my_charset_latin1
,
*
tpos
)
||
*
tpos
==
'.'
||
*
tpos
==
'-'
)
tpos
++
;
if
(
*
tpos
==
'l'
)
/* Skipp 'l' argument */
tpos
++
;
...
...
mysys/my_getwd.c
View file @
23f25285
...
...
@@ -109,7 +109,7 @@ int my_setwd(const char *dir, myf MyFlags)
uint
drive
,
drives
;
pos
++
;
/* Skipp FN_DEVCHAR */
drive
=
(
uint
)
(
my_toupper
(
system_charset_info
,
dir
[
0
])
-
'A'
+
1
);
drive
=
(
uint
)
(
my_toupper
(
&
my_charset_latin1
,
dir
[
0
])
-
'A'
+
1
);
drives
=
(
uint
)
-
1
;
if
((
pos
-
(
byte
*
)
dir
)
==
2
&&
drive
>
0
&&
drive
<
32
)
{
...
...
mysys/my_init.c
View file @
23f25285
...
...
@@ -52,7 +52,7 @@ my_bool my_init_done=0;
static
ulong
atoi_octal
(
const
char
*
str
)
{
long
int
tmp
;
while
(
*
str
&&
my_isspace
(
system_charset_info
,
*
str
))
while
(
*
str
&&
my_isspace
(
&
my_charset_latin1
,
*
str
))
str
++
;
str2int
(
str
,
(
*
str
==
'0'
?
8
:
10
),
/* Octalt or decimalt */
...
...
mysys/typelib.c
View file @
23f25285
...
...
@@ -48,8 +48,8 @@ int find_type(my_string x, TYPELIB *typelib, uint full_name)
for
(
pos
=
0
;
(
j
=
typelib
->
type_names
[
pos
])
;
pos
++
)
{
for
(
i
=
x
;
*
i
&&
my_toupper
(
system_charset_info
,
*
i
)
==
my_toupper
(
system_charset_info
,
*
j
)
;
i
++
,
j
++
)
;
*
i
&&
my_toupper
(
&
my_charset_latin1
,
*
i
)
==
my_toupper
(
&
my_charset_latin1
,
*
j
)
;
i
++
,
j
++
)
;
if
(
!
*
j
)
{
while
(
*
i
==
' '
)
...
...
sql/sql_string.cc
View file @
23f25285
...
...
@@ -28,6 +28,7 @@
#include <floatingpoint.h>
#endif
CHARSET_INFO
*
system_charset_info
=
&
my_charset_latin1
;
extern
gptr
sql_alloc
(
unsigned
size
);
extern
void
sql_element_free
(
void
*
ptr
);
static
uint32
...
...
tools/mysqlmanager.c
View file @
23f25285
...
...
@@ -89,6 +89,8 @@
#define MAX_LAUNCHER_MSG 256
#endif
static
CHARSET_INFO
*
cs
=
&
my_charset_latin1
;
#define MAX_RETRY_COUNT 100
/*
...
...
@@ -428,8 +430,8 @@ static int exec_line(struct manager_thd* thd,char* buf,char* buf_end)
{
char
*
p
=
buf
;
struct
manager_cmd
*
cmd
;
for
(;
p
<
buf_end
&&
!
my_isspace
(
system_charset_info
,
*
p
);
p
++
)
*
p
=
my_tolower
(
system_charset_info
,
*
p
);
for
(;
p
<
buf_end
&&
!
my_isspace
(
cs
,
*
p
);
p
++
)
*
p
=
my_tolower
(
cs
,
*
p
);
log_info
(
"Command '%s'"
,
buf
);
if
(
!
(
cmd
=
lookup_cmd
(
buf
,(
int
)(
p
-
buf
))))
{
...
...
@@ -439,7 +441,7 @@ static int exec_line(struct manager_thd* thd,char* buf,char* buf_end)
thd
->
fatal
=
1
;
return
1
;
}
for
(;
p
<
buf_end
&&
my_isspace
(
system_charset_info
,
*
p
);
p
++
);
for
(;
p
<
buf_end
&&
my_isspace
(
cs
,
*
p
);
p
++
);
return
cmd
->
handler_func
(
thd
,
p
,
buf_end
);
}
...
...
@@ -716,7 +718,7 @@ HANDLE_DECL(handle_query)
int
num_fields
,
i
,
ident_len
;
char
*
ident
,
*
query
;
query
=
ident
=
args_start
;
while
(
!
my_isspace
(
system_charset_info
,
*
query
))
while
(
!
my_isspace
(
cs
,
*
query
))
query
++
;
if
(
query
==
ident
)
{
...
...
@@ -724,7 +726,7 @@ HANDLE_DECL(handle_query)
goto
err
;
}
ident_len
=
(
int
)(
query
-
ident
);
while
(
query
<
args_end
&&
my_isspace
(
system_charset_info
,
*
query
))
while
(
query
<
args_end
&&
my_isspace
(
cs
,
*
query
))
query
++
;
if
(
query
==
args_end
)
{
...
...
@@ -1000,7 +1002,7 @@ static int authenticate(struct manager_thd* thd)
for
(
buf
=
thd
->
cmd_buf
,
p
=
thd
->
user
,
p_end
=
p
+
MAX_USER_NAME
;
buf
<
buf_end
&&
(
c
=*
buf
)
&&
p
<
p_end
;
buf
++
,
p
++
)
{
if
(
my_isspace
(
system_charset_info
,
c
))
if
(
my_isspace
(
cs
,
c
))
{
*
p
=
0
;
break
;
...
...
@@ -1013,7 +1015,7 @@ static int authenticate(struct manager_thd* thd)
if
(
!
(
u
=
(
struct
manager_user
*
)
hash_search
(
&
user_hash
,
thd
->
user
,
(
uint
)(
p
-
thd
->
user
))))
return
1
;
for
(;
my_isspace
(
system_charset_info
,
*
buf
)
&&
buf
<
buf_end
;
buf
++
)
/* empty */
;
for
(;
my_isspace
(
cs
,
*
buf
)
&&
buf
<
buf_end
;
buf
++
)
/* empty */
;
my_MD5Init
(
&
context
);
my_MD5Update
(
&
context
,(
uchar
*
)
buf
,(
uint
)(
buf_end
-
buf
));
...
...
@@ -1582,9 +1584,9 @@ static void manager_exec_free(void* e)
static
int
hex_val
(
char
c
)
{
if
(
my_isdigit
(
system_charset_info
,
c
))
if
(
my_isdigit
(
cs
,
c
))
return
c
-
'0'
;
c
=
my_tolower
(
system_charset_info
,
c
);
c
=
my_tolower
(
cs
,
c
);
return
c
-
'a'
+
10
;
}
...
...
@@ -1641,7 +1643,7 @@ static void init_user_hash()
FILE
*
f
;
char
buf
[
80
];
int
line_num
=
1
;
if
(
hash_init
(
&
user_hash
,
system_charset_info
,
1024
,
0
,
0
,
if
(
hash_init
(
&
user_hash
,
cs
,
1024
,
0
,
0
,
get_user_key
,
manager_user_free
,
MYF
(
0
)))
die
(
"Could not initialize user hash"
);
if
(
!
(
f
=
my_fopen
(
manager_pw_file
,
O_RDONLY
|
O_BINARY
,
MYF
(
MY_WME
))))
...
...
@@ -1688,7 +1690,7 @@ static void init_pid_file()
static
void
init_globals
()
{
pthread_attr_t
thr_attr
;
if
(
hash_init
(
&
exec_hash
,
system_charset_info
,
1024
,
0
,
0
,
if
(
hash_init
(
&
exec_hash
,
cs
,
1024
,
0
,
0
,
get_exec_key
,
manager_exec_free
,
MYF
(
0
)))
die
(
"Exec hash initialization failed"
);
if
(
!
one_thread
)
...
...
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