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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
7de902fc
Commit
7de902fc
authored
Sep 15, 2005
by
evgen@moonbone.local
Browse files
Options
Browse Files
Download
Plain Diff
Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0
into moonbone.local:/work/12887-bug-5.0-mysql
parents
bd3b8a49
885f7e7e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
2 deletions
+24
-2
mysql-test/r/olap.result
mysql-test/r/olap.result
+12
-0
mysql-test/t/olap.test
mysql-test/t/olap.test
+10
-0
sql/sql_select.cc
sql/sql_select.cc
+1
-1
vio/viosocket.c
vio/viosocket.c
+1
-1
No files found.
mysql-test/r/olap.result
View file @
7de902fc
...
@@ -580,6 +580,18 @@ a LENGTH(a) COUNT(*)
...
@@ -580,6 +580,18 @@ a LENGTH(a) COUNT(*)
2 1 1
2 1 1
NULL NULL 2
NULL NULL 2
DROP TABLE t1;
DROP TABLE t1;
create table t1 ( a varchar(9), b int );
insert into t1 values('a',1),(null,2);
select a, max(b) from t1 group by a with rollup;
a max(b)
NULL 2
a 1
NULL 2
select distinct a, max(b) from t1 group by a with rollup;
a max(b)
NULL 2
a 1
drop table t1;
CREATE TABLE t1(id int, type char(1));
CREATE TABLE t1(id int, type char(1));
INSERT INTO t1 VALUES
INSERT INTO t1 VALUES
(1,"A"),(2,"C"),(3,"A"),(4,"A"),(5,"B"),
(1,"A"),(2,"C"),(3,"A"),(4,"A"),(5,"B"),
...
...
mysql-test/t/olap.test
View file @
7de902fc
...
@@ -274,6 +274,15 @@ SELECT * FROM (SELECT a, LENGTH(a), COUNT(*) FROM t1 GROUP BY a WITH ROLLUP) t;
...
@@ -274,6 +274,15 @@ SELECT * FROM (SELECT a, LENGTH(a), COUNT(*) FROM t1 GROUP BY a WITH ROLLUP) t;
DROP
TABLE
t1
;
DROP
TABLE
t1
;
#
# Bug #12887 Distinct is not always applied after rollup
#
create
table
t1
(
a
varchar
(
9
),
b
int
);
insert
into
t1
values
(
'a'
,
1
),(
null
,
2
);
select
a
,
max
(
b
)
from
t1
group
by
a
with
rollup
;
select
distinct
a
,
max
(
b
)
from
t1
group
by
a
with
rollup
;
drop
table
t1
;
# End of 4.1 tests
# End of 4.1 tests
#
#
...
@@ -309,3 +318,4 @@ SELECT * FROM v1;
...
@@ -309,3 +318,4 @@ SELECT * FROM v1;
DROP
VIEW
v1
;
DROP
VIEW
v1
;
DROP
TABLE
t1
;
DROP
TABLE
t1
;
# End of 4.1 tests
sql/sql_select.cc
View file @
7de902fc
...
@@ -755,7 +755,7 @@ JOIN::optimize()
...
@@ -755,7 +755,7 @@ JOIN::optimize()
}
}
if
(
group_list
||
tmp_table_param
.
sum_func_count
)
if
(
group_list
||
tmp_table_param
.
sum_func_count
)
{
{
if
(
!
hidden_group_fields
)
if
(
!
hidden_group_fields
&&
rollup
.
state
==
ROLLUP
::
STATE_NONE
)
select_distinct
=
0
;
select_distinct
=
0
;
}
}
else
if
(
select_distinct
&&
tables
-
const_tables
==
1
)
else
if
(
select_distinct
&&
tables
-
const_tables
==
1
)
...
...
vio/viosocket.c
View file @
7de902fc
...
@@ -145,7 +145,7 @@ int vio_blocking(Vio * vio __attribute__((unused)), my_bool set_blocking_mode,
...
@@ -145,7 +145,7 @@ int vio_blocking(Vio * vio __attribute__((unused)), my_bool set_blocking_mode,
#endif
/* !defined(NO_FCNTL_NONBLOCK) */
#endif
/* !defined(NO_FCNTL_NONBLOCK) */
#else
/* !defined(__WIN__) && !defined(__EMX__) */
#else
/* !defined(__WIN__) && !defined(__EMX__) */
#ifndef __EMX__
#ifndef __EMX__
if
(
vio
->
type
!=
VIO_TYPE_NAMEDPIPE
)
if
(
vio
->
type
!=
VIO_TYPE_NAMEDPIPE
&&
vio
->
type
!=
VIO_TYPE_SHARED_MEMORY
)
#endif
#endif
{
{
ulong
arg
;
ulong
arg
;
...
...
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