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
f641a919
Commit
f641a919
authored
Feb 28, 2006
by
evgen@sunlight.local
Browse files
Options
Browse Files
Download
Plain Diff
Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0
into sunlight.local:/work_local/14169-bug-5.0-mysql
parents
916f763b
0ce39664
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
0 deletions
+42
-0
sql/item_sum.h
sql/item_sum.h
+7
-0
tests/mysql_client_test.c
tests/mysql_client_test.c
+35
-0
No files found.
sql/item_sum.h
View file @
f641a919
...
...
@@ -1116,6 +1116,13 @@ public:
enum
Sumfunctype
sum_func
()
const
{
return
GROUP_CONCAT_FUNC
;}
const
char
*
func_name
()
const
{
return
"group_concat"
;
}
virtual
Item_result
result_type
()
const
{
return
STRING_RESULT
;
}
enum_field_types
field_type
()
const
{
if
(
max_length
/
collation
.
collation
->
mbmaxlen
>
CONVERT_IF_BIGGER_TO_BLOB
)
return
FIELD_TYPE_BLOB
;
else
return
MYSQL_TYPE_VARCHAR
;
}
void
clear
();
bool
add
();
void
reset_field
()
{
DBUG_ASSERT
(
0
);
}
// not used
...
...
tests/mysql_client_test.c
View file @
f641a919
...
...
@@ -14841,6 +14841,40 @@ static void test_bug15613()
}
/*
Bug#14169: type of group_concat() result changed to blob if tmp_table was used
*/
static
void
test_bug14169
()
{
MYSQL_STMT
*
stmt
;
const
char
*
stmt_text
;
MYSQL_RES
*
res
;
MYSQL_FIELD
*
field
;
int
rc
;
myheader
(
"test_bug14169"
);
rc
=
mysql_query
(
mysql
,
"drop table if exists t1"
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"set session group_concat_max_len=1024"
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"create table t1 (f1 int unsigned, f2 varchar(255))"
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"insert into t1 values (1,repeat('a',255)),"
"(2,repeat('b',255))"
);
myquery
(
rc
);
stmt
=
mysql_stmt_init
(
mysql
);
stmt_text
=
"select f2,group_concat(f1) from t1 group by f2"
;
rc
=
mysql_stmt_prepare
(
stmt
,
stmt_text
,
strlen
(
stmt_text
));
myquery
(
rc
);
res
=
mysql_stmt_result_metadata
(
stmt
);
field
=
mysql_fetch_fields
(
res
);
if
(
!
opt_silent
)
printf
(
"GROUP_CONCAT() result type %i"
,
field
[
1
].
type
);
DIE_UNLESS
(
field
[
1
].
type
==
MYSQL_TYPE_BLOB
);
rc
=
mysql_query
(
mysql
,
"drop table t1"
);
myquery
(
rc
);
}
/*
Read and parse arguments and MySQL options from my.cnf
*/
...
...
@@ -15105,6 +15139,7 @@ static struct my_tests_st my_tests[]= {
{
"test_bug16143"
,
test_bug16143
},
{
"test_bug16144"
,
test_bug16144
},
{
"test_bug15613"
,
test_bug15613
},
{
"test_bug14169"
,
test_bug14169
},
{
0
,
0
}
};
...
...
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