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
ad91c3b7
Commit
ad91c3b7
authored
Sep 13, 2002
by
bar@bar.mysql.r18.ru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed that:
SELECT * FROM t WHERE (c COLLATE latin1) >'a' might fail in some cases
parent
d5d10b0d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
7 deletions
+6
-7
sql/item_strfunc.cc
sql/item_strfunc.cc
+5
-3
sql/item_strfunc.h
sql/item_strfunc.h
+1
-4
No files found.
sql/item_strfunc.cc
View file @
ad91c3b7
...
...
@@ -1943,7 +1943,8 @@ void Item_func_conv_charset3::fix_length_and_dec()
String
*
Item_func_set_collation
::
val_str
(
String
*
str
)
{
str
=
args
[
0
]
->
val_str
(
str
);
null_value
=
args
[
0
]
->
null_value
;
if
((
null_value
=
args
[
0
]
->
null_value
))
return
0
;
str
->
set_charset
(
set_collation
);
return
str
;
}
...
...
@@ -1961,8 +1962,10 @@ bool Item_func_set_collation::fix_fields(THD *thd,struct st_table_list *tables,
return
1
;
maybe_null
=
args
[
0
]
->
maybe_null
;
binary
=
args
[
0
]
->
binary
;
const_item_cache
=
args
[
0
]
->
const_item
();
str_value
.
set_charset
(
set_collation
);
with_sum_func
=
with_sum_func
||
args
[
0
]
->
with_sum_func
;
used_tables_cache
=
args
[
0
]
->
used_tables
();
const_item_cache
=
args
[
0
]
->
const_item
();
fix_length_and_dec
();
return
0
;
}
...
...
@@ -1987,7 +1990,6 @@ bool Item_func_set_collation::eq(const Item *item, bool binary_cmp) const
return
1
;
}
String
*
Item_func_charset
::
val_str
(
String
*
str
)
{
String
*
res
=
args
[
0
]
->
val_str
(
str
);
...
...
sql/item_strfunc.h
View file @
ad91c3b7
...
...
@@ -504,10 +504,7 @@ class Item_func_set_collation :public Item_str_func
bool
fix_fields
(
THD
*
thd
,
struct
st_table_list
*
tables
,
Item
**
ref
);
String
*
val_str
(
String
*
);
void
fix_length_and_dec
()
{
max_length
=
args
[
0
]
->
max_length
;
str_value
.
set_charset
(
set_collation
);
}
{
max_length
=
args
[
0
]
->
max_length
;
}
bool
eq
(
const
Item
*
item
,
bool
binary_cmp
)
const
;
const
char
*
func_name
()
const
{
return
"set_collation"
;
}
};
...
...
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