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
45341b92
Commit
45341b92
authored
Nov 22, 2004
by
tomas@poseidon.ndb.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge poseidon.ndb.mysql.com:/home/tomas/mysql-4.1
into poseidon.ndb.mysql.com:/home/tomas/mysql-4.1-mysqladmin
parents
e38512b3
fee21dd3
Changes
21
Show whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
138 additions
and
67 deletions
+138
-67
include/m_ctype.h
include/m_ctype.h
+1
-1
mysql-test/r/ctype_latin1.result
mysql-test/r/ctype_latin1.result
+9
-0
mysql-test/t/ctype_latin1.test
mysql-test/t/ctype_latin1.test
+7
-0
mysys/charset.c
mysys/charset.c
+11
-0
ndb/include/util/ndb_opts.h
ndb/include/util/ndb_opts.h
+12
-6
ndb/src/kernel/vm/Configuration.cpp
ndb/src/kernel/vm/Configuration.cpp
+1
-1
ndb/src/mgmclient/main.cpp
ndb/src/mgmclient/main.cpp
+1
-1
ndb/src/mgmsrv/main.cpp
ndb/src/mgmsrv/main.cpp
+8
-4
ndb/tools/delete_all.cpp
ndb/tools/delete_all.cpp
+1
-1
ndb/tools/desc.cpp
ndb/tools/desc.cpp
+1
-1
ndb/tools/drop_index.cpp
ndb/tools/drop_index.cpp
+1
-1
ndb/tools/drop_tab.cpp
ndb/tools/drop_tab.cpp
+1
-1
ndb/tools/listTables.cpp
ndb/tools/listTables.cpp
+1
-1
ndb/tools/restore/restore_main.cpp
ndb/tools/restore/restore_main.cpp
+1
-1
ndb/tools/select_all.cpp
ndb/tools/select_all.cpp
+1
-1
ndb/tools/select_count.cpp
ndb/tools/select_count.cpp
+1
-1
ndb/tools/waiter.cpp
ndb/tools/waiter.cpp
+1
-1
sql/item_cmpfunc.cc
sql/item_cmpfunc.cc
+11
-9
strings/ctype-czech.c
strings/ctype-czech.c
+6
-6
strings/ctype-win1250ch.c
strings/ctype-win1250ch.c
+6
-6
strings/uca-dump.c
strings/uca-dump.c
+56
-24
No files found.
include/m_ctype.h
View file @
45341b92
...
@@ -63,7 +63,7 @@ typedef struct unicase_info_st
...
@@ -63,7 +63,7 @@ typedef struct unicase_info_st
#define MY_CS_UNICODE 128
/* is a charset is full unicode */
#define MY_CS_UNICODE 128
/* is a charset is full unicode */
#define MY_CS_READY 256
/* if a charset is initialized */
#define MY_CS_READY 256
/* if a charset is initialized */
#define MY_CS_AVAILABLE 512
/* If either compiled-in or loaded*/
#define MY_CS_AVAILABLE 512
/* If either compiled-in or loaded*/
#define MY_CS_CSSORT 1024
/* if case sensitive sort order */
#define MY_CHARSET_UNDEFINED 0
#define MY_CHARSET_UNDEFINED 0
...
...
mysql-test/r/ctype_latin1.result
View file @
45341b92
...
@@ -296,3 +296,12 @@ FD C3BD FD 1
...
@@ -296,3 +296,12 @@ FD C3BD FD 1
FE C3BE FE 1
FE C3BE FE 1
FF C3BF FF 1
FF C3BF FF 1
DROP TABLE t1;
DROP TABLE t1;
select 'a' regexp 'A' collate latin1_general_ci;
'a' regexp 'A' collate latin1_general_ci
1
select 'a' regexp 'A' collate latin1_general_cs;
'a' regexp 'A' collate latin1_general_cs
0
select 'a' regexp 'A' collate latin1_bin;
'a' regexp 'A' collate latin1_bin
0
mysql-test/t/ctype_latin1.test
View file @
45341b92
...
@@ -53,3 +53,10 @@ SELECT
...
@@ -53,3 +53,10 @@ SELECT
hex
(
@
l
:=
convert
(
@
u
using
latin1
)),
hex
(
@
l
:=
convert
(
@
u
using
latin1
)),
a
=@
l
FROM
t1
;
a
=@
l
FROM
t1
;
DROP
TABLE
t1
;
DROP
TABLE
t1
;
#
# Bug #6737: REGEXP gives wrong result with case sensitive collation
#
select
'a'
regexp
'A'
collate
latin1_general_ci
;
select
'a'
regexp
'A'
collate
latin1_general_cs
;
select
'a'
regexp
'A'
collate
latin1_bin
;
mysys/charset.c
View file @
45341b92
...
@@ -228,6 +228,7 @@ static int add_collation(CHARSET_INFO *cs)
...
@@ -228,6 +228,7 @@ static int add_collation(CHARSET_INFO *cs)
}
}
else
else
{
{
uchar
*
sort_order
=
all_charsets
[
cs
->
number
]
->
sort_order
;
simple_cs_init_functions
(
all_charsets
[
cs
->
number
]);
simple_cs_init_functions
(
all_charsets
[
cs
->
number
]);
new
->
mbminlen
=
1
;
new
->
mbminlen
=
1
;
new
->
mbmaxlen
=
1
;
new
->
mbmaxlen
=
1
;
...
@@ -236,6 +237,16 @@ static int add_collation(CHARSET_INFO *cs)
...
@@ -236,6 +237,16 @@ static int add_collation(CHARSET_INFO *cs)
all_charsets
[
cs
->
number
]
->
state
|=
MY_CS_LOADED
;
all_charsets
[
cs
->
number
]
->
state
|=
MY_CS_LOADED
;
}
}
all_charsets
[
cs
->
number
]
->
state
|=
MY_CS_AVAILABLE
;
all_charsets
[
cs
->
number
]
->
state
|=
MY_CS_AVAILABLE
;
/*
Check if case sensitive sort order: A < a < B.
We need MY_CS_FLAG for regex library, and for
case sensitivity flag for 5.0 client protocol,
to support isCaseSensitive() method in JDBC driver
*/
if
(
sort_order
&&
sort_order
[
'A'
]
<
sort_order
[
'a'
]
&&
sort_order
[
'a'
]
<
sort_order
[
'B'
])
all_charsets
[
cs
->
number
]
->
state
|=
MY_CS_CSSORT
;
}
}
}
}
else
else
...
...
ndb/include/util/ndb_opts.h
View file @
45341b92
...
@@ -32,10 +32,13 @@
...
@@ -32,10 +32,13 @@
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0 }, \
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0 }, \
{ "version", 'V', "Output version information and exit.", 0, 0, 0, \
{ "version", 'V', "Output version information and exit.", 0, 0, 0, \
GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0 }, \
GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0 }, \
{ "
connect-
string", 'c', \
{ "
ndb-connect
string", 'c', \
"Set connect string for connecting to ndb_mgmd. " \
"Set connect string for connecting to ndb_mgmd. " \
"<constr>=\"host=<hostname:port>[;nodeid=<id>]\". " \
"Syntax: \"[nodeid=<id>;][host=]<hostname>[:<port>]\". " \
"Overides specifying entries in NDB_CONNECTSTRING and config file", \
"Overides specifying entries in NDB_CONNECTSTRING and Ndb.cfg", \
(gptr*) &opt_connect_str, (gptr*) &opt_connect_str, 0, \
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },\
{ "connect-string", 'c', "same as --ndb-connectstring",\
(gptr*) &opt_connect_str, (gptr*) &opt_connect_str, 0, \
(gptr*) &opt_connect_str, (gptr*) &opt_connect_str, 0, \
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 }
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 }
#else
#else
...
@@ -46,11 +49,14 @@
...
@@ -46,11 +49,14 @@
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0 }, \
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0 }, \
{ "version", 'V', "Output version information and exit.", 0, 0, 0, \
{ "version", 'V', "Output version information and exit.", 0, 0, 0, \
GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0 }, \
GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0 }, \
{ "
connect-
string", 'c', \
{ "
ndb-connect
string", 'c', \
"Set connect string for connecting to ndb_mgmd. " \
"Set connect string for connecting to ndb_mgmd. " \
"
<constr>=\"host=<hostname:port>[;nodeid=<id
>]\". " \
"
Syntax: \"[nodeid=<id>;][host=]<hostname>[:<port
>]\". " \
"Overides specifying entries in NDB_CONNECTSTRING and
config file
", \
"Overides specifying entries in NDB_CONNECTSTRING and
Ndb.cfg
", \
(gptr*) &opt_connect_str, (gptr*) &opt_connect_str, 0, \
(gptr*) &opt_connect_str, (gptr*) &opt_connect_str, 0, \
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },\
{ "connect-string", 'c', "same as --ndb-connectstring",\
(gptr*) &opt_connect_str, (gptr*) &opt_connect_str, 0,\
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 }
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 }
#endif
#endif
...
...
ndb/src/kernel/vm/Configuration.cpp
View file @
45341b92
...
@@ -107,7 +107,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
...
@@ -107,7 +107,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
bool
bool
Configuration
::
init
(
int
argc
,
char
**
argv
)
Configuration
::
init
(
int
argc
,
char
**
argv
)
{
{
const
char
*
load_default_groups
[]
=
{
"ndbd"
,
0
};
const
char
*
load_default_groups
[]
=
{
"
mysql_cluster"
,
"
ndbd"
,
0
};
load_defaults
(
"my"
,
load_default_groups
,
&
argc
,
&
argv
);
load_defaults
(
"my"
,
load_default_groups
,
&
argc
,
&
argv
);
int
ho_error
;
int
ho_error
;
...
...
ndb/src/mgmclient/main.cpp
View file @
45341b92
...
@@ -139,7 +139,7 @@ int main(int argc, char** argv){
...
@@ -139,7 +139,7 @@ int main(int argc, char** argv){
NDB_INIT
(
argv
[
0
]);
NDB_INIT
(
argv
[
0
]);
const
char
*
_host
=
0
;
const
char
*
_host
=
0
;
int
_port
=
0
;
int
_port
=
0
;
const
char
*
load_default_groups
[]
=
{
"ndb_mgm"
,
0
};
const
char
*
load_default_groups
[]
=
{
"
mysql_cluster"
,
"
ndb_mgm"
,
0
};
load_defaults
(
"my"
,
load_default_groups
,
&
argc
,
&
argv
);
load_defaults
(
"my"
,
load_default_groups
,
&
argc
,
&
argv
);
int
ho_error
;
int
ho_error
;
...
...
ndb/src/mgmsrv/main.cpp
View file @
45341b92
...
@@ -103,10 +103,14 @@ static struct my_option my_long_options[] =
...
@@ -103,10 +103,14 @@ static struct my_option my_long_options[] =
0
,
0
,
0
,
GET_NO_ARG
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
0
,
0
,
0
,
GET_NO_ARG
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"version"
,
'V'
,
"Output version information and exit."
,
0
,
0
,
0
,
{
"version"
,
'V'
,
"Output version information and exit."
,
0
,
0
,
0
,
GET_NO_ARG
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
GET_NO_ARG
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"
connect-
string"
,
1023
,
{
"
ndb-connect
string"
,
1023
,
"Set connect string for connecting to ndb_mgmd. "
"Set connect string for connecting to ndb_mgmd. "
"<constr>=
\"
host=<hostname:port>[;nodeid=<id>]
\"
. "
"Syntax:
\"
[nodeid=<id>;][host=]<hostname>[:<port>]
\"
. "
"Overides specifying entries in NDB_CONNECTSTRING and config file"
,
"Overides specifying entries in NDB_CONNECTSTRING and Ndb.cfg"
,
(
gptr
*
)
&
opt_connect_str
,
(
gptr
*
)
&
opt_connect_str
,
0
,
GET_STR
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"connect-string"
,
1023
,
"same as --ndb-connectstring."
,
(
gptr
*
)
&
opt_connect_str
,
(
gptr
*
)
&
opt_connect_str
,
0
,
(
gptr
*
)
&
opt_connect_str
,
(
gptr
*
)
&
opt_connect_str
,
0
,
GET_STR
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
GET_STR
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"config-file"
,
'f'
,
"Specify cluster configuration file"
,
{
"config-file"
,
'f'
,
"Specify cluster configuration file"
,
...
@@ -186,7 +190,7 @@ int main(int argc, char** argv)
...
@@ -186,7 +190,7 @@ int main(int argc, char** argv)
global_mgmt_server_check
=
1
;
global_mgmt_server_check
=
1
;
glob
.
config_filename
=
"config.ini"
;
glob
.
config_filename
=
"config.ini"
;
const
char
*
load_default_groups
[]
=
{
"ndb_mgmd"
,
0
};
const
char
*
load_default_groups
[]
=
{
"
mysql_cluster"
,
"
ndb_mgmd"
,
0
};
load_defaults
(
"my"
,
load_default_groups
,
&
argc
,
&
argv
);
load_defaults
(
"my"
,
load_default_groups
,
&
argc
,
&
argv
);
int
ho_error
;
int
ho_error
;
...
...
ndb/tools/delete_all.cpp
View file @
45341b92
...
@@ -67,7 +67,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
...
@@ -67,7 +67,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
int
main
(
int
argc
,
char
**
argv
){
int
main
(
int
argc
,
char
**
argv
){
NDB_INIT
(
argv
[
0
]);
NDB_INIT
(
argv
[
0
]);
const
char
*
load_default_groups
[]
=
{
"
ndb_tools
"
,
0
};
const
char
*
load_default_groups
[]
=
{
"
mysql_cluster
"
,
0
};
load_defaults
(
"my"
,
load_default_groups
,
&
argc
,
&
argv
);
load_defaults
(
"my"
,
load_default_groups
,
&
argc
,
&
argv
);
int
ho_error
;
int
ho_error
;
if
((
ho_error
=
handle_options
(
&
argc
,
&
argv
,
my_long_options
,
get_one_option
)))
if
((
ho_error
=
handle_options
(
&
argc
,
&
argv
,
my_long_options
,
get_one_option
)))
...
...
ndb/tools/desc.cpp
View file @
45341b92
...
@@ -67,7 +67,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
...
@@ -67,7 +67,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
int
main
(
int
argc
,
char
**
argv
){
int
main
(
int
argc
,
char
**
argv
){
NDB_INIT
(
argv
[
0
]);
NDB_INIT
(
argv
[
0
]);
const
char
*
load_default_groups
[]
=
{
"
ndb_tools
"
,
0
};
const
char
*
load_default_groups
[]
=
{
"
mysql_cluster
"
,
0
};
load_defaults
(
"my"
,
load_default_groups
,
&
argc
,
&
argv
);
load_defaults
(
"my"
,
load_default_groups
,
&
argc
,
&
argv
);
int
ho_error
;
int
ho_error
;
if
((
ho_error
=
handle_options
(
&
argc
,
&
argv
,
my_long_options
,
get_one_option
)))
if
((
ho_error
=
handle_options
(
&
argc
,
&
argv
,
my_long_options
,
get_one_option
)))
...
...
ndb/tools/drop_index.cpp
View file @
45341b92
...
@@ -64,7 +64,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
...
@@ -64,7 +64,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
int
main
(
int
argc
,
char
**
argv
){
int
main
(
int
argc
,
char
**
argv
){
NDB_INIT
(
argv
[
0
]);
NDB_INIT
(
argv
[
0
]);
const
char
*
load_default_groups
[]
=
{
"
ndb_tools
"
,
0
};
const
char
*
load_default_groups
[]
=
{
"
mysql_cluster
"
,
0
};
load_defaults
(
"my"
,
load_default_groups
,
&
argc
,
&
argv
);
load_defaults
(
"my"
,
load_default_groups
,
&
argc
,
&
argv
);
int
ho_error
;
int
ho_error
;
if
((
ho_error
=
handle_options
(
&
argc
,
&
argv
,
my_long_options
,
get_one_option
)))
if
((
ho_error
=
handle_options
(
&
argc
,
&
argv
,
my_long_options
,
get_one_option
)))
...
...
ndb/tools/drop_tab.cpp
View file @
45341b92
...
@@ -64,7 +64,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
...
@@ -64,7 +64,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
int
main
(
int
argc
,
char
**
argv
){
int
main
(
int
argc
,
char
**
argv
){
NDB_INIT
(
argv
[
0
]);
NDB_INIT
(
argv
[
0
]);
const
char
*
load_default_groups
[]
=
{
"
ndb_tools
"
,
0
};
const
char
*
load_default_groups
[]
=
{
"
mysql_cluster
"
,
0
};
load_defaults
(
"my"
,
load_default_groups
,
&
argc
,
&
argv
);
load_defaults
(
"my"
,
load_default_groups
,
&
argc
,
&
argv
);
int
ho_error
;
int
ho_error
;
if
((
ho_error
=
handle_options
(
&
argc
,
&
argv
,
my_long_options
,
get_one_option
)))
if
((
ho_error
=
handle_options
(
&
argc
,
&
argv
,
my_long_options
,
get_one_option
)))
...
...
ndb/tools/listTables.cpp
View file @
45341b92
...
@@ -220,7 +220,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
...
@@ -220,7 +220,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
int
main
(
int
argc
,
char
**
argv
){
int
main
(
int
argc
,
char
**
argv
){
NDB_INIT
(
argv
[
0
]);
NDB_INIT
(
argv
[
0
]);
const
char
*
_tabname
;
const
char
*
_tabname
;
const
char
*
load_default_groups
[]
=
{
"
ndb_tools
"
,
0
};
const
char
*
load_default_groups
[]
=
{
"
mysql_cluster
"
,
0
};
load_defaults
(
"my"
,
load_default_groups
,
&
argc
,
&
argv
);
load_defaults
(
"my"
,
load_default_groups
,
&
argc
,
&
argv
);
int
ho_error
;
int
ho_error
;
if
((
ho_error
=
handle_options
(
&
argc
,
&
argv
,
my_long_options
,
get_one_option
)))
if
((
ho_error
=
handle_options
(
&
argc
,
&
argv
,
my_long_options
,
get_one_option
)))
...
...
ndb/tools/restore/restore_main.cpp
View file @
45341b92
...
@@ -143,7 +143,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
...
@@ -143,7 +143,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
bool
bool
readArguments
(
int
*
pargc
,
char
***
pargv
)
readArguments
(
int
*
pargc
,
char
***
pargv
)
{
{
const
char
*
load_default_groups
[]
=
{
"
ndb_tools
"
,
"ndb_restore"
,
0
};
const
char
*
load_default_groups
[]
=
{
"
mysql_cluster
"
,
"ndb_restore"
,
0
};
load_defaults
(
"my"
,
load_default_groups
,
pargc
,
pargv
);
load_defaults
(
"my"
,
load_default_groups
,
pargc
,
pargv
);
if
(
handle_options
(
pargc
,
pargv
,
my_long_options
,
get_one_option
))
if
(
handle_options
(
pargc
,
pargv
,
my_long_options
,
get_one_option
))
{
{
...
...
ndb/tools/select_all.cpp
View file @
45341b92
...
@@ -105,7 +105,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
...
@@ -105,7 +105,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
int
main
(
int
argc
,
char
**
argv
){
int
main
(
int
argc
,
char
**
argv
){
NDB_INIT
(
argv
[
0
]);
NDB_INIT
(
argv
[
0
]);
const
char
*
load_default_groups
[]
=
{
"
ndb_tools
"
,
0
};
const
char
*
load_default_groups
[]
=
{
"
mysql_cluster
"
,
0
};
load_defaults
(
"my"
,
load_default_groups
,
&
argc
,
&
argv
);
load_defaults
(
"my"
,
load_default_groups
,
&
argc
,
&
argv
);
const
char
*
_tabname
;
const
char
*
_tabname
;
int
ho_error
;
int
ho_error
;
...
...
ndb/tools/select_count.cpp
View file @
45341b92
...
@@ -83,7 +83,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
...
@@ -83,7 +83,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
int
main
(
int
argc
,
char
**
argv
){
int
main
(
int
argc
,
char
**
argv
){
NDB_INIT
(
argv
[
0
]);
NDB_INIT
(
argv
[
0
]);
const
char
*
load_default_groups
[]
=
{
"
ndb_tools
"
,
0
};
const
char
*
load_default_groups
[]
=
{
"
mysql_cluster
"
,
0
};
load_defaults
(
"my"
,
load_default_groups
,
&
argc
,
&
argv
);
load_defaults
(
"my"
,
load_default_groups
,
&
argc
,
&
argv
);
int
ho_error
;
int
ho_error
;
if
((
ho_error
=
handle_options
(
&
argc
,
&
argv
,
my_long_options
,
get_one_option
)))
if
((
ho_error
=
handle_options
(
&
argc
,
&
argv
,
my_long_options
,
get_one_option
)))
...
...
ndb/tools/waiter.cpp
View file @
45341b92
...
@@ -74,7 +74,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
...
@@ -74,7 +74,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
int
main
(
int
argc
,
char
**
argv
){
int
main
(
int
argc
,
char
**
argv
){
NDB_INIT
(
argv
[
0
]);
NDB_INIT
(
argv
[
0
]);
const
char
*
load_default_groups
[]
=
{
"
ndb_tools
"
,
0
};
const
char
*
load_default_groups
[]
=
{
"
mysql_cluster
"
,
0
};
load_defaults
(
"my"
,
load_default_groups
,
&
argc
,
&
argv
);
load_defaults
(
"my"
,
load_default_groups
,
&
argc
,
&
argv
);
const
char
*
_hostName
=
NULL
;
const
char
*
_hostName
=
NULL
;
int
ho_error
;
int
ho_error
;
...
...
sql/item_cmpfunc.cc
View file @
45341b92
...
@@ -2364,8 +2364,9 @@ Item_func_regex::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref)
...
@@ -2364,8 +2364,9 @@ Item_func_regex::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref)
return
0
;
return
0
;
}
}
int
error
;
int
error
;
if
((
error
=
regcomp
(
&
preg
,
res
->
c_ptr
(),
if
((
error
=
regcomp
(
&
preg
,
res
->
c_ptr
(),
(
cmp_collation
.
collation
->
state
&
MY_CS_BINSORT
)
?
((
cmp_collation
.
collation
->
state
&
MY_CS_BINSORT
)
||
(
cmp_collation
.
collation
->
state
&
MY_CS_CSSORT
))
?
REG_EXTENDED
|
REG_NOSUB
:
REG_EXTENDED
|
REG_NOSUB
:
REG_EXTENDED
|
REG_NOSUB
|
REG_ICASE
,
REG_EXTENDED
|
REG_NOSUB
|
REG_ICASE
,
cmp_collation
.
collation
)))
cmp_collation
.
collation
)))
...
@@ -2416,7 +2417,8 @@ longlong Item_func_regex::val_int()
...
@@ -2416,7 +2417,8 @@ longlong Item_func_regex::val_int()
regex_compiled
=
0
;
regex_compiled
=
0
;
}
}
if
(
regcomp
(
&
preg
,
res2
->
c_ptr
(),
if
(
regcomp
(
&
preg
,
res2
->
c_ptr
(),
(
cmp_collation
.
collation
->
state
&
MY_CS_BINSORT
)
?
((
cmp_collation
.
collation
->
state
&
MY_CS_BINSORT
)
||
(
cmp_collation
.
collation
->
state
&
MY_CS_CSSORT
))
?
REG_EXTENDED
|
REG_NOSUB
:
REG_EXTENDED
|
REG_NOSUB
:
REG_EXTENDED
|
REG_NOSUB
|
REG_ICASE
,
REG_EXTENDED
|
REG_NOSUB
|
REG_ICASE
,
cmp_collation
.
collation
))
cmp_collation
.
collation
))
...
...
strings/ctype-czech.c
View file @
45341b92
...
@@ -590,7 +590,7 @@ static MY_COLLATION_HANDLER my_collation_latin2_czech_ci_handler =
...
@@ -590,7 +590,7 @@ static MY_COLLATION_HANDLER my_collation_latin2_czech_ci_handler =
CHARSET_INFO
my_charset_latin2_czech_ci
=
CHARSET_INFO
my_charset_latin2_czech_ci
=
{
{
2
,
0
,
0
,
/* number */
2
,
0
,
0
,
/* number */
MY_CS_COMPILED
|
MY_CS_STRNXFRM
,
/* state
*/
MY_CS_COMPILED
|
MY_CS_STRNXFRM
|
MY_CS_CSSORT
,
/* state
*/
"latin2"
,
/* cs name */
"latin2"
,
/* cs name */
"latin2_czech_cs"
,
/* name */
"latin2_czech_cs"
,
/* name */
""
,
/* comment */
""
,
/* comment */
...
...
strings/ctype-win1250ch.c
View file @
45341b92
...
@@ -625,7 +625,7 @@ static MY_COLLATION_HANDLER my_collation_czech_ci_handler =
...
@@ -625,7 +625,7 @@ static MY_COLLATION_HANDLER my_collation_czech_ci_handler =
CHARSET_INFO
my_charset_cp1250_czech_ci
=
CHARSET_INFO
my_charset_cp1250_czech_ci
=
{
{
34
,
0
,
0
,
/* number */
34
,
0
,
0
,
/* number */
MY_CS_COMPILED
|
MY_CS_STRNXFRM
,
/* state */
MY_CS_COMPILED
|
MY_CS_STRNXFRM
|
MY_CS_CSSORT
,
/* state */
"cp1250"
,
/* cs name */
"cp1250"
,
/* cs name */
"cp1250_czech_cs"
,
/* name */
"cp1250_czech_cs"
,
/* name */
""
,
/* comment */
""
,
/* comment */
...
...
strings/uca-dump.c
View file @
45341b92
...
@@ -23,13 +23,14 @@ struct uca_item_st
...
@@ -23,13 +23,14 @@ struct uca_item_st
#define MY_UCA_PSHIFT 8
#define MY_UCA_PSHIFT 8
#endif
#endif
static
char
*
pname
[]
=
{
""
,
"2"
,
"3"
};
int
main
(
int
ac
,
char
**
av
)
int
main
(
int
ac
,
char
**
av
)
{
{
char
str
[
256
];
char
str
[
256
];
char
*
weights
[
64
];
char
*
weights
[
64
];
struct
uca_item_st
uca
[
64
*
1024
];
struct
uca_item_st
uca
[
64
*
1024
];
size_t
code
,
page
,
w
;
size_t
code
,
w
;
int
pagemaxlen
[
MY_UCA_NPAGES
];
int
pageloaded
[
MY_UCA_NPAGES
];
int
pageloaded
[
MY_UCA_NPAGES
];
bzero
(
uca
,
sizeof
(
uca
));
bzero
(
uca
,
sizeof
(
uca
));
...
@@ -155,14 +156,20 @@ int main(int ac, char **av)
...
@@ -155,14 +156,20 @@ int main(int ac, char **av)
printf
(
"#define MY_UCA_CMASK %d
\n
"
,
MY_UCA_CMASK
);
printf
(
"#define MY_UCA_CMASK %d
\n
"
,
MY_UCA_CMASK
);
printf
(
"#define MY_UCA_PSHIFT %d
\n
"
,
MY_UCA_PSHIFT
);
printf
(
"#define MY_UCA_PSHIFT %d
\n
"
,
MY_UCA_PSHIFT
);
for
(
w
=
0
;
w
<
1
;
w
++
)
for
(
w
=
0
;
w
<
3
;
w
++
)
{
{
size_t
page
;
int
pagemaxlen
[
MY_UCA_NPAGES
];
for
(
page
=
0
;
page
<
MY_UCA_NPAGES
;
page
++
)
for
(
page
=
0
;
page
<
MY_UCA_NPAGES
;
page
++
)
{
{
size_t
offs
;
size_t
offs
;
size_t
maxnum
=
0
;
size_t
maxnum
=
0
;
size_t
nchars
=
0
;
size_t
nchars
=
0
;
size_t
mchars
;
size_t
mchars
;
size_t
ndefs
=
0
;
pagemaxlen
[
page
]
=
0
;
/*
/*
Skip this page if no weights were loaded
Skip this page if no weights were loaded
...
@@ -183,15 +190,37 @@ int main(int ac, char **av)
...
@@ -183,15 +190,37 @@ int main(int ac, char **av)
code
=
page
*
MY_UCA_NCHARS
+
offs
;
code
=
page
*
MY_UCA_NCHARS
+
offs
;
/* Calculate only non-zero weights */
/* Calculate only non-zero weights */
num
=
0
;
for
(
num
=
0
,
i
=
0
;
i
<
uca
[
code
].
num
;
i
++
)
for
(
i
=
0
;
i
<
uca
[
code
].
num
;
i
++
)
if
(
uca
[
code
].
weight
[
w
][
i
])
if
(
uca
[
code
].
weight
[
w
][
i
])
num
++
;
num
++
;
maxnum
=
maxnum
<
num
?
num
:
maxnum
;
maxnum
=
maxnum
<
num
?
num
:
maxnum
;
/* Check if default weight */
if
(
w
==
1
&&
num
==
1
)
{
/* 0020 0000 ... */
if
(
uca
[
code
].
weight
[
w
][
0
]
==
0x0020
)
ndefs
++
;
}
else
if
(
w
==
2
&&
num
==
1
)
{
/* 0002 0000 ... */
if
(
uca
[
code
].
weight
[
w
][
0
]
==
0x0002
)
ndefs
++
;
}
}
}
maxnum
++
;
maxnum
++
;
/*
If the page have only default weights
then no needs to dump it, skip.
*/
if
(
ndefs
==
MY_UCA_NCHARS
)
{
printf
(
"/* Don't dump w=%d pg=%3X: ndefs=%d */
\n
"
,
w
,
page
,
ndefs
);
continue
;
}
switch
(
maxnum
)
switch
(
maxnum
)
{
{
case
0
:
mchars
=
8
;
break
;
case
0
:
mchars
=
8
;
break
;
...
@@ -210,8 +239,8 @@ int main(int ac, char **av)
...
@@ -210,8 +239,8 @@ int main(int ac, char **av)
*/
*/
printf
(
"uint16 page%03Xdata[]= { /* %04X (%d weights per char) */
\n
"
,
printf
(
"uint16 page%03Xdata
%s
[]= { /* %04X (%d weights per char) */
\n
"
,
page
,
page
*
MY_UCA_NCHARS
,
maxnum
);
page
,
p
name
[
w
],
p
age
*
MY_UCA_NCHARS
,
maxnum
);
for
(
offs
=
0
;
offs
<
MY_UCA_NCHARS
;
offs
++
)
for
(
offs
=
0
;
offs
<
MY_UCA_NCHARS
;
offs
++
)
{
{
...
@@ -251,9 +280,8 @@ int main(int ac, char **av)
...
@@ -251,9 +280,8 @@ int main(int ac, char **av)
}
}
printf
(
"};
\n\n
"
);
printf
(
"};
\n\n
"
);
}
}
}
printf
(
"uchar ucal[%d]={
\n
"
,
MY_UCA_NPAGES
);
printf
(
"uchar ucal%s[%d]={
\n
"
,
pname
[
w
],
MY_UCA_NPAGES
);
for
(
page
=
0
;
page
<
MY_UCA_NPAGES
;
page
++
)
for
(
page
=
0
;
page
<
MY_UCA_NPAGES
;
page
++
)
{
{
printf
(
"%d%s%s"
,
pagemaxlen
[
page
],
page
<
MY_UCA_NPAGES
-
1
?
","
:
""
,(
page
+
1
)
%
16
?
""
:
"
\n
"
);
printf
(
"%d%s%s"
,
pagemaxlen
[
page
],
page
<
MY_UCA_NPAGES
-
1
?
","
:
""
,(
page
+
1
)
%
16
?
""
:
"
\n
"
);
...
@@ -261,15 +289,19 @@ int main(int ac, char **av)
...
@@ -261,15 +289,19 @@ int main(int ac, char **av)
printf
(
"};
\n
"
);
printf
(
"};
\n
"
);
printf
(
"uint16 *ucaw[%d]={
\n
"
,
MY_UCA_NPAGES
);
printf
(
"uint16 *ucaw%s[%d]={
\n
"
,
pname
[
w
],
MY_UCA_NPAGES
);
for
(
page
=
0
;
page
<
MY_UCA_NPAGES
;
page
++
)
for
(
page
=
0
;
page
<
MY_UCA_NPAGES
;
page
++
)
{
{
if
(
!
pageloaded
[
page
])
const
char
*
comma
=
page
<
MY_UCA_NPAGES
-
1
?
","
:
""
;
printf
(
"NULL %s%s"
,
page
<
MY_UCA_NPAGES
-
1
?
","
:
""
,
(
page
+
1
)
%
4
?
""
:
"
\n
"
);
const
char
*
nline
=
(
page
+
1
)
%
4
?
""
:
"
\n
"
;
if
(
!
pagemaxlen
[
page
])
printf
(
"NULL %s%s"
,
comma
,
nline
);
else
else
printf
(
"page%03Xdata%s%s"
,
page
,
page
<
MY_UCA_NPAGES
-
1
?
","
:
""
,
(
page
+
1
)
%
4
?
""
:
"
\n
"
);
printf
(
"page%03Xdata%s%s%s"
,
page
,
pname
[
w
],
comma
,
nline
);
}
}
printf
(
"};
\n
"
);
printf
(
"};
\n
"
);
}
printf
(
"int main(void){ return 0;};
\n
"
);
printf
(
"int main(void){ return 0;};
\n
"
);
return
0
;
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