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
4f641c04
Commit
4f641c04
authored
Jul 12, 2005
by
georg@lmy002.wdf.sap.corp
Browse files
Options
Browse Files
Download
Plain Diff
Merge grichter@bk-internal1.mysql.com:/home/bk/mysql-5.0
into lmy002.wdf.sap.corp:/home/georg/work/mysql/prod/mysql-5.0
parents
2204effd
55d41325
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
0 deletions
+48
-0
include/mysql.h
include/mysql.h
+14
-0
libmysql/libmysql.c
libmysql/libmysql.c
+15
-0
libmysql/libmysql.def
libmysql/libmysql.def
+1
-0
tests/mysql_client_test.c
tests/mysql_client_test.c
+18
-0
No files found.
include/mysql.h
View file @
4f641c04
...
@@ -218,6 +218,18 @@ enum mysql_rpl_type
...
@@ -218,6 +218,18 @@ enum mysql_rpl_type
MYSQL_RPL_MASTER
,
MYSQL_RPL_SLAVE
,
MYSQL_RPL_ADMIN
MYSQL_RPL_MASTER
,
MYSQL_RPL_SLAVE
,
MYSQL_RPL_ADMIN
};
};
typedef
struct
character_set
{
unsigned
int
number
;
/* character set number */
unsigned
int
state
;
/* character set state */
const
char
*
csname
;
/* collation name */
const
char
*
name
;
/* character set name */
const
char
*
comment
;
/* comment */
const
char
*
dir
;
/* character set directory */
unsigned
int
mbminlen
;
/* min. length for multibyte strings */
unsigned
int
mbmaxlen
;
/* max. length for multibyte strings */
}
MY_CHARSET_INFO
;
struct
st_mysql_methods
;
struct
st_mysql_methods
;
typedef
struct
st_mysql
typedef
struct
st_mysql
...
@@ -418,6 +430,8 @@ my_bool STDCALL mysql_slave_query(MYSQL *mysql, const char *q,
...
@@ -418,6 +430,8 @@ my_bool STDCALL mysql_slave_query(MYSQL *mysql, const char *q,
unsigned
long
length
);
unsigned
long
length
);
my_bool
STDCALL
mysql_slave_send_query
(
MYSQL
*
mysql
,
const
char
*
q
,
my_bool
STDCALL
mysql_slave_send_query
(
MYSQL
*
mysql
,
const
char
*
q
,
unsigned
long
length
);
unsigned
long
length
);
void
STDCALL
mysql_get_character_set_info
(
MYSQL
*
mysql
,
MY_CHARSET_INFO
*
charset
);
/* local infile support */
/* local infile support */
...
...
libmysql/libmysql.c
View file @
4f641c04
...
@@ -1495,6 +1495,21 @@ const char * STDCALL mysql_character_set_name(MYSQL *mysql)
...
@@ -1495,6 +1495,21 @@ const char * STDCALL mysql_character_set_name(MYSQL *mysql)
return
mysql
->
charset
->
csname
;
return
mysql
->
charset
->
csname
;
}
}
void
STDCALL
mysql_get_character_set_info
(
MYSQL
*
mysql
,
MY_CHARSET_INFO
*
csinfo
)
{
csinfo
->
number
=
mysql
->
charset
->
number
;
csinfo
->
state
=
mysql
->
charset
->
state
;
csinfo
->
csname
=
mysql
->
charset
->
csname
;
csinfo
->
name
=
mysql
->
charset
->
name
;
csinfo
->
comment
=
mysql
->
charset
->
comment
;
csinfo
->
mbminlen
=
mysql
->
charset
->
mbminlen
;
csinfo
->
mbmaxlen
=
mysql
->
charset
->
mbmaxlen
;
if
(
mysql
->
options
.
charset_dir
)
csinfo
->
dir
=
mysql
->
options
.
charset_dir
;
else
csinfo
->
dir
=
charsets_dir
;
}
int
STDCALL
mysql_set_character_set
(
MYSQL
*
mysql
,
char
*
cs_name
)
int
STDCALL
mysql_set_character_set
(
MYSQL
*
mysql
,
char
*
cs_name
)
{
{
...
...
libmysql/libmysql.def
View file @
4f641c04
...
@@ -149,5 +149,6 @@ EXPORTS
...
@@ -149,5 +149,6 @@ EXPORTS
mysql_server_init
mysql_server_init
mysql_server_end
mysql_server_end
mysql_set_character_set
mysql_set_character_set
mysql_get_character_set_info
get_defaults_files
get_defaults_files
modify_defaults_file
modify_defaults_file
tests/mysql_client_test.c
View file @
4f641c04
...
@@ -13626,6 +13626,23 @@ static void test_bug10214()
...
@@ -13626,6 +13626,23 @@ static void test_bug10214()
mysql_query
(
mysql
,
"set sql_mode=''"
);
mysql_query
(
mysql
,
"set sql_mode=''"
);
}
}
static
void
test_client_character_set
()
{
MY_CHARSET_INFO
cs
;
const
char
*
csname
;
int
rc
;
myheader
(
"test_client_character_set"
);
csname
=
"utf8"
;
rc
=
mysql_set_character_set
(
mysql
,
csname
);
DIE_UNLESS
(
rc
==
0
);
mysql_get_character_set_info
(
mysql
,
&
cs
);
DIE_UNLESS
(
!
strcmp
(
cs
.
csname
,
"utf8"
));
DIE_UNLESS
(
!
strcmp
(
cs
.
name
,
"utf8_general_ci"
));
}
/*
/*
Read and parse arguments and MySQL options from my.cnf
Read and parse arguments and MySQL options from my.cnf
...
@@ -13850,6 +13867,7 @@ static struct my_tests_st my_tests[]= {
...
@@ -13850,6 +13867,7 @@ static struct my_tests_st my_tests[]= {
{
"test_cursors_with_union"
,
test_cursors_with_union
},
{
"test_cursors_with_union"
,
test_cursors_with_union
},
{
"test_truncation"
,
test_truncation
},
{
"test_truncation"
,
test_truncation
},
{
"test_truncation_option"
,
test_truncation_option
},
{
"test_truncation_option"
,
test_truncation_option
},
{
"test_client_character_set"
,
test_client_character_set
},
{
"test_bug8330"
,
test_bug8330
},
{
"test_bug8330"
,
test_bug8330
},
{
"test_bug7990"
,
test_bug7990
},
{
"test_bug7990"
,
test_bug7990
},
{
"test_bug8378"
,
test_bug8378
},
{
"test_bug8378"
,
test_bug8378
},
...
...
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