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
a88af6c1
Commit
a88af6c1
authored
Feb 23, 2005
by
bar@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge
parents
f3c0e35e
4996daec
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
13 deletions
+19
-13
include/config-win.h
include/config-win.h
+1
-0
include/mysys_err.h
include/mysys_err.h
+2
-1
myisam/myisamchk.c
myisam/myisamchk.c
+13
-11
mysys/charset.c
mysys/charset.c
+1
-1
mysys/errors.c
mysys/errors.c
+2
-0
No files found.
include/config-win.h
View file @
a88af6c1
...
...
@@ -408,4 +408,5 @@ inline double ulonglong2double(ulonglong value)
#define HAVE_CHARSET_ucs2 1
#define HAVE_CHARSET_ujis 1
#define HAVE_CHARSET_utf8 1
#define HAVE_UCA_COLLATIONS 1
include/mysys_err.h
View file @
a88af6c1
...
...
@@ -56,7 +56,8 @@ extern const char * NEAR globerrs[]; /* my_error_messages is here */
#define EE_CANT_SYMLINK 25
#define EE_REALPATH 26
#define EE_SYNC 27
#define EE_ERROR_LAST 27
/*Copy last error nr.*/
#define EE_UNKNOWN_COLLATION 28
#define EE_ERROR_LAST 28
/*Copy last error nr.*/
/* Add error numbers before EE_ERROR_LAST and change it accordingly. */
/* exit codes for all MySQL programs */
...
...
myisam/myisamchk.c
View file @
a88af6c1
...
...
@@ -41,8 +41,8 @@ SET_STACK_SIZE(9000) /* Minimum stack size for program */
static
uint
decode_bits
;
static
char
**
default_argv
;
static
const
char
*
load_default_groups
[]
=
{
"myisamchk"
,
0
};
static
const
char
*
set_c
harset
_name
,
*
opt_tmpdir
;
static
CHARSET_INFO
*
set_c
harset
;
static
const
char
*
set_c
ollation
_name
,
*
opt_tmpdir
;
static
CHARSET_INFO
*
set_c
ollation
;
static
long
opt_myisam_block_size
;
static
long
opt_key_cache_block_size
;
static
const
char
*
my_progname_short
;
...
...
@@ -149,7 +149,7 @@ int main(int argc, char **argv)
}
/* main */
enum
options_mc
{
OPT_CHARSETS_DIR
=
256
,
OPT_SET_C
HARSET
,
OPT_START_CHECK_POS
,
OPT_CHARSETS_DIR
=
256
,
OPT_SET_C
OLLATION
,
OPT_START_CHECK_POS
,
OPT_CORRECT_CHECKSUM
,
OPT_KEY_BUFFER_SIZE
,
OPT_KEY_CACHE_BLOCK_SIZE
,
OPT_MYISAM_BLOCK_SIZE
,
OPT_READ_BUFFER_SIZE
,
OPT_WRITE_BUFFER_SIZE
,
OPT_SORT_BUFFER_SIZE
,
...
...
@@ -252,9 +252,9 @@ static struct my_option my_long_options[] =
(
gptr
*
)
&
check_param
.
auto_increment_value
,
(
gptr
*
)
&
check_param
.
auto_increment_value
,
0
,
GET_ULL
,
OPT_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"set-c
haracter-set"
,
OPT_SET_CHARSET
,
"Change the c
haracter set
used by the index"
,
(
gptr
*
)
&
set_c
harset
_name
,
0
,
0
,
GET_STR
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"set-c
ollation"
,
OPT_SET_COLLATION
,
"Change the c
ollation
used by the index"
,
(
gptr
*
)
&
set_c
ollation
_name
,
0
,
0
,
GET_STR
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"set-variable"
,
'O'
,
"Change the value of a variable. Please note that this option is deprecated; you can set variables directly with --variable-name=value."
,
0
,
0
,
0
,
GET_STR
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
...
...
@@ -739,8 +739,9 @@ static void get_options(register int *argc,register char ***argv)
check_param
.
tmpdir
=&
myisamchk_tmpdir
;
check_param
.
key_cache_block_size
=
opt_key_cache_block_size
;
if
(
set_charset_name
)
if
(
!
(
set_charset
=
get_charset_by_name
(
set_charset_name
,
MYF
(
MY_WME
))))
if
(
set_collation_name
)
if
(
!
(
set_collation
=
get_charset_by_name
(
set_collation_name
,
MYF
(
MY_WME
))))
exit
(
1
);
myisam_block_size
=
(
uint
)
1
<<
my_bit_log2
(
opt_myisam_block_size
);
...
...
@@ -874,11 +875,12 @@ static int myisamchk(MI_CHECK *param, my_string filename)
(((
ulonglong
)
1L
<<
share
->
base
.
keys
)
-
1
))
||
test_if_almost_full
(
info
)
||
info
->
s
->
state
.
header
.
file_version
[
3
]
!=
myisam_file_magic
[
3
]
||
(
set_charset
&&
set_charset
->
number
!=
share
->
state
.
header
.
language
)
||
(
set_collation
&&
set_collation
->
number
!=
share
->
state
.
header
.
language
)
||
myisam_block_size
!=
MI_KEY_BLOCK_LENGTH
))
{
if
(
set_c
harset
)
param
->
language
=
set_charset
->
number
;
if
(
set_c
ollation
)
param
->
language
=
set_collation
->
number
;
if
(
recreate_table
(
param
,
&
info
,
filename
))
{
VOID
(
fprintf
(
stderr
,
...
...
mysys/charset.c
View file @
a88af6c1
...
...
@@ -530,7 +530,7 @@ CHARSET_INFO *get_charset_by_name(const char *cs_name, myf flags)
{
char
index_file
[
FN_REFLEN
];
strmov
(
get_charsets_dir
(
index_file
),
MY_CHARSET_INDEX
);
my_error
(
EE_UNKNOWN_C
HARSET
,
MYF
(
ME_BELL
),
cs_name
,
index_file
);
my_error
(
EE_UNKNOWN_C
OLLATION
,
MYF
(
ME_BELL
),
cs_name
,
index_file
);
}
return
cs
;
...
...
mysys/errors.c
View file @
a88af6c1
...
...
@@ -49,6 +49,7 @@ const char * NEAR globerrs[GLOBERRS]=
"Can't create symlink '%s' pointing at '%s' (Error %d)"
,
"Error on realpath() on '%s' (Error %d)"
,
"Can't sync file '%s' to disk (Errcode: %d)"
,
"Collation '%s' is not a compiled collation and is not specified in the '%s' file"
,
};
void
init_glob_errs
(
void
)
...
...
@@ -87,5 +88,6 @@ void init_glob_errs()
EE
(
EE_CANT_SYMLINK
)
=
"Can't create symlink '%s' pointing at '%s' (Error %d)"
;
EE
(
EE_REALPATH
)
=
"Error on realpath() on '%s' (Error %d)"
;
EE
(
EE_SYNC
)
=
"Can't sync file '%s' to disk (Errcode: %d)"
;
EE
(
EE_UNKNOWN_COLLATION
)
=
"Collation '%s' is not a compiled collation and is not specified in the %s file"
;
}
#endif
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