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
66093b79
Commit
66093b79
authored
Jun 22, 2007
by
bar@bar.myoffice.izhnet.ru
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/home/bar/mysql-work/mysql-5.0.b28925
into mysql.com:/home/bar/mysql-work/mysql-5.1-new-rpl
parents
ad065829
3046e8f7
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
82 additions
and
2 deletions
+82
-2
mysql-test/r/ctype_ucs.result
mysql-test/r/ctype_ucs.result
+21
-0
mysql-test/r/ctype_ucs2_def.result
mysql-test/r/ctype_ucs2_def.result
+7
-0
mysql-test/t/ctype_ucs.test
mysql-test/t/ctype_ucs.test
+18
-0
mysql-test/t/ctype_ucs2_def.test
mysql-test/t/ctype_ucs2_def.test
+10
-0
sql/item_sum.cc
sql/item_sum.cc
+21
-0
sql/sql_yacc.yy
sql/sql_yacc.yy
+5
-2
No files found.
mysql-test/r/ctype_ucs.result
View file @
66093b79
...
...
@@ -865,4 +865,25 @@ blob 65535 65535
text 65535 65535
text 65535 32767
drop table t1;
create table t1 (a char(1) character set ucs2);
insert into t1 values ('a'),('b'),('c');
select hex(group_concat(a)) from t1;
hex(group_concat(a))
0061002C0062002C0063
select collation(group_concat(a)) from t1;
collation(group_concat(a))
ucs2_general_ci
drop table t1;
set names latin1;
create table t1 (a char(1) character set latin1);
insert into t1 values ('a'),('b'),('c');
set character_set_connection=ucs2;
select hex(group_concat(a separator ',')) from t1;
hex(group_concat(a separator ','))
612C622C63
select collation(group_concat(a separator ',')) from t1;
collation(group_concat(a separator ','))
latin1_swedish_ci
drop table t1;
set names latin1;
End of 5.0 tests
mysql-test/r/ctype_ucs2_def.result
View file @
66093b79
...
...
@@ -7,6 +7,13 @@ character_set_server ucs2
DROP TABLE IF EXISTS t1;
create table t1 (a int);
drop table t1;
End of 4.1 tests
create table t1 (a char(1) character set latin1);
insert into t1 values ('a'),('b'),('c');
select hex(group_concat(a)) from t1;
hex(group_concat(a))
612C622C63
drop table t1;
CREATE TABLE t1(col1 VARCHAR(32) CHARACTER SET ucs2 COLLATE ucs2_bin NOT NULL,
col2 VARCHAR(32) CHARACTER SET ucs2 COLLATE ucs2_bin NOT NULL,
UNIQUE KEY key1 USING HASH (col1, col2)) ENGINE=MEMORY;
...
...
mysql-test/t/ctype_ucs.test
View file @
66093b79
...
...
@@ -594,4 +594,22 @@ select data_type, character_octet_length, character_maximum_length
from
information_schema
.
columns
where
table_name
=
't1'
;
drop
table
t1
;
#
# Bug#28925 GROUP_CONCAT inserts wrong separators for a ucs2 column
#
create
table
t1
(
a
char
(
1
)
character
set
ucs2
);
insert
into
t1
values
(
'a'
),(
'b'
),(
'c'
);
select
hex
(
group_concat
(
a
))
from
t1
;
select
collation
(
group_concat
(
a
))
from
t1
;
drop
table
t1
;
set
names
latin1
;
create
table
t1
(
a
char
(
1
)
character
set
latin1
);
insert
into
t1
values
(
'a'
),(
'b'
),(
'c'
);
set
character_set_connection
=
ucs2
;
select
hex
(
group_concat
(
a
separator
','
))
from
t1
;
select
collation
(
group_concat
(
a
separator
','
))
from
t1
;
drop
table
t1
;
set
names
latin1
;
--
echo
End
of
5.0
tests
mysql-test/t/ctype_ucs2_def.test
View file @
66093b79
...
...
@@ -15,6 +15,16 @@ DROP TABLE IF EXISTS t1;
create
table
t1
(
a
int
);
drop
table
t1
;
--
echo
End
of
4.1
tests
#
# Bug #28925 GROUP_CONCAT inserts wrong separators for a ucs2 column
# Check that GROUP_CONCAT works fine with --default-character-set=ucs2
#
create
table
t1
(
a
char
(
1
)
character
set
latin1
);
insert
into
t1
values
(
'a'
),(
'b'
),(
'c'
);
select
hex
(
group_concat
(
a
))
from
t1
;
drop
table
t1
;
#
# Bug #27643: query failed : 1114 (The table '' is full)
#
...
...
sql/item_sum.cc
View file @
66093b79
...
...
@@ -3230,6 +3230,27 @@ Item_func_group_concat::fix_fields(THD *thd, Item **ref)
null_value
=
1
;
max_length
=
thd
->
variables
.
group_concat_max_len
;
uint32
offset
;
if
(
separator
->
needs_conversion
(
separator
->
length
(),
separator
->
charset
(),
collation
.
collation
,
&
offset
))
{
uint32
buflen
=
collation
.
collation
->
mbmaxlen
*
separator
->
length
();
uint
errors
,
conv_length
;
char
*
buf
;
String
*
new_separator
;
if
(
!
(
buf
=
thd
->
stmt_arena
->
alloc
(
buflen
))
||
!
(
new_separator
=
new
(
thd
->
stmt_arena
->
mem_root
)
String
(
buf
,
buflen
,
collation
.
collation
)))
return
TRUE
;
conv_length
=
copy_and_convert
(
buf
,
buflen
,
collation
.
collation
,
separator
->
ptr
(),
separator
->
length
(),
separator
->
charset
(),
&
errors
);
new_separator
->
length
(
conv_length
);
separator
=
new_separator
;
}
if
(
check_sum_func
(
thd
,
ref
))
return
TRUE
;
...
...
sql/sql_yacc.yy
View file @
66093b79
...
...
@@ -7112,8 +7112,11 @@ opt_distinct:
|DISTINCT { $$ = 1; };
opt_gconcat_separator:
/* empty */ { $$ = new (YYTHD->mem_root) String(",",1,default_charset_info); }
|SEPARATOR_SYM text_string { $$ = $2; };
/* empty */
{
$$= new (YYTHD->mem_root) String(",", 1, &my_charset_latin1);
}
| SEPARATOR_SYM text_string { $$ = $2; };
opt_gorder_clause:
...
...
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