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
05adb8da
Commit
05adb8da
authored
Mar 21, 2003
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into genie.(none):/home/hf/work/mysql-4.1.lck
parents
4809dc74
2dc27531
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
40 additions
and
15 deletions
+40
-15
include/my_sys.h
include/my_sys.h
+0
-1
sql/item.cc
sql/item.cc
+12
-4
sql/item_cmpfunc.cc
sql/item_cmpfunc.cc
+15
-1
sql/mysql_priv.h
sql/mysql_priv.h
+3
-1
sql/sql_string.cc
sql/sql_string.cc
+3
-0
sql/sql_yacc.yy
sql/sql_yacc.yy
+7
-8
No files found.
include/my_sys.h
View file @
05adb8da
...
...
@@ -203,7 +203,6 @@ extern int (*fatal_error_handler_hook)(uint my_err, const char *str,
/* charsets */
extern
CHARSET_INFO
*
default_charset_info
;
extern
CHARSET_INFO
*
system_charset_info
;
extern
CHARSET_INFO
*
all_charsets
[
256
];
extern
CHARSET_INFO
compiled_charsets
[];
...
...
sql/item.cc
View file @
05adb8da
...
...
@@ -199,10 +199,17 @@ bool Item::set_charset(CHARSET_INFO *cs1, enum coercion co1,
{
if
(
cs1
!=
cs2
)
{
CHARSET_INFO
*
bin
=
get_charset_by_csname
(
cs1
->
csname
,
MY_CS_BINSORT
,
MYF
(
0
));
if
(
!
bin
)
return
1
;
set_charset
(
bin
,
COER_NOCOLL
);
if
(
co1
==
COER_EXPLICIT
)
{
return
1
;
}
else
{
CHARSET_INFO
*
bin
=
get_charset_by_csname
(
cs1
->
csname
,
MY_CS_BINSORT
,
MYF
(
0
));
if
(
!
bin
)
return
1
;
set_charset
(
bin
,
COER_NOCOLL
);
}
}
else
set_charset
(
cs2
,
co2
);
...
...
@@ -987,6 +994,7 @@ Item_varbinary::Item_varbinary(const char *str, uint str_length)
str
+=
2
;
}
*
ptr
=
0
;
// Keep purify happy
coercibility
=
COER_COERCIBLE
;
}
longlong
Item_varbinary
::
val_int
()
...
...
sql/item_cmpfunc.cc
View file @
05adb8da
...
...
@@ -111,7 +111,21 @@ bool Item_bool_func2::set_cmp_charset(CHARSET_INFO *cs1, enum coercion co1,
if
(
cs1
==
cs2
)
cmp_charset
=
cs1
;
else
return
1
;
{
if
(
co1
==
COER_COERCIBLE
)
{
CHARSET_INFO
*
c
=
get_charset_by_csname
(
cs1
->
csname
,
MY_CS_PRIMARY
,
MYF
(
0
));
if
(
c
)
{
cmp_charset
=
c
;
return
0
;
}
else
return
1
;
}
else
return
1
;
}
}
return
0
;
}
...
...
sql/mysql_priv.h
View file @
05adb8da
...
...
@@ -62,7 +62,9 @@ char* query_table_status(THD *thd,const char *db,const char *table_name);
#endif
#endif
#define files_charset_info system_charset_info
extern
CHARSET_INFO
*
system_charset_info
;
extern
CHARSET_INFO
*
files_charset_info
;
extern
CHARSET_INFO
*
national_charset_info
;
/***************************************************************************
Configuration parameters
...
...
sql/sql_string.cc
View file @
05adb8da
...
...
@@ -29,6 +29,9 @@
#endif
CHARSET_INFO
*
system_charset_info
=
&
my_charset_utf8
;
CHARSET_INFO
*
files_charset_info
=
&
my_charset_utf8
;
CHARSET_INFO
*
national_charset_info
=
&
my_charset_utf8
;
extern
gptr
sql_alloc
(
unsigned
size
);
extern
void
sql_element_free
(
void
*
ptr
);
static
uint32
...
...
sql/sql_yacc.yy
View file @
05adb8da
...
...
@@ -1134,10 +1134,10 @@ type:
$$=FIELD_TYPE_STRING; }
| nchar '(' NUM ')' { Lex->length=$3.str;
$$=FIELD_TYPE_STRING;
Lex->charset=
&my_charset_utf8
; }
Lex->charset=
national_charset_info
; }
| nchar { Lex->length=(char*) "1";
$$=FIELD_TYPE_STRING;
Lex->charset=
&my_charset_utf8
; }
Lex->charset=
national_charset_info
; }
| BINARY '(' NUM ')' { Lex->length=$3.str;
Lex->charset=&my_charset_bin;
$$=FIELD_TYPE_STRING; }
...
...
@@ -1145,7 +1145,7 @@ type:
$$=FIELD_TYPE_VAR_STRING; }
| nvarchar '(' NUM ')' { Lex->length=$3.str;
$$=FIELD_TYPE_VAR_STRING;
Lex->charset=
&my_charset_utf8
; }
Lex->charset=
national_charset_info
; }
| VARBINARY '(' NUM ')' { Lex->length=$3.str;
Lex->charset=&my_charset_bin;
$$=FIELD_TYPE_VAR_STRING; }
...
...
@@ -3865,9 +3865,9 @@ text_literal:
$$ = new Item_string($1.str,$1.length,cs);
}
| NCHAR_STRING
{ $$= new Item_string($1.str,$1.length,
&my_charset_utf8
); }
{ $$= new Item_string($1.str,$1.length,
national_charset_info
); }
| UNDERSCORE_CHARSET TEXT_STRING
{ $$ = new Item_string($2.str,$2.length,Lex->charset
,Item::COER_IMPLICIT
); }
{ $$ = new Item_string($2.str,$2.length,Lex->charset); }
| text_literal TEXT_STRING_db
{ ((Item_string*) $1)->append($2.str,$2.length); }
;
...
...
@@ -3913,9 +3913,8 @@ literal:
{
Item *tmp= new Item_varbinary($2.str,$2.length);
String *str= tmp ? tmp->val_str((String*) 0) : (String*) 0;
$$ = new Item_string(str ? str->ptr() : "",
str ? str->length() : 0,
Lex->charset,Item::COER_IMPLICIT);
$$ = new Item_string(str ? str->ptr() : "", str ? str->length() : 0,
Lex->charset);
}
| DATE_SYM text_literal { $$ = $2; }
| TIME_SYM text_literal { $$ = $2; }
...
...
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