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
71082fd1
Commit
71082fd1
authored
Nov 01, 2010
by
Gleb Shchepa
Browse files
Options
Browse Files
Download
Plain Diff
manual merge 5.1-bugteam --> 5.5-bugteam (bug 52160)
parents
c4a41198
20d70497
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
55 additions
and
5 deletions
+55
-5
mysql-test/r/ctype_binary.result
mysql-test/r/ctype_binary.result
+1
-1
mysql-test/r/ctype_cp1251.result
mysql-test/r/ctype_cp1251.result
+1
-1
mysql-test/r/ctype_latin1.result
mysql-test/r/ctype_latin1.result
+1
-1
mysql-test/r/ctype_ucs.result
mysql-test/r/ctype_ucs.result
+1
-1
mysql-test/r/ctype_utf8.result
mysql-test/r/ctype_utf8.result
+1
-1
mysql-test/r/func_time.result
mysql-test/r/func_time.result
+14
-0
mysql-test/r/type_blob.result
mysql-test/r/type_blob.result
+10
-0
mysql-test/t/func_time.test
mysql-test/t/func_time.test
+10
-0
mysql-test/t/type_blob.test
mysql-test/t/type_blob.test
+13
-0
sql/item_timefunc.h
sql/item_timefunc.h
+1
-0
sql/sql_select.cc
sql/sql_select.cc
+2
-0
No files found.
mysql-test/r/ctype_binary.result
View file @
71082fd1
...
...
@@ -1425,7 +1425,7 @@ create table t1 as select concat(time_to_sec('10:11:12')) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varbinary(10)
NOT NULL DEFAULT ''
`c1` varbinary(10)
DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(extract(year from 20090702)));
...
...
mysql-test/r/ctype_cp1251.result
View file @
71082fd1
...
...
@@ -1507,7 +1507,7 @@ create table t1 as select concat(time_to_sec('10:11:12')) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varchar(10) CHARACTER SET cp1251
NOT NULL DEFAULT ''
`c1` varchar(10) CHARACTER SET cp1251
DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(extract(year from 20090702)));
...
...
mysql-test/r/ctype_latin1.result
View file @
71082fd1
...
...
@@ -1835,7 +1835,7 @@ create table t1 as select concat(time_to_sec('10:11:12')) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varchar(10)
NOT NULL DEFAULT ''
`c1` varchar(10)
DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(extract(year from 20090702)));
...
...
mysql-test/r/ctype_ucs.result
View file @
71082fd1
...
...
@@ -2667,7 +2667,7 @@ create table t1 as select concat(time_to_sec('10:11:12')) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varchar(10) CHARACTER SET ucs2
NOT NULL DEFAULT ''
`c1` varchar(10) CHARACTER SET ucs2
DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(extract(year from 20090702)));
...
...
mysql-test/r/ctype_utf8.result
View file @
71082fd1
...
...
@@ -3511,7 +3511,7 @@ create table t1 as select concat(time_to_sec('10:11:12')) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varchar(10) CHARACTER SET utf8
NOT NULL DEFAULT ''
`c1` varchar(10) CHARACTER SET utf8
DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(extract(year from 20090702)));
...
...
mysql-test/r/func_time.result
View file @
71082fd1
...
...
@@ -1315,6 +1315,20 @@ SELECT 1 FROM t1 ORDER BY @x:=makedate(a,a);
1
1
DROP TABLE t1;
#
# Bug #52160: crash and inconsistent results when grouping
# by a function and column
#
CREATE TABLE t1(a CHAR(10) NOT NULL);
INSERT INTO t1 VALUES (''),('');
SELECT COUNT(*) FROM t1 GROUP BY TIME_TO_SEC(a);
COUNT(*)
2
Warnings:
Warning 1292 Truncated incorrect time value: ''
Warning 1292 Truncated incorrect time value: ''
Warning 1292 Truncated incorrect time value: ''
DROP TABLE t1;
End of 5.1 tests
#
# Bug#57039: constant subtime expression returns incorrect result.
...
...
mysql-test/r/type_blob.result
View file @
71082fd1
...
...
@@ -975,4 +975,14 @@ SELECT LENGTH(c) FROM t2;
LENGTH(c)
65535
DROP TABLE t1, t2;
# Bug #52160: crash and inconsistent results when grouping
# by a function and column
CREATE FUNCTION f1() RETURNS TINYBLOB RETURN 1;
CREATE TABLE t1(a CHAR(1));
INSERT INTO t1 VALUES ('0'), ('0');
SELECT COUNT(*) FROM t1 GROUP BY f1(), a;
COUNT(*)
2
DROP FUNCTION f1;
DROP TABLE t1;
End of 5.1 tests
mysql-test/t/func_time.test
View file @
71082fd1
...
...
@@ -832,6 +832,16 @@ INSERT INTO t1 VALUES (0),(9.216e-096);
SELECT
1
FROM
t1
ORDER
BY
@
x
:=
makedate
(
a
,
a
);
DROP
TABLE
t1
;
--
echo
#
--
echo
# Bug #52160: crash and inconsistent results when grouping
--
echo
# by a function and column
--
echo
#
CREATE
TABLE
t1
(
a
CHAR
(
10
)
NOT
NULL
);
INSERT
INTO
t1
VALUES
(
''
),(
''
);
SELECT
COUNT
(
*
)
FROM
t1
GROUP
BY
TIME_TO_SEC
(
a
);
DROP
TABLE
t1
;
--
echo
End
of
5.1
tests
--
echo
#
...
...
mysql-test/t/type_blob.test
View file @
71082fd1
...
...
@@ -617,4 +617,17 @@ SELECT LENGTH(c) FROM t2;
DROP
TABLE
t1
,
t2
;
--
echo
# Bug #52160: crash and inconsistent results when grouping
--
echo
# by a function and column
CREATE
FUNCTION
f1
()
RETURNS
TINYBLOB
RETURN
1
;
CREATE
TABLE
t1
(
a
CHAR
(
1
));
INSERT
INTO
t1
VALUES
(
'0'
),
(
'0'
);
SELECT
COUNT
(
*
)
FROM
t1
GROUP
BY
f1
(),
a
;
DROP
FUNCTION
f1
;
DROP
TABLE
t1
;
--
echo
End
of
5.1
tests
sql/item_timefunc.h
View file @
71082fd1
...
...
@@ -361,6 +361,7 @@ public:
const
char
*
func_name
()
const
{
return
"time_to_sec"
;
}
void
fix_length_and_dec
()
{
maybe_null
=
TRUE
;
decimals
=
0
;
max_length
=
10
*
MY_CHARSET_BIN_MB_MAXLEN
;
}
...
...
sql/sql_select.cc
View file @
71082fd1
...
...
@@ -15218,6 +15218,8 @@ calc_group_buffer(JOIN *join,ORDER *group)
{
key_length
+=
8
;
}
else
if
(
type
==
MYSQL_TYPE_BLOB
)
key_length
+=
MAX_BLOB_WIDTH
;
// Can't be used as a key
else
{
/*
...
...
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