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
f71a7e4b
Commit
f71a7e4b
authored
Mar 16, 2003
by
root@home.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
set_default_charset() is not used anymore
Some system_charset_info were removed
parent
dfe65d32
Changes
14
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
23 additions
and
57 deletions
+23
-57
BitKeeper/etc/logging_ok
BitKeeper/etc/logging_ok
+1
-0
client/mysql.cc
client/mysql.cc
+1
-1
client/mysqlcheck.c
client/mysqlcheck.c
+1
-1
client/mysqldump.c
client/mysqldump.c
+1
-1
client/mysqlimport.c
client/mysqlimport.c
+1
-1
client/sql_string.h
client/sql_string.h
+2
-2
heap/hp_test1.c
heap/hp_test1.c
+1
-1
heap/hp_test2.c
heap/hp_test2.c
+6
-5
include/my_sys.h
include/my_sys.h
+0
-2
isam/isamchk.c
isam/isamchk.c
+1
-1
mysys/charset.c
mysys/charset.c
+0
-37
mysys/charset2html.c
mysys/charset2html.c
+3
-2
mysys/test_charset.c
mysys/test_charset.c
+3
-2
sql/mysqld.cc
sql/mysqld.cc
+2
-1
No files found.
BitKeeper/etc/logging_ok
View file @
f71a7e4b
...
...
@@ -77,6 +77,7 @@ ram@gw.udmsearch.izhnet.ru
ram@mysql.r18.ru
ram@ram.(none)
ranger@regul.home.lan
root@home.(none)
root@x3.internalnet
salle@banica.(none)
salle@geopard.(none)
...
...
client/mysql.cc
View file @
f71a7e4b
...
...
@@ -790,7 +790,7 @@ static int get_options(int argc, char **argv)
}
if
(
default_charset
)
{
if
(
set_default_charset_by_name
(
default_charset
,
MYF
(
MY_WME
)))
if
(
!
(
system_charset_info
=
get_charset_by_name
(
default_charset
,
MYF
(
MY_WME
)
)))
exit
(
1
);
}
if
(
argc
>
1
)
...
...
client/mysqlcheck.c
View file @
f71a7e4b
...
...
@@ -309,7 +309,7 @@ static int get_options(int *argc, char ***argv)
}
if
(
default_charset
)
{
if
(
set_default_charset_by_name
(
default_charset
,
MYF
(
MY_WME
)))
if
(
!
(
system_charset_info
=
get_charset_by_name
(
default_charset
,
MYF
(
MY_WME
)
)))
exit
(
1
);
}
if
(
*
argc
>
0
&&
opt_alldbs
)
...
...
client/mysqldump.c
View file @
f71a7e4b
...
...
@@ -483,7 +483,7 @@ static int get_options(int *argc, char ***argv)
}
if
(
default_charset
)
{
if
(
set_default_charset_by_name
(
default_charset
,
MYF
(
MY_WME
)))
if
(
!
(
system_charset_info
=
get_charset_by_name
(
default_charset
,
MYF
(
MY_WME
)
)))
exit
(
1
);
}
if
((
*
argc
<
1
&&
!
opt_alldbs
)
||
(
*
argc
>
0
&&
opt_alldbs
))
...
...
client/mysqlimport.c
View file @
f71a7e4b
...
...
@@ -239,7 +239,7 @@ static int get_options(int *argc, char ***argv)
}
if
(
default_charset
)
{
if
(
set_default_charset_by_name
(
default_charset
,
MYF
(
MY_WME
)))
if
(
!
(
system_charset_info
=
get_charset_by_name
(
default_charset
,
MYF
(
MY_WME
)
)))
exit
(
1
);
}
if
(
*
argc
<
2
)
...
...
client/sql_string.h
View file @
f71a7e4b
...
...
@@ -39,12 +39,12 @@ public:
String
()
{
Ptr
=
0
;
str_length
=
Alloced_length
=
0
;
alloced
=
0
;
str_charset
=
default_charset_info
;
str_charset
=
&
my_charset_latin1
;
}
String
(
uint32
length_arg
)
{
alloced
=
0
;
Alloced_length
=
0
;
(
void
)
real_alloc
(
length_arg
);
str_charset
=
default_charset_info
;
str_charset
=
&
my_charset_latin1
;
}
String
(
const
char
*
str
,
CHARSET_INFO
*
cs
)
{
...
...
heap/hp_test1.c
View file @
f71a7e4b
...
...
@@ -51,7 +51,7 @@ int main(int argc, char **argv)
keyinfo
[
0
].
seg
[
0
].
type
=
HA_KEYTYPE_BINARY
;
keyinfo
[
0
].
seg
[
0
].
start
=
1
;
keyinfo
[
0
].
seg
[
0
].
length
=
6
;
keyinfo
[
0
].
seg
[
0
].
charset
=
default_charset_info
;
keyinfo
[
0
].
seg
[
0
].
charset
=
&
my_charset_latin1
;
keyinfo
[
0
].
flag
=
HA_NOSAME
;
deleted
=
0
;
...
...
heap/hp_test2.c
View file @
f71a7e4b
...
...
@@ -64,6 +64,7 @@ int main(int argc, char *argv[])
HA_KEYSEG
keyseg
[
MAX_KEYS
*
5
];
HEAP_PTR
position
;
HP_CREATE_INFO
hp_create_info
;
CHARSET_INFO
*
cs
=
&
my_charset_latin1
;
MY_INIT
(
argv
[
0
]);
/* init my_sys library & pthreads */
LINT_INIT
(
position
);
...
...
@@ -85,7 +86,7 @@ int main(int argc, char *argv[])
keyinfo
[
0
].
seg
[
0
].
start
=
0
;
keyinfo
[
0
].
seg
[
0
].
length
=
6
;
keyinfo
[
0
].
seg
[
0
].
null_bit
=
0
;
keyinfo
[
0
].
seg
[
0
].
charset
=
default_charset_info
;
keyinfo
[
0
].
seg
[
0
].
charset
=
cs
;
keyinfo
[
1
].
seg
=
keyseg
+
1
;
keyinfo
[
1
].
keysegs
=
2
;
keyinfo
[
1
].
flag
=
0
;
...
...
@@ -94,12 +95,12 @@ int main(int argc, char *argv[])
keyinfo
[
1
].
seg
[
0
].
start
=
7
;
keyinfo
[
1
].
seg
[
0
].
length
=
6
;
keyinfo
[
1
].
seg
[
0
].
null_bit
=
0
;
keyinfo
[
1
].
seg
[
0
].
charset
=
default_charset_info
;
keyinfo
[
1
].
seg
[
0
].
charset
=
cs
;
keyinfo
[
1
].
seg
[
1
].
type
=
HA_KEYTYPE_TEXT
;
keyinfo
[
1
].
seg
[
1
].
start
=
0
;
/* key in two parts */
keyinfo
[
1
].
seg
[
1
].
length
=
6
;
keyinfo
[
1
].
seg
[
1
].
null_bit
=
0
;
keyinfo
[
1
].
seg
[
1
].
charset
=
default_charset_info
;
keyinfo
[
1
].
seg
[
1
].
charset
=
cs
;
keyinfo
[
2
].
seg
=
keyseg
+
3
;
keyinfo
[
2
].
keysegs
=
1
;
keyinfo
[
2
].
flag
=
HA_NOSAME
;
...
...
@@ -108,7 +109,7 @@ int main(int argc, char *argv[])
keyinfo
[
2
].
seg
[
0
].
start
=
12
;
keyinfo
[
2
].
seg
[
0
].
length
=
8
;
keyinfo
[
2
].
seg
[
0
].
null_bit
=
0
;
keyinfo
[
2
].
seg
[
0
].
charset
=
default_charset_info
;
keyinfo
[
2
].
seg
[
0
].
charset
=
cs
;
keyinfo
[
3
].
seg
=
keyseg
+
4
;
keyinfo
[
3
].
keysegs
=
1
;
keyinfo
[
3
].
flag
=
HA_NOSAME
;
...
...
@@ -118,7 +119,7 @@ int main(int argc, char *argv[])
keyinfo
[
3
].
seg
[
0
].
length
=
1
;
keyinfo
[
3
].
seg
[
0
].
null_bit
=
1
;
keyinfo
[
3
].
seg
[
0
].
null_pos
=
38
;
keyinfo
[
3
].
seg
[
0
].
charset
=
default_charset_info
;
keyinfo
[
3
].
seg
[
0
].
charset
=
cs
;
bzero
((
char
*
)
key1
,
sizeof
(
key1
));
bzero
((
char
*
)
key3
,
sizeof
(
key3
));
...
...
include/my_sys.h
View file @
f71a7e4b
...
...
@@ -209,11 +209,9 @@ extern CHARSET_INFO compiled_charsets[];
extern
uint
get_charset_number
(
const
char
*
cs_name
);
extern
const
char
*
get_charset_name
(
uint
cs_number
);
extern
CHARSET_INFO
*
get_charset
(
uint
cs_number
,
myf
flags
);
extern
my_bool
set_default_charset
(
uint
cs
,
myf
flags
);
extern
CHARSET_INFO
*
get_charset_by_name
(
const
char
*
cs_name
,
myf
flags
);
extern
CHARSET_INFO
*
get_charset_by_csname
(
const
char
*
cs_name
,
uint
cs_flags
,
myf
my_flags
);
extern
my_bool
set_default_charset_by_name
(
const
char
*
cs_name
,
myf
flags
);
extern
void
free_charsets
(
void
);
extern
char
*
list_charsets
(
myf
want_flags
);
/* my_free() this string... */
extern
char
*
get_charsets_dir
(
char
*
buf
);
...
...
isam/isamchk.c
View file @
f71a7e4b
...
...
@@ -681,7 +681,7 @@ static void get_options(register int *argc, register char ***argv)
}
if
(
default_charset
)
{
if
(
set_default_charset_by_name
(
default_charset
,
MYF
(
MY_WME
)))
if
(
!
(
default_charset_info
=
get_charset_by_name
(
default_charset
,
MYF
(
MY_WME
)
)))
exit
(
1
);
}
return
;
...
...
mysys/charset.c
View file @
f71a7e4b
...
...
@@ -606,24 +606,6 @@ CHARSET_INFO *get_charset(uint cs_number, myf flags)
return
cs
;
}
my_bool
set_default_charset
(
uint
cs
,
myf
flags
)
{
CHARSET_INFO
*
new_charset
;
DBUG_ENTER
(
"set_default_charset"
);
DBUG_PRINT
(
"enter"
,(
"character set: %d"
,(
int
)
cs
));
new_charset
=
get_charset
(
cs
,
flags
);
if
(
!
new_charset
)
{
DBUG_PRINT
(
"error"
,(
"Couldn't set default character set"
));
DBUG_RETURN
(
TRUE
);
/* error */
}
default_charset_info
=
new_charset
;
system_charset_info
=
new_charset
;
DBUG_RETURN
(
FALSE
);
}
CHARSET_INFO
*
get_charset_by_name
(
const
char
*
cs_name
,
myf
flags
)
{
uint
cs_number
;
...
...
@@ -673,25 +655,6 @@ CHARSET_INFO *get_charset_by_csname(const char *cs_name,
}
my_bool
set_default_charset_by_name
(
const
char
*
cs_name
,
myf
flags
)
{
CHARSET_INFO
*
new_charset
;
DBUG_ENTER
(
"set_default_charset_by_name"
);
DBUG_PRINT
(
"enter"
,(
"character set: %s"
,
cs_name
));
new_charset
=
get_charset_by_name
(
cs_name
,
flags
);
if
(
!
new_charset
)
{
DBUG_PRINT
(
"error"
,(
"Couldn't set default character set"
));
DBUG_RETURN
(
TRUE
);
/* error */
}
default_charset_info
=
new_charset
;
system_charset_info
=
new_charset
;
DBUG_RETURN
(
FALSE
);
}
/* Only append name if it doesn't exist from before */
static
my_bool
charset_in_string
(
const
char
*
name
,
DYNAMIC_STRING
*
s
)
...
...
mysys/charset2html.c
View file @
f71a7e4b
...
...
@@ -108,6 +108,7 @@ static void print_cs(CHARSET_INFO *cs)
int
main
(
int
argc
,
char
**
argv
)
{
const
char
*
the_set
=
MYSQL_CHARSET
;
int
argcnt
=
1
;
CHARSET_INFO
*
cs
;
my_init
();
...
...
@@ -120,10 +121,10 @@ int main(int argc, char **argv) {
if
(
argc
>
argcnt
)
charsets_dir
=
argv
[
argcnt
++
];
if
(
set_default_charset_by_name
(
the_set
,
MYF
(
MY_WME
)))
if
(
!
(
cs
=
get_charset_by_name
(
the_set
,
MYF
(
MY_WME
)
)))
return
1
;
print_cs
(
default_charset_info
);
print_cs
(
cs
);
return
0
;
}
mysys/test_charset.c
View file @
f71a7e4b
...
...
@@ -58,6 +58,7 @@ int main(int argc, char **argv) {
const
char
*
the_set
=
MYSQL_CHARSET
;
char
*
cs_list
;
int
argcnt
=
1
;
CHARSET_INFO
*
cs
;
my_init
();
...
...
@@ -70,11 +71,11 @@ int main(int argc, char **argv) {
if
(
argc
>
argcnt
)
charsets_dir
=
argv
[
argcnt
++
];
if
(
set_default_charset_by_name
(
the_set
,
MYF
(
MY_WME
)))
if
(
!
(
cs
=
get_charset_by_name
(
the_set
,
MYF
(
MY_WME
)
)))
return
1
;
puts
(
"CHARSET INFO:"
);
_print_csinfo
(
default_charset_info
);
_print_csinfo
(
cs
);
fflush
(
stdout
);
cs_list
=
list_charsets
(
MYF
(
MY_CS_COMPILED
|
MY_CS_CONFIG
));
...
...
sql/mysqld.cc
View file @
f71a7e4b
...
...
@@ -2068,8 +2068,9 @@ static int init_common_variables(const char *conf_file_name, int argc,
#ifdef USE_REGEX
regex_init
(
&
my_charset_latin1
);
#endif
if
(
set_default_charset_by_name
(
sys_charset
.
value
,
MYF
(
MY_WME
)))
if
(
!
(
default_charset_info
=
get_charset_by_name
(
sys_charset
.
value
,
MYF
(
MY_WME
)
)))
return
1
;
system_charset_info
=
default_charset_info
;
charsets_list
=
list_charsets
(
MYF
(
MY_CS_COMPILED
|
MY_CS_CONFIG
));
if
(
use_temp_pool
&&
bitmap_init
(
&
temp_pool
,
1024
,
1
))
...
...
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