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
e55b1424
Commit
e55b1424
authored
Mar 19, 2009
by
Sergey Glukhov
Browse files
Options
Browse Files
Download
Plain Diff
5.0-bugteam->5.1-bugteam merge
parents
59cc9819
a910db2b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
52 additions
and
2 deletions
+52
-2
client/mysql.cc
client/mysql.cc
+1
-1
mysql-test/r/ctype_collate.result
mysql-test/r/ctype_collate.result
+19
-0
mysql-test/t/ctype_collate.test
mysql-test/t/ctype_collate.test
+14
-0
sql/item.cc
sql/item.cc
+18
-1
No files found.
client/mysql.cc
View file @
e55b1424
...
...
@@ -1200,7 +1200,7 @@ int main(int argc,char *argv[])
#endif
sprintf
(
buff
,
"%s"
,
#ifndef NOT_YET
"Type 'help;' or '
\\
h' for help. Type '
\\
c' to clear the
buffer
.
\n
"
);
"Type 'help;' or '
\\
h' for help. Type '
\\
c' to clear the
current input statement
.
\n
"
);
#else
"Type 'help [[%]function name[%]]' to get help on usage of function.
\n
"
);
#endif
...
...
mysql-test/r/ctype_collate.result
View file @
e55b1424
...
...
@@ -611,3 +611,22 @@ check table t1 extended;
Table Op Msg_type Msg_text
test.t1 check status OK
drop table t1;
select least(_latin1'a',_latin2'b',_latin5'c' collate latin5_turkish_ci);
least(_latin1'a',_latin2'b',_latin5'c' collate latin5_turkish_ci)
a
create table t1
select least(_latin1'a',_latin2'b',_latin5'c' collate latin5_turkish_ci) as f1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`f1` varchar(1) CHARACTER SET latin5 NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select case _latin1'a' when _latin2'b' then 1 when _latin5'c' collate
latin5_turkish_ci then 2 else 3 end;
case _latin1'a' when _latin2'b' then 1 when _latin5'c' collate
latin5_turkish_ci then 2 else 3 end
3
select concat(_latin1'a',_latin2'b',_latin5'c' collate latin5_turkish_ci);
concat(_latin1'a',_latin2'b',_latin5'c' collate latin5_turkish_ci)
abc
mysql-test/t/ctype_collate.test
View file @
e55b1424
...
...
@@ -229,3 +229,17 @@ insert into t1 set a=0x6c;
insert
into
t1
set
a
=
0x4c98
;
check
table
t1
extended
;
drop
table
t1
;
#
# Bug#41627 Illegal mix of collations in LEAST / GREATEST / CASE
#
select
least
(
_latin1
'a'
,
_latin2
'b'
,
_latin5
'c'
collate
latin5_turkish_ci
);
create
table
t1
select
least
(
_latin1
'a'
,
_latin2
'b'
,
_latin5
'c'
collate
latin5_turkish_ci
)
as
f1
;
show
create
table
t1
;
drop
table
t1
;
select
case
_latin1
'a'
when
_latin2
'b'
then
1
when
_latin5
'c'
collate
latin5_turkish_ci
then
2
else
3
end
;
select
concat
(
_latin1
'a'
,
_latin2
'b'
,
_latin5
'c'
collate
latin5_turkish_ci
);
sql/item.cc
View file @
e55b1424
...
...
@@ -1531,7 +1531,8 @@ bool DTCollation::aggregate(DTCollation &dt, uint flags)
else
{
// Cannot apply conversion
set
(
0
,
DERIVATION_NONE
,
0
);
set
(
&
my_charset_bin
,
DERIVATION_NONE
,
(
dt
.
repertoire
|
repertoire
));
return
1
;
}
}
...
...
@@ -1614,15 +1615,31 @@ bool agg_item_collations(DTCollation &c, const char *fname,
{
uint
i
;
Item
**
arg
;
bool
unknown_cs
=
0
;
c
.
set
(
av
[
0
]
->
collation
);
for
(
i
=
1
,
arg
=
&
av
[
item_sep
];
i
<
count
;
i
++
,
arg
++
)
{
if
(
c
.
aggregate
((
*
arg
)
->
collation
,
flags
))
{
if
(
c
.
derivation
==
DERIVATION_NONE
&&
c
.
collation
==
&
my_charset_bin
)
{
unknown_cs
=
1
;
continue
;
}
my_coll_agg_error
(
av
,
count
,
fname
,
item_sep
);
return
TRUE
;
}
}
if
(
unknown_cs
&&
c
.
derivation
!=
DERIVATION_EXPLICIT
)
{
my_coll_agg_error
(
av
,
count
,
fname
,
item_sep
);
return
TRUE
;
}
if
((
flags
&
MY_COLL_DISALLOW_NONE
)
&&
c
.
derivation
==
DERIVATION_NONE
)
{
...
...
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