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
391b3ec6
Commit
391b3ec6
authored
Mar 07, 2003
by
bar@bar.mysql.r18.ru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
item_func.cc, item_cmpfunc.cc, unireg.cc, table.cc, sql_base.cc:
some default_charset_info were removed
parent
9994e625
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
13 deletions
+12
-13
sql/item_cmpfunc.cc
sql/item_cmpfunc.cc
+5
-5
sql/item_func.cc
sql/item_func.cc
+1
-1
sql/sql_base.cc
sql/sql_base.cc
+2
-3
sql/table.cc
sql/table.cc
+1
-1
sql/unireg.cc
sql/unireg.cc
+3
-3
No files found.
sql/item_cmpfunc.cc
View file @
391b3ec6
...
...
@@ -1114,7 +1114,7 @@ int in_vector::find(Item *item)
in_string
::
in_string
(
uint
elements
,
qsort_cmp
cmp_func
)
:
in_vector
(
elements
,
sizeof
(
String
),
cmp_func
),
tmp
(
buff
,
sizeof
(
buff
),
default_charset_info
)
tmp
(
buff
,
sizeof
(
buff
),
&
my_charset_bin
)
{}
in_string
::~
in_string
()
...
...
@@ -1137,7 +1137,7 @@ void in_string::set(uint pos,Item *item)
{
CHARSET_INFO
*
cs
;
if
(
!
(
cs
=
item
->
charset
()))
cs
=
default_charset_info
;
// Should never happen for STR items
cs
=
&
my_charset_bin
;
// Should never happen for STR items
str
->
set_charset
(
cs
);
}
}
...
...
@@ -1840,7 +1840,7 @@ Item_func_regex::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref)
if
(
!
regex_compiled
&&
args
[
1
]
->
const_item
())
{
char
buff
[
MAX_FIELD_WIDTH
];
String
tmp
(
buff
,
sizeof
(
buff
),
default_charset_info
);
String
tmp
(
buff
,
sizeof
(
buff
),
&
my_charset_bin
);
String
*
res
=
args
[
1
]
->
val_str
(
&
tmp
);
if
(
args
[
1
]
->
null_value
)
{
// Will always return NULL
...
...
@@ -1870,7 +1870,7 @@ Item_func_regex::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref)
longlong
Item_func_regex
::
val_int
()
{
char
buff
[
MAX_FIELD_WIDTH
];
String
*
res
,
tmp
(
buff
,
sizeof
(
buff
),
default_charset_info
);
String
*
res
,
tmp
(
buff
,
sizeof
(
buff
),
&
my_charset_bin
);
res
=
args
[
0
]
->
val_str
(
&
tmp
);
if
(
args
[
0
]
->
null_value
)
...
...
@@ -1881,7 +1881,7 @@ longlong Item_func_regex::val_int()
if
(
!
regex_is_const
)
{
char
buff2
[
MAX_FIELD_WIDTH
];
String
*
res2
,
tmp2
(
buff2
,
sizeof
(
buff2
),
default_charset_info
);
String
*
res2
,
tmp2
(
buff2
,
sizeof
(
buff2
),
&
my_charset_bin
);
res2
=
args
[
1
]
->
val_str
(
&
tmp2
);
if
(
args
[
1
]
->
null_value
)
...
...
sql/item_func.cc
View file @
391b3ec6
...
...
@@ -1545,7 +1545,7 @@ String *udf_handler::val_str(String *str,String *save_str)
str
->
length
(
res_length
);
return
str
;
}
save_str
->
set
(
res
,
res_length
,
default_charset_info
);
save_str
->
set
(
res
,
res_length
,
str
->
charset
()
);
return
save_str
;
}
...
...
sql/sql_base.cc
View file @
391b3ec6
...
...
@@ -2292,8 +2292,7 @@ int mysql_create_index(THD *thd, TABLE_LIST *table_list, List<Key> &keys)
DBUG_ENTER
(
"mysql_create_index"
);
bzero
((
char
*
)
&
create_info
,
sizeof
(
create_info
));
create_info
.
db_type
=
DB_TYPE_DEFAULT
;
/* TODO: Fix to use database character set */
create_info
.
table_charset
=
default_charset_info
;
create_info
.
table_charset
=
thd
->
db_charset
;
DBUG_RETURN
(
mysql_alter_table
(
thd
,
table_list
->
db
,
table_list
->
real_name
,
&
create_info
,
table_list
,
fields
,
keys
,
drop
,
alter
,
0
,
(
ORDER
*
)
0
,
FALSE
,
...
...
@@ -2310,7 +2309,7 @@ int mysql_drop_index(THD *thd, TABLE_LIST *table_list, List<Alter_drop> &drop)
DBUG_ENTER
(
"mysql_drop_index"
);
bzero
((
char
*
)
&
create_info
,
sizeof
(
create_info
));
create_info
.
db_type
=
DB_TYPE_DEFAULT
;
create_info
.
table_charset
=
default_charset_info
;
create_info
.
table_charset
=
thd
->
db_charset
;
DBUG_RETURN
(
mysql_alter_table
(
thd
,
table_list
->
db
,
table_list
->
real_name
,
&
create_info
,
table_list
,
fields
,
keys
,
drop
,
alter
,
0
,
(
ORDER
*
)
0
,
FALSE
,
...
...
sql/table.cc
View file @
391b3ec6
...
...
@@ -1162,7 +1162,7 @@ rename_file_ext(const char * from,const char * to,const char * ext)
char
*
get_field
(
MEM_ROOT
*
mem
,
Field
*
field
)
{
char
buff
[
MAX_FIELD_WIDTH
];
String
str
(
buff
,
sizeof
(
buff
),
default_charset_info
);
String
str
(
buff
,
sizeof
(
buff
),
&
my_charset_bin
);
field
->
val_str
(
&
str
,
&
str
);
uint
length
=
str
.
length
();
if
(
!
length
)
...
...
sql/unireg.cc
View file @
391b3ec6
...
...
@@ -486,7 +486,7 @@ static bool pack_fields(File file,List<create_field> &create_fields)
/* Write intervals */
if
(
int_count
)
{
String
tmp
((
char
*
)
buff
,
sizeof
(
buff
),
default_charset_info
);
String
tmp
((
char
*
)
buff
,
sizeof
(
buff
),
&
my_charset_bin
);
tmp
.
length
(
0
);
it
.
rewind
();
int_count
=
0
;
...
...
@@ -598,9 +598,9 @@ static bool make_empty_rec(File file,enum db_type table_type,
regfield
->
store
((
longlong
)
1
);
}
else
if
(
type
==
Field
::
YES
)
// Old unireg type
regfield
->
store
(
ER
(
ER_YES
),(
uint
)
strlen
(
ER
(
ER_YES
)),
default
_charset_info
);
regfield
->
store
(
ER
(
ER_YES
),(
uint
)
strlen
(
ER
(
ER_YES
)),
system
_charset_info
);
else
if
(
type
==
Field
::
NO
)
// Old unireg type
regfield
->
store
(
ER
(
ER_NO
),
(
uint
)
strlen
(
ER
(
ER_NO
)),
default
_charset_info
);
regfield
->
store
(
ER
(
ER_NO
),
(
uint
)
strlen
(
ER
(
ER_NO
)),
system
_charset_info
);
else
regfield
->
reset
();
delete
regfield
;
...
...
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