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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
ed2bb40a
Commit
ed2bb40a
authored
Mar 16, 2003
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New function my_charset_same()
BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted
parent
23f25285
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
12 additions
and
5 deletions
+12
-5
BitKeeper/etc/logging_ok
BitKeeper/etc/logging_ok
+1
-0
include/m_ctype.h
include/m_ctype.h
+1
-0
include/my_sys.h
include/my_sys.h
+1
-0
mysys/charset.c
mysys/charset.c
+4
-0
sql/item_func.cc
sql/item_func.cc
+1
-1
sql/item_strfunc.cc
sql/item_strfunc.cc
+1
-1
sql/sql_yacc.yy
sql/sql_yacc.yy
+3
-3
No files found.
BitKeeper/etc/logging_ok
View file @
ed2bb40a
...
...
@@ -65,6 +65,7 @@ monty@work.mysql.com
mwagner@cash.mwagner.org
mwagner@evoq.mwagner.org
mwagner@work.mysql.com
mysql@home.(none)
nick@mysql.com
nick@nick.leippe.com
papa@gbichot.local
...
...
include/m_ctype.h
View file @
ed2bb40a
...
...
@@ -199,6 +199,7 @@ extern CHARSET_INFO my_charset_latin1_de;
extern
CHARSET_INFO
my_charset_sjis
;
extern
CHARSET_INFO
my_charset_tis620
;
extern
CHARSET_INFO
my_charset_ucs2
;
extern
CHARSET_INFO
my_charset_ucse
;
extern
CHARSET_INFO
my_charset_ujis
;
extern
CHARSET_INFO
my_charset_utf8
;
extern
CHARSET_INFO
my_charset_win1250ch
;
...
...
include/my_sys.h
View file @
ed2bb40a
...
...
@@ -215,6 +215,7 @@ extern CHARSET_INFO *get_charset_by_csname(const char *cs_name,
extern
void
free_charsets
(
void
);
extern
char
*
list_charsets
(
myf
want_flags
);
/* my_free() this string... */
extern
char
*
get_charsets_dir
(
char
*
buf
);
extern
my_bool
my_charset_same
(
CHARSET_INFO
*
cs1
,
CHARSET_INFO
*
cs2
);
/* statistics */
...
...
mysys/charset.c
View file @
ed2bb40a
...
...
@@ -33,6 +33,10 @@
- Setting server default character set
*/
my_bool
my_charset_same
(
CHARSET_INFO
*
cs1
,
CHARSET_INFO
*
cs2
)
{
return
((
cs1
==
cs2
)
||
!
strcmp
(
cs1
->
csname
,
cs2
->
csname
));
}
static
void
set_max_sort_char
(
CHARSET_INFO
*
cs
)
{
...
...
sql/item_func.cc
View file @
ed2bb40a
...
...
@@ -136,7 +136,7 @@ Item_func::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref)
}
else
if
((
*
arg
)
->
coercibility
<
coercibility
)
{
if
(
strcmp
(
charset
()
->
csname
,(
*
arg
)
->
charset
()
->
csname
))
if
(
!
my_charset_same
(
charset
(),(
*
arg
)
->
charset
()
))
{
set_charset
(
&
my_charset_bin
);
coercibility
=
COER_NOCOLL
;
...
...
sql/item_strfunc.cc
View file @
ed2bb40a
...
...
@@ -2216,7 +2216,7 @@ bool Item_func_set_collation::fix_fields(THD *thd,struct st_table_list *tables,
return
1
;
}
if
(
strcmp
(
args
[
0
]
->
charset
()
->
csname
,
set_collation
->
csname
))
if
(
!
my_charset_same
(
args
[
0
]
->
charset
(),
set_collation
))
{
my_error
(
ER_COLLATION_CHARSET_MISMATCH
,
MYF
(
0
),
set_collation
->
name
,
args
[
0
]
->
charset
()
->
csname
);
...
...
sql/sql_yacc.yy
View file @
ed2bb40a
...
...
@@ -1284,7 +1284,7 @@ attribute:
| COMMENT_SYM text_literal { Lex->comment= $2; }
| COLLATE_SYM collation_name
{
if (Lex->charset &&
strcmp(Lex->charset->csname,$2->csname
))
if (Lex->charset &&
!my_charset_same(Lex->charset,$2
))
{
net_printf(YYTHD,ER_COLLATION_CHARSET_MISMATCH,
$2->name,Lex->charset->csname);
...
...
@@ -4250,7 +4250,7 @@ option_value:
CHARSET_INFO *cs= $2 ? $2 : thd->db_charset;
CHARSET_INFO *cl= $3 ? $3 : cs;
if (
(cl != cs) && strcmp(cs->csname,cl->csname
))
if (
!my_charset_same(cs,cl
))
{
net_printf(YYTHD,ER_COLLATION_CHARSET_MISMATCH,
cl->name,cs->csname);
...
...
@@ -4279,7 +4279,7 @@ option_value:
YYABORT;
}
}
else if (
(cl != cs) && strcmp(cs->csname,cl->csname
))
else if (
!my_charset_same(cs,cl
))
{
net_printf(YYTHD,ER_COLLATION_CHARSET_MISMATCH,
cl->name,cs->csname);
...
...
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