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
fa3fb2f6
Commit
fa3fb2f6
authored
Feb 29, 2008
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.1-opt
into mysql.com:/home/gluh/MySQL/Merge/5.1-opt
parents
88cb8bba
ee51eeb6
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
165 additions
and
1 deletion
+165
-1
mysql-test/r/func_gconcat.result
mysql-test/r/func_gconcat.result
+15
-0
mysql-test/r/row.result
mysql-test/r/row.result
+9
-0
mysql-test/r/subselect.result
mysql-test/r/subselect.result
+35
-0
mysql-test/t/func_gconcat.test
mysql-test/t/func_gconcat.test
+17
-0
mysql-test/t/row.test
mysql-test/t/row.test
+13
-0
mysql-test/t/subselect.test
mysql-test/t/subselect.test
+46
-0
sql/item.h
sql/item.h
+29
-0
sql/item_sum.cc
sql/item_sum.cc
+1
-1
No files found.
mysql-test/r/func_gconcat.result
View file @
fa3fb2f6
...
@@ -937,4 +937,19 @@ SELECT GROUP_CONCAT(DISTINCT b, a ORDER BY b) FROM t1;
...
@@ -937,4 +937,19 @@ SELECT GROUP_CONCAT(DISTINCT b, a ORDER BY b) FROM t1;
GROUP_CONCAT(DISTINCT b, a ORDER BY b)
GROUP_CONCAT(DISTINCT b, a ORDER BY b)
11,22,32
11,22,32
DROP TABLE t1, t2, t3;
DROP TABLE t1, t2, t3;
CREATE TABLE t1(a INT);
INSERT INTO t1 VALUES (),();
SELECT s1.d1 FROM
(
SELECT
t1.a as d1,
GROUP_CONCAT(DISTINCT t1.a) AS d2
FROM
t1 AS t1,
t1 AS t2
GROUP BY 1
) AS s1;
d1
NULL
DROP TABLE t1;
End of 5.0 tests
End of 5.0 tests
mysql-test/r/row.result
View file @
fa3fb2f6
...
@@ -434,3 +434,12 @@ SELECT @x;
...
@@ -434,3 +434,12 @@ SELECT @x;
@x
@x
99
99
DROP TABLE t1;
DROP TABLE t1;
CREATE TABLE t1 (a INT, b INT);
INSERT INTO t1 VALUES (1,1);
SELECT ROW(a, 1) IN (SELECT SUM(b), 1) FROM t1 GROUP BY a;
ROW(a, 1) IN (SELECT SUM(b), 1)
1
SELECT ROW(a, 1) IN (SELECT SUM(b), 3) FROM t1 GROUP BY a;
ROW(a, 1) IN (SELECT SUM(b), 3)
0
DROP TABLE t1;
mysql-test/r/subselect.result
View file @
fa3fb2f6
...
@@ -4155,6 +4155,41 @@ SELECT ((a1,a2) IN (SELECT * FROM t2 WHERE b2 > 0)) IS NULL FROM t1;
...
@@ -4155,6 +4155,41 @@ SELECT ((a1,a2) IN (SELECT * FROM t2 WHERE b2 > 0)) IS NULL FROM t1;
0
0
0
0
DROP TABLE t1, t2;
DROP TABLE t1, t2;
create table t1(a int,b int,key(a),key(b));
insert into t1(a,b) values (1,2),(2,1),(2,3),(3,4),(5,4),(5,5),
(6,7),(7,4),(5,3);
5
4
3
2
1
26
25
24
23
22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
drop table t1;
CREATE TABLE t1 (s1 BINARY(5), s2 VARBINARY(5));
CREATE TABLE t1 (s1 BINARY(5), s2 VARBINARY(5));
INSERT INTO t1 VALUES (0x41,0x41), (0x42,0x42), (0x43,0x43);
INSERT INTO t1 VALUES (0x41,0x41), (0x42,0x42), (0x43,0x43);
SELECT s1, s2 FROM t1 WHERE s2 IN (SELECT s1 FROM t1);
SELECT s1, s2 FROM t1 WHERE s2 IN (SELECT s1 FROM t1);
...
...
mysql-test/t/func_gconcat.test
View file @
fa3fb2f6
...
@@ -640,4 +640,21 @@ SELECT GROUP_CONCAT(DISTINCT b, a ORDER BY b) FROM t1;
...
@@ -640,4 +640,21 @@ SELECT GROUP_CONCAT(DISTINCT b, a ORDER BY b) FROM t1;
DROP
TABLE
t1
,
t2
,
t3
;
DROP
TABLE
t1
,
t2
,
t3
;
#
# Bug #34747: crash in debug assertion check after derived table
#
CREATE
TABLE
t1
(
a
INT
);
INSERT
INTO
t1
VALUES
(),();
SELECT
s1
.
d1
FROM
(
SELECT
t1
.
a
as
d1
,
GROUP_CONCAT
(
DISTINCT
t1
.
a
)
AS
d2
FROM
t1
AS
t1
,
t1
AS
t2
GROUP
BY
1
)
AS
s1
;
DROP
TABLE
t1
;
--
echo
End
of
5.0
tests
--
echo
End
of
5.0
tests
mysql-test/t/row.test
View file @
fa3fb2f6
...
@@ -224,3 +224,16 @@ SET @x:= (SELECT h FROM t1 WHERE (a,b,c,d,e,f,g)=(1,2,3,4,5,6,7));
...
@@ -224,3 +224,16 @@ SET @x:= (SELECT h FROM t1 WHERE (a,b,c,d,e,f,g)=(1,2,3,4,5,6,7));
SELECT
@
x
;
SELECT
@
x
;
DROP
TABLE
t1
;
DROP
TABLE
t1
;
#
# Bug #34620: item_row.cc:50: Item_row::illegal_method_call(const char*):
# Assertion `0' failed
#
CREATE
TABLE
t1
(
a
INT
,
b
INT
);
INSERT
INTO
t1
VALUES
(
1
,
1
);
SELECT
ROW
(
a
,
1
)
IN
(
SELECT
SUM
(
b
),
1
)
FROM
t1
GROUP
BY
a
;
SELECT
ROW
(
a
,
1
)
IN
(
SELECT
SUM
(
b
),
3
)
FROM
t1
GROUP
BY
a
;
DROP
TABLE
t1
;
mysql-test/t/subselect.test
View file @
fa3fb2f6
...
@@ -3015,6 +3015,52 @@ INSERT INTO t2 VALUES (103, 203);
...
@@ -3015,6 +3015,52 @@ INSERT INTO t2 VALUES (103, 203);
SELECT
((
a1
,
a2
)
IN
(
SELECT
*
FROM
t2
WHERE
b2
>
0
))
IS
NULL
FROM
t1
;
SELECT
((
a1
,
a2
)
IN
(
SELECT
*
FROM
t2
WHERE
b2
>
0
))
IS
NULL
FROM
t1
;
DROP
TABLE
t1
,
t2
;
DROP
TABLE
t1
,
t2
;
#
# Bug31048: Many nested subqueries may cause server crash.
#
create
table
t1
(
a
int
,
b
int
,
key
(
a
),
key
(
b
));
insert
into
t1
(
a
,
b
)
values
(
1
,
2
),(
2
,
1
),(
2
,
3
),(
3
,
4
),(
5
,
4
),(
5
,
5
),
(
6
,
7
),(
7
,
4
),(
5
,
3
);
let
$nesting
=
26
;
let
$should_work_nesting
=
5
;
let
$start
=
select
sum
(
a
),
a
from
t1
where
a
>
(
select
sum
(
a
)
from
t1
;
let
$end
=
)
group
by
a
;
let
$start_app
=
where
a
>
(
select
sum
(
a
)
from
t1
;
let
$end_pre
=
)
group
by
b
limit
1
;
--
disable_result_log
--
disable_query_log
# At least 4 level nesting should work without errors
while
(
$should_work_nesting
)
{
--
echo
$should_work_nesting
eval
$start
$end
;
eval
explain
$start
$end
;
let
$start
=
$start
$start_app
;
let
$end
=
$end_pre
$end
;
dec
$should_work_nesting
;
}
# Other may fail with the 'stack overrun error'
while
(
$nesting
)
{
--
echo
$nesting
--
error
0
,
1436
eval
$start
$end
;
--
error
0
,
1436
eval
explain
$start
$end
;
let
$start
=
$start
$start_app
;
let
$end
=
$end_pre
$end
;
dec
$nesting
;
}
--
enable_result_log
--
enable_query_log
drop
table
t1
;
#
#
# Bug #28076: inconsistent binary/varbinary comparison
# Bug #28076: inconsistent binary/varbinary comparison
#
#
...
...
sql/item.h
View file @
fa3fb2f6
...
@@ -2157,6 +2157,35 @@ public:
...
@@ -2157,6 +2157,35 @@ public:
Item_field
*
filed_for_view_update
()
Item_field
*
filed_for_view_update
()
{
return
(
*
ref
)
->
filed_for_view_update
();
}
{
return
(
*
ref
)
->
filed_for_view_update
();
}
virtual
Ref_Type
ref_type
()
{
return
REF
;
}
virtual
Ref_Type
ref_type
()
{
return
REF
;
}
// Row emulation: forwarding of ROW-related calls to ref
uint
cols
()
{
return
ref
&&
result_type
()
==
ROW_RESULT
?
(
*
ref
)
->
cols
()
:
1
;
}
Item
*
element_index
(
uint
i
)
{
return
ref
&&
result_type
()
==
ROW_RESULT
?
(
*
ref
)
->
element_index
(
i
)
:
this
;
}
Item
**
addr
(
uint
i
)
{
return
ref
&&
result_type
()
==
ROW_RESULT
?
(
*
ref
)
->
addr
(
i
)
:
0
;
}
bool
check_cols
(
uint
c
)
{
return
ref
&&
result_type
()
==
ROW_RESULT
?
(
*
ref
)
->
check_cols
(
c
)
:
Item
::
check_cols
(
c
);
}
bool
null_inside
()
{
return
ref
&&
result_type
()
==
ROW_RESULT
?
(
*
ref
)
->
null_inside
()
:
0
;
}
void
bring_value
()
{
if
(
ref
&&
result_type
()
==
ROW_RESULT
)
(
*
ref
)
->
bring_value
();
}
};
};
...
...
sql/item_sum.cc
View file @
fa3fb2f6
...
@@ -3494,6 +3494,6 @@ void Item_func_group_concat::print(String *str)
...
@@ -3494,6 +3494,6 @@ void Item_func_group_concat::print(String *str)
Item_func_group_concat
::~
Item_func_group_concat
()
Item_func_group_concat
::~
Item_func_group_concat
()
{
{
if
(
unique_filter
)
if
(
!
original
&&
unique_filter
)
delete
unique_filter
;
delete
unique_filter
;
}
}
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