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
c9d20d6c
Commit
c9d20d6c
authored
Aug 20, 2010
by
Georgi Kodinov
Browse files
Options
Browse Files
Download
Plain Diff
merge
parents
2aeb1831
97e84715
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
93 additions
and
4 deletions
+93
-4
mysql-test/r/func_gconcat.result
mysql-test/r/func_gconcat.result
+20
-0
mysql-test/r/func_misc.result
mysql-test/r/func_misc.result
+15
-0
mysql-test/suite/rpl/t/rpl_drop.test
mysql-test/suite/rpl/t/rpl_drop.test
+1
-0
mysql-test/t/func_gconcat.test
mysql-test/t/func_gconcat.test
+21
-0
mysql-test/t/func_misc.test
mysql-test/t/func_misc.test
+14
-0
sql/item_func.cc
sql/item_func.cc
+2
-0
sql/item_sum.cc
sql/item_sum.cc
+18
-1
sql/log.h
sql/log.h
+2
-2
sql/table.h
sql/table.h
+0
-1
No files found.
mysql-test/r/func_gconcat.result
View file @
c9d20d6c
...
...
@@ -1003,6 +1003,7 @@ SELECT 1 FROM
1
1
DROP TABLE t1;
End of 5.0 tests
#
# Bug #52397: another crash with explain extended and group_concat
#
...
...
@@ -1019,6 +1020,25 @@ Warnings:
Note 1003 select 1 AS `1` from dual
DROP TABLE t1;
End of 5.0 tests
#
# Bug #54476: crash when group_concat and 'with rollup' in prepared statements
#
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1), (2);
PREPARE stmt FROM "SELECT GROUP_CONCAT(t1.a ORDER BY t1.a) FROM t1 JOIN t1 t2 GROUP BY t1.a WITH ROLLUP";
EXECUTE stmt;
GROUP_CONCAT(t1.a ORDER BY t1.a)
1,1
2,2
1,1,2,2
EXECUTE stmt;
GROUP_CONCAT(t1.a ORDER BY t1.a)
1,1
2,2
1,1,2,2
DEALLOCATE PREPARE stmt;
DROP TABLE t1;
End of 5.1 tests
DROP TABLE IF EXISTS t1, t2;
CREATE TABLE t1 (a VARCHAR(6), b INT);
CREATE TABLE t2 (a VARCHAR(6), b INT);
...
...
mysql-test/r/func_misc.result
View file @
c9d20d6c
...
...
@@ -337,6 +337,21 @@ select connection_id() > 0;
connection_id() > 0
1
#
# Bug #54461: crash with longblob and union or update with subquery
#
CREATE TABLE t1 (a INT, b LONGBLOB);
INSERT INTO t1 VALUES (1, '2'), (2, '3'), (3, '2');
SELECT DISTINCT LEAST(a, (SELECT b FROM t1 LIMIT 1)) FROM t1 UNION SELECT 1;
LEAST(a, (SELECT b FROM t1 LIMIT 1))
1
2
SELECT DISTINCT GREATEST(a, (SELECT b FROM t1 LIMIT 1)) FROM t1 UNION SELECT 1;
GREATEST(a, (SELECT b FROM t1 LIMIT 1))
2
3
1
DROP TABLE t1;
#
# Bug #52165: Assertion failed: file .\dtoa.c, line 465
#
CREATE TABLE t1 (a SET('a'), b INT);
...
...
mysql-test/suite/rpl/t/rpl_drop.test
View file @
c9d20d6c
...
...
@@ -10,3 +10,4 @@ drop table t1, t2;
sync_slave_with_master
;
# End of 4.1 tests
mysql-test/t/func_gconcat.test
View file @
c9d20d6c
...
...
@@ -708,6 +708,7 @@ SELECT 1 FROM
DROP
TABLE
t1
;
--
echo
End
of
5.0
tests
--
echo
#
--
echo
# Bug #52397: another crash with explain extended and group_concat
...
...
@@ -722,6 +723,26 @@ DROP TABLE t1;
--
echo
End
of
5.0
tests
--
echo
#
--
echo
# Bug #54476: crash when group_concat and 'with rollup' in prepared statements
--
echo
#
CREATE
TABLE
t1
(
a
INT
);
INSERT
INTO
t1
VALUES
(
1
),
(
2
);
PREPARE
stmt
FROM
"SELECT GROUP_CONCAT(t1.a ORDER BY t1.a) FROM t1 JOIN t1 t2 GROUP BY t1.a WITH ROLLUP"
;
EXECUTE
stmt
;
EXECUTE
stmt
;
DEALLOCATE
PREPARE
stmt
;
DROP
TABLE
t1
;
--
echo
End
of
5.1
tests
#
# Bug#36785: Wrong error message when group_concat() exceeds max length
#
...
...
mysql-test/t/func_misc.test
View file @
c9d20d6c
...
...
@@ -467,6 +467,19 @@ select NAME_CONST('_id',1234) as id;
select
connection_id
()
>
0
;
--
echo
#
--
echo
# Bug #54461: crash with longblob and union or update with subquery
--
echo
#
CREATE
TABLE
t1
(
a
INT
,
b
LONGBLOB
);
INSERT
INTO
t1
VALUES
(
1
,
'2'
),
(
2
,
'3'
),
(
3
,
'2'
);
SELECT
DISTINCT
LEAST
(
a
,
(
SELECT
b
FROM
t1
LIMIT
1
))
FROM
t1
UNION
SELECT
1
;
SELECT
DISTINCT
GREATEST
(
a
,
(
SELECT
b
FROM
t1
LIMIT
1
))
FROM
t1
UNION
SELECT
1
;
DROP
TABLE
t1
;
--
echo
#
--
echo
# Bug #52165: Assertion failed: file .\dtoa.c, line 465
--
echo
#
...
...
@@ -478,4 +491,5 @@ SELECT COALESCE(a) = COALESCE(b) FROM t1;
DROP
TABLE
t1
;
--
echo
End
of
tests
sql/item_func.cc
View file @
c9d20d6c
...
...
@@ -2531,6 +2531,8 @@ void Item_func_min_max::fix_length_and_dec()
decimals
,
unsigned_flag
));
}
else
if
(
cmp_type
==
REAL_RESULT
)
fix_char_length
(
float_length
(
decimals
));
cached_field_type
=
agg_field_type
(
args
,
arg_count
);
}
...
...
sql/item_sum.cc
View file @
c9d20d6c
...
...
@@ -3059,7 +3059,6 @@ Item_func_group_concat::Item_func_group_concat(THD *thd,
tree
(
item
->
tree
),
unique_filter
(
item
->
unique_filter
),
table
(
item
->
table
),
order
(
item
->
order
),
context
(
item
->
context
),
arg_count_order
(
item
->
arg_count_order
),
arg_count_field
(
item
->
arg_count_field
),
...
...
@@ -3072,6 +3071,24 @@ Item_func_group_concat::Item_func_group_concat(THD *thd,
{
quick_group
=
item
->
quick_group
;
result
.
set_charset
(
collation
.
collation
);
/*
Since the ORDER structures pointed to by the elements of the 'order' array
may be modified in find_order_in_list() called from
Item_func_group_concat::setup(), create a copy of those structures so that
such modifications done in this object would not have any effect on the
object being copied.
*/
ORDER
*
tmp
;
if
(
!
(
order
=
(
ORDER
**
)
thd
->
alloc
(
sizeof
(
ORDER
*
)
*
arg_count_order
+
sizeof
(
ORDER
)
*
arg_count_order
)))
return
;
tmp
=
(
ORDER
*
)(
order
+
arg_count_order
);
for
(
uint
i
=
0
;
i
<
arg_count_order
;
i
++
,
tmp
++
)
{
memcpy
(
tmp
,
item
->
order
[
i
],
sizeof
(
ORDER
));
order
[
i
]
=
tmp
;
}
}
...
...
sql/log.h
View file @
c9d20d6c
...
...
@@ -394,10 +394,10 @@ public:
/* Use this to start writing a new log file */
void
new_file
();
bool
write
(
Log_event
*
event_info
);
bool
write
(
Log_event
*
event_info
);
// binary log write
bool
write
(
THD
*
thd
,
IO_CACHE
*
cache
,
Log_event
*
commit_event
,
bool
incident
);
bool
write_incident
(
THD
*
thd
,
bool
lock
);
bool
write_incident
(
THD
*
thd
,
bool
lock
);
int
write_cache
(
IO_CACHE
*
cache
,
bool
lock_log
,
bool
flush_and_sync
);
void
set_write_error
(
THD
*
thd
);
bool
check_write_error
(
THD
*
thd
);
...
...
sql/table.h
View file @
c9d20d6c
...
...
@@ -205,7 +205,6 @@ typedef struct st_order {
struct
st_order
*
next
;
Item
**
item
;
/* Point at item in select fields */
Item
*
item_ptr
;
/* Storage for initial item */
Item
**
item_copy
;
/* For SPs; the original item ptr */
int
counter
;
/* position in SELECT list, correct
only if counter_used is true*/
bool
asc
;
/* true if ascending */
...
...
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