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
c36857ba
Commit
c36857ba
authored
Aug 30, 2011
by
Bjorn Munch
Browse files
Options
Browse Files
Download
Plain Diff
new merge from 5.5
parents
6b6c53c3
2aa6466f
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
54 additions
and
4 deletions
+54
-4
mysql-test/r/group_by.result
mysql-test/r/group_by.result
+32
-0
mysql-test/t/group_by.test
mysql-test/t/group_by.test
+14
-0
mysql-test/valgrind.supp
mysql-test/valgrind.supp
+5
-2
sql/filesort.cc
sql/filesort.cc
+3
-2
No files found.
mysql-test/r/group_by.result
View file @
c36857ba
...
@@ -1892,6 +1892,38 @@ a AVG(t1.b) t11c t12c
...
@@ -1892,6 +1892,38 @@ a AVG(t1.b) t11c t12c
1 4.0000 6 6
1 4.0000 6 6
2 2.0000 7 7
2 2.0000 7 7
DROP TABLE t1;
DROP TABLE t1;
#
# Bug#11765254 (58200): Assertion failed: param.sort_length when grouping
# by functions
#
SET SQL_BIG_TABLES=1;
CREATE TABLE t1(a INT);
INSERT INTO t1 VALUES (0),(0);
SELECT 1 FROM t1 GROUP BY IF(`a`,'','');
1
1
SELECT 1 FROM t1 GROUP BY TRIM(LEADING RAND() FROM '');
1
1
SELECT 1 FROM t1 GROUP BY SUBSTRING('',SLEEP(0),'');
1
1
Warnings:
Warning 1292 Truncated incorrect INTEGER value: ''
Warning 1292 Truncated incorrect INTEGER value: ''
Warning 1292 Truncated incorrect INTEGER value: ''
SELECT 1 FROM t1 GROUP BY SUBSTRING(SYSDATE() FROM 'K' FOR 'jxW<');
1
1
Warnings:
Warning 1292 Truncated incorrect INTEGER value: 'K'
Warning 1292 Truncated incorrect INTEGER value: 'jxW<'
Warning 1292 Truncated incorrect INTEGER value: 'K'
Warning 1292 Truncated incorrect INTEGER value: 'jxW<'
Warning 1292 Truncated incorrect INTEGER value: 'K'
Warning 1292 Truncated incorrect INTEGER value: 'jxW<'
DROP TABLE t1;
SET SQL_BIG_TABLES=0;
# End of 5.1 tests
# End of 5.1 tests
#
#
# Bug#49771: Incorrect MIN (date) when minimum value is 0000-00-00
# Bug#49771: Incorrect MIN (date) when minimum value is 0000-00-00
...
...
mysql-test/t/group_by.test
View file @
c36857ba
...
@@ -1284,6 +1284,20 @@ FROM t1 GROUP BY a;
...
@@ -1284,6 +1284,20 @@ FROM t1 GROUP BY a;
DROP
TABLE
t1
;
DROP
TABLE
t1
;
--
echo
#
--
echo
# Bug#11765254 (58200): Assertion failed: param.sort_length when grouping
--
echo
# by functions
--
echo
#
SET
SQL_BIG_TABLES
=
1
;
CREATE
TABLE
t1
(
a
INT
);
INSERT
INTO
t1
VALUES
(
0
),(
0
);
SELECT
1
FROM
t1
GROUP
BY
IF
(
`a`
,
''
,
''
);
SELECT
1
FROM
t1
GROUP
BY
TRIM
(
LEADING
RAND
()
FROM
''
);
SELECT
1
FROM
t1
GROUP
BY
SUBSTRING
(
''
,
SLEEP
(
0
),
''
);
SELECT
1
FROM
t1
GROUP
BY
SUBSTRING
(
SYSDATE
()
FROM
'K'
FOR
'jxW<'
);
DROP
TABLE
t1
;
SET
SQL_BIG_TABLES
=
0
;
--
echo
# End of 5.1 tests
--
echo
# End of 5.1 tests
...
...
mysql-test/valgrind.supp
View file @
c36857ba
...
@@ -877,6 +877,9 @@
...
@@ -877,6 +877,9 @@
fun:buf_buddy_free
fun:buf_buddy_free
}
}
# Note the wildcard in the (mangled) function signatures of
# write_keys() and find_all_keys().
# They both return ha_rows, which is platform dependent.
{
{
Bug#12856915 VALGRIND FAILURE IN FILESORT/CREATE_SORT_INDEX / one
Bug#12856915 VALGRIND FAILURE IN FILESORT/CREATE_SORT_INDEX / one
Memcheck:Param
Memcheck:Param
...
@@ -886,8 +889,8 @@
...
@@ -886,8 +889,8 @@
fun:inline_mysql_file_write
fun:inline_mysql_file_write
fun:my_b_flush_io_cache
fun:my_b_flush_io_cache
fun:_my_b_write
fun:_my_b_write
fun:_Z
L
10write_keysP13st_sort_paramPPhjP11st_io_cacheS4_
fun:_Z
*
10write_keysP13st_sort_paramPPhjP11st_io_cacheS4_
fun:_Z
L
13find_all_keysP13st_sort_paramP10SQL_SELECTPPhP11st_io_cacheS6_S6_
fun:_Z
*
13find_all_keysP13st_sort_paramP10SQL_SELECTPPhP11st_io_cacheS6_S6_
fun:_Z8filesortP3THDP5TABLEP13st_sort_fieldjP10SQL_SELECTybPy
fun:_Z8filesortP3THDP5TABLEP13st_sort_fieldjP10SQL_SELECTybPy
}
}
...
...
sql/filesort.cc
View file @
c36857ba
...
@@ -147,8 +147,6 @@ ha_rows filesort(THD *thd, TABLE *table, SORT_FIELD *sortorder, uint s_length,
...
@@ -147,8 +147,6 @@ ha_rows filesort(THD *thd, TABLE *table, SORT_FIELD *sortorder, uint s_length,
error
=
1
;
error
=
1
;
bzero
((
char
*
)
&
param
,
sizeof
(
param
));
bzero
((
char
*
)
&
param
,
sizeof
(
param
));
param
.
sort_length
=
sortlength
(
thd
,
sortorder
,
s_length
,
&
multi_byte_charset
);
param
.
sort_length
=
sortlength
(
thd
,
sortorder
,
s_length
,
&
multi_byte_charset
);
/* filesort cannot handle zero-length records. */
DBUG_ASSERT
(
param
.
sort_length
);
param
.
ref_length
=
table
->
file
->
ref_length
;
param
.
ref_length
=
table
->
file
->
ref_length
;
param
.
addon_field
=
0
;
param
.
addon_field
=
0
;
param
.
addon_length
=
0
;
param
.
addon_length
=
0
;
...
@@ -260,6 +258,9 @@ ha_rows filesort(THD *thd, TABLE *table, SORT_FIELD *sortorder, uint s_length,
...
@@ -260,6 +258,9 @@ ha_rows filesort(THD *thd, TABLE *table, SORT_FIELD *sortorder, uint s_length,
}
}
else
else
{
{
/* filesort cannot handle zero-length records during merge. */
DBUG_ASSERT
(
param
.
sort_length
!=
0
);
if
(
table_sort
.
buffpek
&&
table_sort
.
buffpek_len
<
maxbuffer
)
if
(
table_sort
.
buffpek
&&
table_sort
.
buffpek_len
<
maxbuffer
)
{
{
my_free
(
table_sort
.
buffpek
);
my_free
(
table_sort
.
buffpek
);
...
...
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